mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
Kotlin: Add a compilations consistency query
This commit is contained in:
17
java/ql/consistency-queries/compilations.ql
Normal file
17
java/ql/consistency-queries/compilations.ql
Normal file
@@ -0,0 +1,17 @@
|
||||
import java
|
||||
|
||||
predicate goodCompilation(Compilation c) {
|
||||
forex(int i |
|
||||
exists(c.getFileCompiled(i)) |
|
||||
exists(c.getFileCompiled(i - 1)) or i = 0) and
|
||||
forex(int i |
|
||||
exists(c.getArgument(i)) |
|
||||
exists(c.getArgument(i - 1)) or i = 0) and
|
||||
c.extractionStarted() and
|
||||
c.normalTermination()
|
||||
}
|
||||
|
||||
from Compilation c
|
||||
where c.isKotlin()
|
||||
and not goodCompilation(c)
|
||||
select c
|
||||
Reference in New Issue
Block a user