mirror of
https://github.com/github/codeql.git
synced 2026-04-22 15:25:18 +02:00
Kotlin: Add an integration test for file classes
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
fun a() {
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun b() {
|
||||
a()
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class C {
|
||||
fun c() {}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
| AKt.class:0:0:0:0 | AKt | false |
|
||||
| B.kt:0:0:0:0 | BKt | true |
|
||||
| C.kt:1:1:3:1 | C | false |
|
||||
@@ -0,0 +1,5 @@
|
||||
import java
|
||||
|
||||
from Class c
|
||||
where exists(c.getLocation().getFile().getRelativePath())
|
||||
select c, any(boolean b | if c.isFileClass() then b = true else b = false)
|
||||
@@ -0,0 +1,4 @@
|
||||
from create_database_utils import *
|
||||
|
||||
runSuccessfully([get_cmd("kotlinc"), 'A.kt'])
|
||||
run_codeql_database_create(['kotlinc -cp . B.kt C.kt'], lang="java")
|
||||
Reference in New Issue
Block a user