mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Merge pull request #9233 from atorralba/atorralba/fix-field-init-test
Kotlin: Fix test to correctly highlight lack of flow from field init
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
isFinalField
|
||||
| test.kt:3:3:3:18 | x |
|
||||
#select
|
||||
| test.kt:3:3:3:18 | this.x | test.kt:6:10:6:10 | getX(...) |
|
||||
#select
|
||||
@@ -4,9 +4,7 @@ import semmle.code.java.dataflow.DataFlow
|
||||
class Config extends DataFlow::Configuration {
|
||||
Config() { this = "Config" }
|
||||
|
||||
override predicate isSource(DataFlow::Node n) {
|
||||
n.asExpr().(CompileTimeConstantExpr).getStringValue() = "Source"
|
||||
}
|
||||
override predicate isSource(DataFlow::Node n) { n.asExpr().(StringLiteral).getValue() = "Source" }
|
||||
|
||||
override predicate isSink(DataFlow::Node n) {
|
||||
n.asExpr().(Argument).getCall().getCallee().getName() = "sink"
|
||||
|
||||
Reference in New Issue
Block a user