mirror of
https://github.com/github/codeql.git
synced 2025-12-27 22:26:31 +01:00
10 lines
307 B
Plaintext
10 lines
307 B
Plaintext
|
|
import python
|
|
import semmle.python.types.Version
|
|
|
|
from VersionTest vt, Location l, int v
|
|
where l = vt.getNode().getLocation() and
|
|
l.getFile().getName().matches("%test.py")
|
|
and (if vt.isTrue() then v = major_version() else v = 5-major_version())
|
|
select l.getStartLine(), vt.(ControlFlowNode).toString(), v
|