mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
Merge pull request #11303 from tamasvajk/kotlin-one-stmt-line
Kotlin: Exclude .kt files from one stmt in line query
This commit is contained in:
@@ -37,6 +37,7 @@ predicate oneLineStatement(Stmt s, File f, int line, int col) {
|
||||
from Stmt s, Stmt s2
|
||||
where
|
||||
exists(File f, int line, int col, int col2 |
|
||||
f.isJavaSourceFile() and
|
||||
oneLineStatement(s, f, line, col) and
|
||||
oneLineStatement(s2, f, line, col2) and
|
||||
col < col2 and
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Advisory/Statements/OneStatementPerLine.ql
|
||||
@@ -0,0 +1,7 @@
|
||||
class Foo {
|
||||
fun foo(): Foo { return this }
|
||||
|
||||
fun bar(x: Foo?): Foo? {
|
||||
return x?.foo()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user