mirror of
https://github.com/github/codeql.git
synced 2025-12-19 18:33:16 +01:00
Will need subsequent PRs fixing up test failures (due to deprecated methods moving around), but other than that everything should be straight-forward.
16 lines
367 B
Plaintext
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
|