mirror of
https://github.com/github/codeql.git
synced 2025-12-19 18:33:16 +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.
12 lines
293 B
Plaintext
12 lines
293 B
Plaintext
import python
|
|
|
|
string longname(Expr e) {
|
|
result = e.(Name).getId()
|
|
or
|
|
exists(Attribute a | a = e | result = longname(a.getObject()) + "." + a.getName())
|
|
}
|
|
|
|
from Expr e, Value v
|
|
where e.pointsTo(v) and e.getLocation().getFile().getShortName() = "test.py"
|
|
select longname(e), v.toString()
|