Skip to content

Commit da459c4

Browse files
authored
Merge pull request github#12281 from smowton/smowton/feature/kotlin-too-new-diagnostic
Add test for a too-new Kotlin version
2 parents 9528315 + eb8a0c1 commit da459c4

File tree

13 files changed

+89
-0
lines changed

13 files changed

+89
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"markdownMessage": "The Kotlin version installed (`999.999.999`) is too recent for this version of CodeQL. Install a version lower than 1.8.30",
3+
"severity": "error",
4+
"source": {
5+
"extractorName": "java",
6+
"id": "java/extractor-agent/kotlin-version-too-new",
7+
"name": "Android build failure"
8+
},
9+
"visibility": {
10+
"cliSummaryTable": true,
11+
"statusPage": true,
12+
"telemetry": true
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package com.intellij.mock;
2+
3+
public class MockProject { }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package com.intellij.openapi;
2+
3+
public class Disposable { }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package driver;
2+
3+
import java.util.ArrayList;
4+
import java.util.List;
5+
import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments;
6+
import org.jetbrains.kotlin.cli.common.arguments.ParseCommandLineArgumentsKt;
7+
import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler;
8+
9+
public class Main {
10+
11+
public static void main(String[] args) {
12+
13+
List<String> compilerArgs = new ArrayList<String>();
14+
K2JVMCompilerArguments parsedArgs = new K2JVMCompilerArguments();
15+
(new ParseCommandLineArgumentsKt()).parseCommandLineArguments(compilerArgs, parsedArgs);
16+
(new K2JVMCompiler()).doExecute(parsedArgs, null, null, null);
17+
18+
}
19+
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package kotlin;
2+
3+
public class KotlinVersion {
4+
5+
public static String CURRENT = "999.999.999";
6+
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package org.jetbrains.kotlin.cli.common;
2+
3+
public class ExitCode { }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package org.jetbrains.kotlin.cli.common.arguments;
2+
3+
class CommonToolArguments { }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package org.jetbrains.kotlin.cli.common.arguments;
2+
3+
public class K2JVMCompilerArguments extends CommonToolArguments { }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package org.jetbrains.kotlin.cli.common.arguments;
2+
3+
public class ParseCommandLineArgumentsKt {
4+
5+
public void parseCommandLineArguments(java.util.List p0, org.jetbrains.kotlin.cli.common.arguments.CommonToolArguments p1) { }
6+
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package org.jetbrains.kotlin.cli.jvm;
2+
3+
public class K2JVMCompiler {
4+
5+
public org.jetbrains.kotlin.cli.common.ExitCode doExecute(org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments p0, org.jetbrains.kotlin.config.CompilerConfiguration p1, com.intellij.openapi.Disposable p2, org.jetbrains.kotlin.utils.KotlinPaths p3) {
6+
return null;
7+
}
8+
9+
}

0 commit comments

Comments
 (0)