Merge pull request #9110 from erik-krogh/qlPackAll

QL: add implicit -all to a query pack to match the CodeQL pack resolution
This commit is contained in:
Erik Krogh Kristensen
2022-05-10 23:41:26 +02:00
committed by GitHub

View File

@@ -2532,8 +2532,15 @@ module YAML {
* Gets a QLPack that this QLPack depends on.
*/
QLPack getADependency() {
exists(string name | this.hasDependency(name, _) |
result.getName().replaceAll("-", "/") = name.replaceAll("-", "/")
exists(string rawDep, string dep, string name | this.hasDependency(rawDep, _) |
dep = rawDep.replaceAll("-", "/") and
name = result.getName().replaceAll("-", "/") and
(
name = dep
or
name.matches("codeql/%") and
name = dep + "/all"
)
)
}