use ATM pack v0.4.0 for CLI v2.11.3 and above
This commit is contained in:
parent
0e5b04a79a
commit
01c4458f0c
6 changed files with 36 additions and 4 deletions
6
lib/config-utils.test.js
generated
6
lib/config-utils.test.js
generated
|
|
@ -1032,6 +1032,12 @@ const mlPoweredQueriesMacro = ava_1.default.macro({
|
|||
// Test that ML-powered queries are run on all platforms running `security-and-quality` on CodeQL
|
||||
// CLI 2.9.3+.
|
||||
(0, ava_1.default)(mlPoweredQueriesMacro, "2.9.3", true, undefined, "security-and-quality", "~0.3.0");
|
||||
// Test that ML-powered queries are run on all platforms running `security-extended` on CodeQL
|
||||
// CLI 2.11.3+.
|
||||
(0, ava_1.default)(mlPoweredQueriesMacro, "2.11.3", true, undefined, "security-extended", "~0.4.0");
|
||||
// Test that ML-powered queries are run on all platforms running `security-and-quality` on CodeQL
|
||||
// CLI 2.11.3+.
|
||||
(0, ava_1.default)(mlPoweredQueriesMacro, "2.11.3", true, undefined, "security-and-quality", "~0.4.0");
|
||||
const calculateAugmentationMacro = ava_1.default.macro({
|
||||
exec: async (t, _title, rawPacksInput, rawQueriesInput, languages, expectedAugmentationProperties) => {
|
||||
const actualAugmentationProperties = configUtils.calculateAugmentation(rawPacksInput, rawQueriesInput, languages);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
5
lib/util.js
generated
5
lib/util.js
generated
|
|
@ -553,7 +553,10 @@ exports.ML_POWERED_JS_QUERIES_PACK_NAME = "codeql/javascript-experimental-atm-qu
|
|||
*/
|
||||
async function getMlPoweredJsQueriesPack(codeQL) {
|
||||
let version;
|
||||
if (await codeQlVersionAbove(codeQL, "2.9.3")) {
|
||||
if (await codeQlVersionAbove(codeQL, "2.11.3")) {
|
||||
version = "~0.4.0";
|
||||
}
|
||||
else if (await codeQlVersionAbove(codeQL, "2.9.3")) {
|
||||
version = `~0.3.0`;
|
||||
}
|
||||
else if (await codeQlVersionAbove(codeQL, "2.8.4")) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -2059,6 +2059,27 @@ test(
|
|||
"security-and-quality",
|
||||
"~0.3.0"
|
||||
);
|
||||
// Test that ML-powered queries are run on all platforms running `security-extended` on CodeQL
|
||||
// CLI 2.11.3+.
|
||||
test(
|
||||
mlPoweredQueriesMacro,
|
||||
"2.11.3",
|
||||
true,
|
||||
undefined,
|
||||
"security-extended",
|
||||
"~0.4.0"
|
||||
);
|
||||
|
||||
// Test that ML-powered queries are run on all platforms running `security-and-quality` on CodeQL
|
||||
// CLI 2.11.3+.
|
||||
test(
|
||||
mlPoweredQueriesMacro,
|
||||
"2.11.3",
|
||||
true,
|
||||
undefined,
|
||||
"security-and-quality",
|
||||
"~0.4.0"
|
||||
);
|
||||
|
||||
const calculateAugmentationMacro = test.macro({
|
||||
exec: async (
|
||||
|
|
|
|||
|
|
@ -672,7 +672,9 @@ export async function getMlPoweredJsQueriesPack(
|
|||
codeQL: CodeQL
|
||||
): Promise<string> {
|
||||
let version;
|
||||
if (await codeQlVersionAbove(codeQL, "2.9.3")) {
|
||||
if (await codeQlVersionAbove(codeQL, "2.11.3")) {
|
||||
version = "~0.4.0";
|
||||
} else if (await codeQlVersionAbove(codeQL, "2.9.3")) {
|
||||
version = `~0.3.0`;
|
||||
} else if (await codeQlVersionAbove(codeQL, "2.8.4")) {
|
||||
version = `~0.2.0`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue