mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Kotlin: Add getAPrimaryQlClass.ql consistenty check
This commit is contained in:
13
java/ql/consistency-queries/getAPrimaryQlClass.ql
Normal file
13
java/ql/consistency-queries/getAPrimaryQlClass.ql
Normal file
@@ -0,0 +1,13 @@
|
||||
import java
|
||||
|
||||
from Top t
|
||||
where t.getAPrimaryQlClass() = "???"
|
||||
// TypeBound doesn't extend Top (but probably should)
|
||||
and not t instanceof TypeBound
|
||||
// XMLLocatable doesn't extend Top (but probably should)
|
||||
and not t instanceof XMLLocatable
|
||||
// Kotlin bug:
|
||||
and not t.(Type).toString() = "string"
|
||||
select t,
|
||||
concat(t.getAPrimaryQlClass(), ","),
|
||||
concat(t.getAQlClass(), ",")
|
||||
Reference in New Issue
Block a user