Can a compiler plugin suppress or intercept the di...
# arrow-meta
r
Can a compiler plugin suppress or intercept the diagnostic for
NoValueForParameter
similar to how it was done in the KEEP https://github.com/arrow-kt/kotlin/pull/6/files#diff-792252e1fcae31609d7348297b7c45f4R46 ?
🚫 1
To expand on how to solve this, since any compiler plugin can register CallCheckers I have defined:
Copy code
fun CallCheckerContext.suppressDiagnostic(f: (Diagnostic) -> Boolean): Unit {
  (trace.bindingContext.diagnostics as? MutableDiagnosticsWithSuppression)?.let {
    val diagnosticList = it.getOwnDiagnostics() as ArrayList<Diagnostic>
    diagnosticList.removeIf(f)
  }
}
Which allow me on this use case to mutate the diagnostics before they are considered