Move common diagnostics infrastructure to frontend.common
This commit is contained in:
+4
@@ -17,6 +17,7 @@ import kotlin.reflect.KTypeProjection
|
||||
|
||||
object ErrorListDiagnosticListRenderer : DiagnosticListRenderer() {
|
||||
private const val BASE_PACKAGE = "org.jetbrains.kotlin.fir.analysis.diagnostics"
|
||||
private const val DIAGNOSTICS_PACKAGE = "org.jetbrains.kotlin.diagnostics"
|
||||
|
||||
override fun render(file: File, diagnosticList: DiagnosticList, packageName: String) {
|
||||
file.writeToFileUsingSmartPrinterIfFileContentChanged {
|
||||
@@ -121,6 +122,9 @@ object ErrorListDiagnosticListRenderer : DiagnosticListRenderer() {
|
||||
if (packageName != BASE_PACKAGE) {
|
||||
add("$BASE_PACKAGE.*")
|
||||
}
|
||||
if (packageName != DIAGNOSTICS_PACKAGE) {
|
||||
add("$DIAGNOSTICS_PACKAGE.*")
|
||||
}
|
||||
diagnosticList.allDiagnostics.forEach { diagnostic ->
|
||||
for (typeArgument in diagnostic.getAllTypeArguments()) {
|
||||
typeArgument.collectClassNamesTo(this)
|
||||
|
||||
Reference in New Issue
Block a user