Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba89653 commit 83a8a60Copy full SHA for 83a8a60
1 file changed
ruby/ql/consistency-queries/CfgConsistency.ql
@@ -1 +1,24 @@
1
import codeql.ruby.controlflow.internal.ControlFlowGraphImplShared::Consistency
2
+import codeql.ruby.AST
3
+import codeql.ruby.controlflow.internal.ControlFlowGraphImpl
4
+
5
+/**
6
+ * All `Expr` nodes are `PostOrderTree`s
7
+ */
8
+query predicate nonPostOrderExprTypes(string cls) {
9
+ exists(Expr e |
10
+ e instanceof ControlFlowTree and
11
+ not exists(e.getDesugared()) and
12
+ cls = e.getAPrimaryQlClass() and
13
+ not e instanceof PostOrderTree and
14
+ not e instanceof LeafTree
15
+ )
16
+ or
17
18
19
+ e = any(AstNode x).getDesugared() and
20
21
22
23
24
+}
0 commit comments