File tree Expand file tree Collapse file tree 9 files changed +1050
-490
lines changed
src/codeql_ruby/controlflow
test/library-tests/controlflow/graph Expand file tree Collapse file tree 9 files changed +1050
-490
lines changed Original file line number Diff line number Diff line change 22
22
23
23
- name : Fetch CodeQL
24
24
run : |
25
- gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip
25
+ LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | sort --version-sort | tail -1)
26
+ gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip "$LATEST"
26
27
unzip -q codeql-linux64.zip
27
28
env :
28
29
GITHUB_TOKEN : ${{ github.token }}
Original file line number Diff line number Diff line change 16
16
- uses : actions/checkout@v2
17
17
- name : Fetch CodeQL
18
18
run : |
19
- gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip
19
+ LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | sort --version-sort | tail -1)
20
+ gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip "$LATEST"
20
21
unzip -q codeql-linux64.zip
21
22
env :
22
23
GITHUB_TOKEN : ${{ github.token }}
Original file line number Diff line number Diff line change @@ -8,36 +8,14 @@ private import internal.ControlFlowGraphImpl
8
8
private import internal.Splitting
9
9
private import internal.Completion
10
10
11
- private class CfgScopeRange =
12
- @program or @begin_block or @end_block or @method or @singleton_method or @block or @do_block or
13
- @lambda;
14
-
15
11
/** An AST node with an associated control-flow graph. */
16
- class CfgScope extends AstNode , CfgScopeRange {
12
+ class CfgScope extends AstNode {
13
+ CfgScope:: Range_ range ;
14
+
15
+ CfgScope ( ) { range = this }
16
+
17
17
/** Gets the name of this scope. */
18
- string getName ( ) {
19
- this instanceof Program and
20
- result = "top-level"
21
- or
22
- this instanceof BeginBlock and
23
- result = "BEGIN block"
24
- or
25
- this instanceof EndBlock and
26
- result = "END block"
27
- or
28
- result = this .( Method ) .getName ( ) .toString ( )
29
- or
30
- result = this .( SingletonMethod ) .getName ( ) .toString ( )
31
- or
32
- this instanceof Block and
33
- result = "block"
34
- or
35
- this instanceof DoBlock and
36
- result = "do block"
37
- or
38
- this instanceof Lambda and
39
- result = "lambda"
40
- }
18
+ string getName ( ) { result = range .getName ( ) }
41
19
}
42
20
43
21
/**
You can’t perform that action at this time.
0 commit comments