mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Kotlin: exclude Kotlin source from 'inner class could be static' check
This commit is contained in:
@@ -130,7 +130,9 @@ predicate potentiallyStatic(InnerClass c) {
|
||||
)
|
||||
) and
|
||||
// JUnit Nested test classes are required to be non-static.
|
||||
not c.hasAnnotation("org.junit.jupiter.api", "Nested")
|
||||
not c.hasAnnotation("org.junit.jupiter.api", "Nested") and
|
||||
// There's no `static` in kotlin:
|
||||
not c.getLocation().getFile().isKotlinSourceFile()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user