From c40c5e3ab1c286aaaa5b865024f7e15b0267dfd8 Mon Sep 17 00:00:00 2001 From: zoobestik Date: Thu, 28 Dec 2023 16:14:58 +0100 Subject: [PATCH] Handle 'ExplicitBackingFields' compiler warnings --- .../server/compiler/components/CliUtils.kt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 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 8c9a397f9..fdd633b10 100644 --- a/src/main/kotlin/com/compiler/server/compiler/components/CliUtils.kt +++ b/src/main/kotlin/com/compiler/server/compiler/components/CliUtils.kt @@ -64,17 +64,25 @@ fun CLICompiler<*>.tryCompilation(inputDirectory: Path, inputFiles: List + return "" } + val messageSeverity: ProjectSeveriry = when (severity) { EXCEPTION, ERROR -> ProjectSeveriry.ERROR STRONG_WARNING, WARNING -> ProjectSeveriry.WARNING INFO, LOGGING, OUTPUT -> return "" } + + val textInterval = location?.let { + TextInterval( + start = TextInterval.TextPosition(minusOne(location.line), minusOne(location.column)), + end = TextInterval.TextPosition(minusOne(location.lineEnd), minusOne(location.columnEnd)) + ) + } + val errorFilePath = location?.path?.let(::Path)?.outputFilePathString() ?: defaultFileName val className = if (!message.startsWith(UNRESOLVED_REFERENCE_PREFIX) && severity == ERROR) "red_wavy_line" else messageSeverity.name