mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
Will need subsequent PRs fixing up test failures (due to deprecated methods moving around), but other than that everything should be straight-forward.
11 lines
347 B
Plaintext
11 lines
347 B
Plaintext
import python
|
|
import semmle.python.TestUtils
|
|
|
|
from ControlFlowNode f, Value v, ControlFlowNode x
|
|
where
|
|
exists(ExprStmt s | s.getValue().getAFlowNode() = f) and
|
|
f.pointsTo(v, x) and
|
|
f.getLocation().getFile().getBaseName() = "test.py"
|
|
select f.getLocation().getStartLine(), f.toString(), v.toString(),
|
|
remove_library_prefix(x.getLocation())
|