Files
codeql/python/ql/test/library-tests/ControlFlow/dominators/idom.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

16 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 table
* @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