mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Kotlin: Add a consistency query for Kotlin types
This commit is contained in:
12
java/ql/consistency-queries/kotlinTypes.ql
Normal file
12
java/ql/consistency-queries/kotlinTypes.ql
Normal file
@@ -0,0 +1,12 @@
|
||||
import java
|
||||
|
||||
predicate badKotlinType(Element e, int i) {
|
||||
e = any(Expr expr | count(expr.getKotlinType()) = i)
|
||||
}
|
||||
|
||||
from Element e, int i
|
||||
where e.getFile().isKotlinSourceFile()
|
||||
and badKotlinType(e, i)
|
||||
and i != 1
|
||||
select e, i
|
||||
|
||||
Reference in New Issue
Block a user