Added trivial graph for illustration

This commit is contained in:
Michael Hohn
2021-08-15 00:50:58 -07:00
committed by =Michael Hohn
parent 4fcbe94d52
commit 1e47b5e599
7 changed files with 145 additions and 2 deletions

22
queries/graphout.ql Normal file
View File

@@ -0,0 +1,22 @@
/**
* @name simple graph test
* @kind graph
*/
import javascript
query predicate edges(int a, int b) {
a = 1 and b = 2
or
a = 2 and b = 3
}
query predicate nodes(int n, string key, string val) {
(edges(n, _) or edges(_, n)) and
key = "semmle.label" and
val = n.toString()
}
query predicate graphProperties(string key, string value) {
key = "semmle.graphKind" and value = "tree"
}

View File

@@ -1,3 +1,3 @@
name: codeql-custom-queries-javascript
name: exploratory-queries-javascript
version: 0.0.0
libraryPathDependencies: codeql-javascript