22 * @name Print CFG
33 * @description Produces a representation of a file's Control Flow Graph.
44 * This query is used by the VS Code extension.
5- * @id rb /print-cfg
5+ * @id bicep /print-cfg
66 * @kind graph
77 * @tags ide-contextual-queries/print-cfg
88 */
99
10- private import codeql.Locations
11- private import codeql.bicep.controlflow.internal.ControlFlowGraphImpl
12- private import codeql.bicep.controlflow.ControlFlowGraph
13-
14- external string selectedSourceFile ( ) ;
15-
16- private predicate selectedSourceFileAlias = selectedSourceFile / 0 ;
17-
18- external int selectedSourceLine ( ) ;
19-
20- private predicate selectedSourceLineAlias = selectedSourceLine / 0 ;
21-
22- external int selectedSourceColumn ( ) ;
23-
24- private predicate selectedSourceColumnAlias = selectedSourceColumn / 0 ;
25-
26- module ViewCfgQueryInput implements ViewCfgQueryInputSig< File > {
27- predicate selectedSourceFile = selectedSourceFileAlias / 0 ;
28-
29- predicate selectedSourceLine = selectedSourceLineAlias / 0 ;
30-
31- predicate selectedSourceColumn = selectedSourceColumnAlias / 0 ;
32-
33- predicate cfgScopeSpan (
34- CfgScope scope , File file , int startLine , int startColumn , int endLine , int endColumn
35- ) {
36- file = scope .getFile ( ) and
37- scope .getLocation ( ) .hasLocationInfo ( _, startLine , startColumn , endLine , endColumn )
38- }
39- }
40-
41- import ViewCfgQuery< File , ViewCfgQueryInput >
10+ private import codeql.Locations
11+ private import codeql.bicep.controlflow.internal.ControlFlowGraphImpl
12+ private import codeql.bicep.controlflow.ControlFlowGraph
13+
14+ external string selectedSourceFile ( ) ;
15+
16+ private predicate selectedSourceFileAlias = selectedSourceFile / 0 ;
17+
18+ external int selectedSourceLine ( ) ;
19+
20+ private predicate selectedSourceLineAlias = selectedSourceLine / 0 ;
21+
22+ external int selectedSourceColumn ( ) ;
23+
24+ private predicate selectedSourceColumnAlias = selectedSourceColumn / 0 ;
25+
26+ module ViewCfgQueryInput implements ViewCfgQueryInputSig< File > {
27+ predicate selectedSourceFile = selectedSourceFileAlias / 0 ;
28+
29+ predicate selectedSourceLine = selectedSourceLineAlias / 0 ;
30+
31+ predicate selectedSourceColumn = selectedSourceColumnAlias / 0 ;
32+
33+ predicate cfgScopeSpan (
34+ CfgScope scope , File file , int startLine , int startColumn , int endLine , int endColumn
35+ ) {
36+ file = scope .getFile ( ) and
37+ scope .getLocation ( ) .hasLocationInfo ( _, startLine , startColumn , endLine , endColumn )
38+ }
39+ }
40+
41+ import ViewCfgQuery< File , ViewCfgQueryInput >
0 commit comments