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

17 lines
367 B
Plaintext

/**
* @name Check all non-scope nodes have an immediate dominator
* @description Check all non-scope nodes have an immediate dominator
* @kind problem
* @problem.severity warning
*/
import python
/* This query should *never* produce a result */
from ControlFlowNode f
where not exists(f.getImmediateDominator())
and not f.getNode() instanceof Scope
select f