mirror of
https://github.com/github/codeql.git
synced 2026-06-09 23:14:13 +02:00
Kotlin: Update integration tests from -language-version 1.9 to 2.0
Kotlin 2.4.0 no longer supports -language-version 1.9. Update all integration tests that explicitly pass this flag to use 2.0 instead. Also update the extractor_information_kotlin1 expected output since -language-version 2.0 causes the extractor to report 'Uses Kotlin 2: true'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -6,6 +6,6 @@ def test(codeql, java_full):
|
||||
codeql.database.create(
|
||||
command=[
|
||||
f"javac {java_srcs} -d build",
|
||||
"kotlinc -language-version 1.9 user.kt -cp build",
|
||||
"kotlinc -language-version 2.0 user.kt -cp build",
|
||||
]
|
||||
)
|
||||
|
||||
@@ -2,5 +2,5 @@ import commands
|
||||
|
||||
|
||||
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")
|
||||
commands.run("kotlinc -language-version 2.0 test.kt -d lib")
|
||||
codeql.database.create(command="kotlinc -language-version 2.0 user.kt -cp lib")
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
| Percentage of calls with call target | 100 |
|
||||
| Total number of lines | 3 |
|
||||
| Total number of lines with extension kt | 3 |
|
||||
| Uses Kotlin 2: false | 1 |
|
||||
| Uses Kotlin 2: true | 1 |
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
def test(codeql, java_full):
|
||||
codeql.database.create(command="kotlinc -J-Xmx2G -language-version 1.9 SomeClass.kt")
|
||||
codeql.database.create(command="kotlinc -J-Xmx2G -language-version 2.0 SomeClass.kt")
|
||||
|
||||
@@ -2,5 +2,5 @@ import commands
|
||||
|
||||
|
||||
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")
|
||||
commands.run("kotlinc -language-version 2.0 A.kt")
|
||||
codeql.database.create(command="kotlinc -cp . -language-version 2.0 B.kt C.kt")
|
||||
|
||||
@@ -3,4 +3,4 @@ import commands
|
||||
|
||||
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")
|
||||
codeql.database.create(command="kotlinc -language-version 2.0 user.kt -cp bin")
|
||||
|
||||
@@ -8,6 +8,6 @@ def test(codeql, java_full):
|
||||
command=[
|
||||
"kotlinc kotlindefns.kt",
|
||||
"javac JavaUser.java JavaDefns.java -cp .",
|
||||
"kotlinc -language-version 1.9 -cp . kotlinuser.kt",
|
||||
"kotlinc -language-version 2.0 -cp . kotlinuser.kt",
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user