We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6ba8f9e + d91fa2d commit 60a5ef7Copy full SHA for 60a5ef7
ruby/ql/lib/ide-contextual-queries/printCfg.ql
@@ -0,0 +1,22 @@
1
+/**
2
+ * @name Print CFG
3
+ * @description Produces a representation of a file's Control Flow Graph.
4
+ * This query is used by the VS Code extension.
5
+ * @id rb/print-cfg
6
+ * @kind graph
7
+ * @tags ide-contextual-queries/print-cfg
8
+ */
9
+
10
+private import codeql.ruby.controlflow.internal.ControlFlowGraphImplShared::TestOutput
11
+private import codeql.IDEContextual
12
13
14
+ * Gets the source file to generate a CFG from.
15
16
+external string selectedSourceFile();
17
18
+class MyRelevantNode extends RelevantNode {
19
+ MyRelevantNode() {
20
+ this.getScope().getLocation().getFile() = getFileBySourceArchiveName(selectedSourceFile())
21
+ }
22
+}
0 commit comments