Files
codeql/python/ql/test/library-tests/ControlFlow/truefalse/TrueFalseSuccessors.ql
2018-11-19 15:15:54 +00:00

16 lines
409 B
Plaintext

/**
* @name TrueFalseSuccessors Test
* @description Tests true/false successors
* @kind problem
* @problem.severity warning
*/
import python
from ControlFlowNode p, ControlFlowNode s, string which
where
s = p.getAFalseSuccessor() and which = "False"
or
s = p.getATrueSuccessor() and which = "True"
select p.getLocation().getFile().getShortName(), p.getLocation().getStartLine(), p, s.toString(), which