mirror of
https://github.com/github/codeql.git
synced 2026-06-25 06:37:07 +02:00
Merge pull request #21970 from github/andersfugmann/kotlin-2.4-v2
Kotlin: add Kotlin 2.4.0 support
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"markdownMessage": "The Kotlin version installed (`999.999.999`) is too recent for this version of CodeQL. Install a version lower than 2.3.30.",
|
||||
"markdownMessage": "The Kotlin version installed (`999.999.999`) is too recent for this version of CodeQL. Install a version lower than 2.4.10.",
|
||||
"severity": "error",
|
||||
"source": {
|
||||
"extractorName": "java",
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import pathlib
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.kotlin1
|
||||
def test(codeql, java_full):
|
||||
java_srcs = " ".join([str(s) for s in pathlib.Path().glob("*.java")])
|
||||
codeql.database.create(
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import commands
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.kotlin1
|
||||
def test(codeql, java_full):
|
||||
commands.run("kotlinc -language-version 1.9 test.kt -d lib")
|
||||
codeql.database.create(command="kotlinc -language-version 1.9 user.kt -cp lib")
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.kotlin1
|
||||
def test(codeql, java_full):
|
||||
codeql.database.create(command="kotlinc -J-Xmx2G -language-version 1.9 SomeClass.kt")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import commands
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.kotlin1
|
||||
def test(codeql, java_full):
|
||||
commands.run("kotlinc -language-version 1.9 A.kt")
|
||||
codeql.database.create(command="kotlinc -cp . -language-version 1.9 B.kt C.kt")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import commands
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.kotlin1
|
||||
def test(codeql, java_full):
|
||||
commands.run(["javac", "Test.java", "-d", "bin"])
|
||||
codeql.database.create(command="kotlinc -language-version 1.9 user.kt -cp bin")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import commands
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.kotlin1
|
||||
def test(codeql, java_full):
|
||||
# Compile the JavaDefns2 copy outside tracing, to make sure the Kotlin view of it matches the Java view seen by the traced javac compilation of JavaDefns.java below.
|
||||
commands.run(["javac", "JavaDefns2.java"])
|
||||
|
||||
4
java/ql/lib/change-notes/2026-06-04-kotlin-2.4.0.md
Normal file
4
java/ql/lib/change-notes/2026-06-04-kotlin-2.4.0.md
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: feature
|
||||
---
|
||||
* Kotlin 2.4.0 can now be analysed.
|
||||
Reference in New Issue
Block a user