K2: Extract CheckerContextForProvider from CheckerContext

So, the idea is that CheckerContext should remain just read-only
while the one who runs the checkers might build/modify the context.

^KT-56460 Related
This commit is contained in:
Denis.Zharkov
2023-02-07 11:28:22 +01:00
committed by Space Team
parent d24092e467
commit a311d6eea0
11 changed files with 116 additions and 82 deletions
@@ -16,15 +16,6 @@ interface DiagnosticContext {
val languageVersionSettings: LanguageVersionSettings
}
abstract class MutableDiagnosticContext : DiagnosticContext {
abstract fun addSuppressedDiagnostics(
diagnosticNames: Collection<String>,
allInfosSuppressed: Boolean,
allWarningsSuppressed: Boolean,
allErrorsSuppressed: Boolean
): DiagnosticContext
}
abstract class DiagnosticReporter {
abstract fun report(diagnostic: KtDiagnostic?, context: DiagnosticContext)
@@ -97,4 +88,4 @@ open class KtDiagnosticReporterWithContext(
return result
}
}
}
}