refine

abstract fun refine(context: RuleContext, diagnostic: Diagnostic): Diagnostic?

Returns the diagnostic to keep, or null to suppress it.