mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
Kotlin: Add an integration test for extractor information
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
| Number of files with extension jar | 1 |
|
||||
| Number of files with extension kt | 1 |
|
||||
| Number of lines of code | 2 |
|
||||
| Number of lines of code with extension kt | 2 |
|
||||
| Total number of lines | 3 |
|
||||
| Total number of lines with extension kt | 3 |
|
||||
| Uses Kotlin 2: false | 1 |
|
||||
@@ -0,0 +1,13 @@
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-queries
|
||||
extensible: extractorInformationSkipKey
|
||||
data:
|
||||
# These will have unstable values, as they are dependent on the
|
||||
# JDK that the test is run with, so filter them out:
|
||||
- ["Number of files"]
|
||||
- ["Number of files with extension class"]
|
||||
# These depend on the Kotlin version you have installed
|
||||
- ["Kotlin Compiler Version: %"]
|
||||
- ["Kotlin Extractor Name: %"]
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Telemetry/ExtractorInformation.ql
|
||||
@@ -0,0 +1,2 @@
|
||||
class SomeClass {
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
from create_database_utils import *
|
||||
|
||||
run_codeql_database_create(["kotlinc SomeClass.kt"], lang="java")
|
||||
@@ -87,7 +87,7 @@ predicate extractorTotalDiagnostics(string key, int value) {
|
||||
|
||||
from string key, int value
|
||||
where
|
||||
not extractorInformationSkipKey(key) and
|
||||
not exists(string pattern | extractorInformationSkipKey(pattern) and key.matches(pattern)) and
|
||||
(
|
||||
compilationInfo(key, value) or
|
||||
fileCount(key, value) or
|
||||
|
||||
Reference in New Issue
Block a user