Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into aeisenberg/remove-q…
Browse files Browse the repository at this point in the history
…ueries
  • Loading branch information
Andrew Eisenberg committed Jun 16, 2022
2 parents 777b778 + df05122 commit 6db77ee
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 5 deletions.
6 changes: 6 additions & 0 deletions lib/config-utils.test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion lib/config-utils.test.js.map

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions lib/util.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion lib/util.js.map

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions src/config-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1919,3 +1919,23 @@ test(
"security-and-quality",
"0.0.1"
);
// Test that ML-powered queries are run on all platforms running `security-extended` on CodeQL
// CLI 2.9.3+.
test(
mlPoweredQueriesMacro,
"2.9.3",
true,
undefined,
"security-extended",
"~0.3.0"
);
// Test that ML-powered queries are run on all platforms running `security-and-quality` on CodeQL
// CLI 2.9.3+.
test(
mlPoweredQueriesMacro,
"2.9.3",
true,
undefined,
"security-and-quality",
"~0.3.0"
);
11 changes: 8 additions & 3 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -668,9 +668,14 @@ export const ML_POWERED_JS_QUERIES_PACK_NAME =
export async function getMlPoweredJsQueriesPack(
codeQL: CodeQL
): Promise<string> {
const version = (await codeQlVersionAbove(codeQL, "2.8.4"))
? "~0.2.0"
: "~0.1.0";
let version;
if (await codeQlVersionAbove(codeQL, "2.9.3")) {
version = `~0.3.0`;
} else if (await codeQlVersionAbove(codeQL, "2.8.4")) {
version = `~0.2.0`;
} else {
version = `~0.1.0`;
}
return prettyPrintPack({
name: ML_POWERED_JS_QUERIES_PACK_NAME,
version,
Expand Down

0 comments on commit 6db77ee

Please sign in to comment.