Files
codeql/python/ql/test/library-tests/comparisons/CompareControls.ql
Taus Brock-Nannestad f07a7bf8cf Python: Autoformat everything using qlformat.
Will need subsequent PRs fixing up test failures (due to deprecated
methods moving around), but other than that everything should be
straight-forward.
2020-07-07 15:43:52 +02:00

8 lines
311 B
Plaintext

import python
import semmle.python.Comparisons
from ComparisonControlBlock comp, SsaVariable v, CompareOp op, float k, BasicBlock b
where comp.controls(v.getAUse(), op, k, b)
select comp.getTest().getLocation().getStartLine(), v.getId() + " " + op.repr() + " " + k,
b.getNode(0).getLocation().getStartLine()