From 9102345c52c64d44b8dc3371322d9a5b482e1309 Mon Sep 17 00:00:00 2001 From: Konstantin Chernenko Date: Thu, 14 Dec 2023 11:22:48 +0100 Subject: [PATCH] chore; simplize `className` statement Co-authored-by: Evgeniy Zhelenskiy <55230817+zhelenskiy@users.noreply.github.com> --- .../com/compiler/server/compiler/components/CliUtils.kt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/kotlin/com/compiler/server/compiler/components/CliUtils.kt b/src/main/kotlin/com/compiler/server/compiler/components/CliUtils.kt index 119c87269..69a3f8369 100644 --- a/src/main/kotlin/com/compiler/server/compiler/components/CliUtils.kt +++ b/src/main/kotlin/com/compiler/server/compiler/components/CliUtils.kt @@ -77,13 +77,8 @@ fun CLICompiler<*>.tryCompilation(inputDirectory: Path, inputFiles: List "red_wavy_line" - else -> it - } - }) + val className = if (!message.startsWith(UNRESOLVED_REFERENCE_PREFIX) && severity == ERROR) "red_wavy_line" else messageSeverity.name + val errorDescriptor = ErrorDescriptor(textInterval, message, messageSeverity, className) diagnosticsMap.getOrPut(errorFilePath) { mutableListOf() }.add(errorDescriptor) return ""