Skip to content

Commit c4cc54d

Browse files
Fix CI/CD test failures: resolve Ruby imports and unused variable warnings
Co-authored-by: MichaelRFairhurst <1627771+MichaelRFairhurst@users.noreply.github.com>
1 parent b62a030 commit c4cc54d

573 files changed

Lines changed: 46706 additions & 26 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cpp/test/qtil/cpp/graph/CustomPathStateProblemTest.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module CallGraphPathStateProblemConfig implements CustomPathStateProblemConfigSi
1010
predicate start(Node n, int depth) { n.getName() = "start" and depth = 0 }
1111

1212
bindingset[depth]
13-
predicate end(Node n, int depth) { n.getName() = "end" }
13+
predicate end(Node n, int depth) { n.getName() = "end" and depth >= 0 }
1414

1515
bindingset[depth1]
1616
bindingset[depth2]

go/src/qtil/go/graph/CustomPathStateProblem.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ private import qtil.locations.CustomPathStateProblem
22
private import qtil.go.locations.Locatable
33
private import go
44
// Import the Go specific configuration for making custom path state problems.
5-
import PathStateProblem<go::DbLocation, GoLocatableConfig>
5+
import PathStateProblem<DbLocation, GoLocatableConfig>

go/test/qtil/go/graph/CustomPathStateProblemTest.ql

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,28 @@ import go
33
import qtil.go.graph.CustomPathStateProblem
44

55
module CallGraphPathStateProblemConfig implements CustomPathStateProblemConfigSig {
6-
class Node = Variable;
6+
class Node = Ident;
77

88
class State = int; // Track search depth
99

1010
predicate start(Node n, int depth) { n.getName() = "start" and depth = 0 }
1111

1212
bindingset[depth]
13-
predicate end(Node n, int depth) { n.getName() = "end" }
13+
predicate end(Node n, int depth) { n.getName() = "end" and depth >= 0 }
1414

1515
bindingset[depth1]
1616
bindingset[depth2]
17-
predicate edge(Variable a, int depth1, Variable b, int depth2) {
17+
predicate edge(Ident a, int depth1, Ident b, int depth2) {
1818
depth2 = depth1 + 1 and
19-
exists(ValueSpec specA, ValueSpec specB |
20-
specA.getNameExpr(0).(Ident).getName() = a.getName() and
21-
specB.getNameExpr(0).(Ident).getName() = b.getName() and
22-
specA.getValue(0).(Ident).getName() = b.getName()
19+
exists(Assignment assign |
20+
assign.getLhs().(Name).getTarget().getDeclaration() = a and
21+
assign.getRhs().(Name).getTarget().getDeclaration() = b
2322
)
2423
}
2524
}
2625

2726
import CustomPathStateProblem<CallGraphPathStateProblemConfig>
2827

29-
from Variable start, Variable end
28+
from Ident start, Ident end
3029
where problem(start, end)
3130
select start, end, "Path from $@ to $@.", start.getName(), start, end.getName(), end

java/test/qtil/java/graph/CustomPathStateProblemTest.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module CallGraphPathStateProblemConfig implements CustomPathStateProblemConfigSi
1010
predicate start(Node n, int depth) { n.getName() = "start" and depth = 0 }
1111

1212
bindingset[depth]
13-
predicate end(Node n, int depth) { n.getName() = "end" }
13+
predicate end(Node n, int depth) { n.getName() = "end" and depth >= 0 }
1414

1515
bindingset[depth1]
1616
bindingset[depth2]
@@ -19,7 +19,7 @@ module CallGraphPathStateProblemConfig implements CustomPathStateProblemConfigSi
1919
exists(LocalVariableDeclExpr declA, LocalVariableDeclExpr declB |
2020
declA.getVariable() = a and
2121
declB.getVariable() = b and
22-
declA.getInit().(VarAccess).getVariable() = b.getVariable()
22+
declA.getInit().(VarAccess).getVariable() = b
2323
)
2424
}
2525
}
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
edges
2+
| test.js:2:9:2:11 | mid | test.js:4:9:4:11 | end | | |
3+
| test.js:3:9:3:13 | start | test.js:2:9:2:11 | mid | | |
24
nodes
3-
#select
5+
| test.js:2:9:2:11 | mid | semmle.label | mid |
6+
| test.js:3:9:3:13 | start | semmle.label | start |
7+
| test.js:4:9:4:11 | end | semmle.label | end |
8+
#select
9+
| test.js:3:9:3:13 | start | test.js:4:9:4:11 | end | Path from $@ to $@. | start | test.js:3:9:3:13 | start | end | test.js:4:9:4:11 | end |

javascript/test/qtil/javascript/graph/CustomPathStateProblemTest.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module CallGraphPathStateProblemConfig implements CustomPathStateProblemConfigSi
1010
predicate start(Node n, int depth) { n.getAVariable().getName() = "start" and depth = 0 }
1111

1212
bindingset[depth]
13-
predicate end(Node n, int depth) { n.getAVariable().getName() = "end" }
13+
predicate end(Node n, int depth) { n.getAVariable().getName() = "end" and depth >= 0 }
1414

1515
bindingset[depth1]
1616
bindingset[depth2]

python/test/qtil/python/graph/CustomPathStateProblemTest.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module CallGraphPathStateProblemConfig implements CustomPathStateProblemConfigSi
1010
predicate start(Node n, int depth) { n.getId() = "start" and depth = 0 }
1111

1212
bindingset[depth]
13-
predicate end(Node n, int depth) { n.getId() = "end" }
13+
predicate end(Node n, int depth) { n.getId() = "end" and depth >= 0 }
1414

1515
bindingset[depth1]
1616
bindingset[depth2]

ruby/src/qtil/ruby/graph/CustomPathStateProblem.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ private import qtil.locations.CustomPathStateProblem
22
private import qtil.ruby.locations.Locatable
33
private import ruby
44
// Import the Ruby specific configuration for making custom path state problems.
5-
import PathStateProblem<ruby::Location, RubyLocatableConfig>
5+
import PathStateProblem<Location, RubyLocatableConfig>

ruby/test/qtil/ruby/ast/TwoOperandsTest.actual

Whitespace-only changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
sourceLocationPrefix: /home/runner/work/codeql-qtil/codeql-qtil/ruby/test/qtil/ruby/ast
3+
baselineLinesOfCode: 0
4+
unicodeNewlines: false
5+
columnKind: utf8
6+
primaryLanguage: ruby
7+
creationMetadata:
8+
cliVersion: 2.20.1
9+
creationTime: 2025-09-13T05:35:58.326187258Z
10+
finalised: true

0 commit comments

Comments
 (0)