From 8b11b652923b58c42fd42fbbe09da19b12fd345f Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Fri, 23 Aug 2024 14:35:38 +0100 Subject: [PATCH] KE2: Add the compilation properly --- java/kotlin-extractor2/ke2.sh | 3 +++ java/kotlin-extractor2/src/main/kotlin/KotlinExtractor.kt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/java/kotlin-extractor2/ke2.sh b/java/kotlin-extractor2/ke2.sh index afb86ed0eeb..e70a570597e 100755 --- a/java/kotlin-extractor2/ke2.sh +++ b/java/kotlin-extractor2/ke2.sh @@ -15,6 +15,9 @@ INVOCATION_TRAP=`mktemp -p "$TRAP_DIR" invocation.XXXXXXXXXX.trap` echo "// Invocation of Kotlin Extractor 2" >> "$INVOCATION_TRAP" echo "#compilation = *" >> "$INVOCATION_TRAP" +# TODO: This should be properly escaped: +echo "compilations(#compilation, 2, \"`pwd`\",\"$INVOCATION_TRAP\")" >> "$INVOCATION_TRAP" +# TODO: compilation_args if [[ -n "$CODEQL_JAVA_HOME" ]]; then JAVA="$CODEQL_JAVA_HOME/bin/java" diff --git a/java/kotlin-extractor2/src/main/kotlin/KotlinExtractor.kt b/java/kotlin-extractor2/src/main/kotlin/KotlinExtractor.kt index ae4d06f6580..8c913ecfe0c 100644 --- a/java/kotlin-extractor2/src/main/kotlin/KotlinExtractor.kt +++ b/java/kotlin-extractor2/src/main/kotlin/KotlinExtractor.kt @@ -81,7 +81,7 @@ OLD: KE1 val diagnosticCounter = DiagnosticCounter() val loggerBase = LoggerBase(diagnosticCounter) val dtw = DiagnosticTrapWriter(loggerBase, invocationLabelManager, invocationTrapFileBW) - // The diganostic TRAP file has already defined #compilation = * + // The diagnostic TRAP file has already defined #compilation = * val compilation: Label = StringLabel("compilation") dtw.writeCompilation_started(compilation) /*