Skip to content

Commit a5acaeb

Browse files
committed
QL: add implicit -all to a query pack to match the CodeQL pack resolution
1 parent 1d10f14 commit a5acaeb

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

ql/ql/src/codeql_ql/ast/Ast.qll

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2532,8 +2532,15 @@ module YAML {
25322532
* Gets a QLPack that this QLPack depends on.
25332533
*/
25342534
QLPack getADependency() {
2535-
exists(string name | this.hasDependency(name, _) |
2536-
result.getName().replaceAll("-", "/") = name.replaceAll("-", "/")
2535+
exists(string rawDep, string dep, string name | this.hasDependency(rawDep, _) |
2536+
dep = rawDep.replaceAll("-", "/") and
2537+
name = result.getName().replaceAll("-", "/") and
2538+
(
2539+
name = dep
2540+
or
2541+
name.matches("codeql/%") and
2542+
name = dep + "/all"
2543+
)
25372544
)
25382545
}
25392546

0 commit comments

Comments
 (0)