Skip to content

Commit fb87ce3

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/npm-9fb391b1e9
2 parents 54fce28 + 69e120d commit fb87ce3

6 files changed

Lines changed: 40 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Note that the only difference between `v2` and `v3` of the CodeQL Action is the
66

77
## [UNRELEASED]
88

9-
No user facing changes.
9+
- Update default CodeQL bundle version to 2.16.4. [#2185](https://github.com/github/codeql-action/pull/2185)
1010

1111
## 3.24.6 - 29 Feb 2024
1212

lib/codeql.js

Lines changed: 12 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/defaults.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"bundleVersion": "codeql-bundle-v2.16.3",
3-
"cliVersion": "2.16.3",
4-
"priorBundleVersion": "codeql-bundle-v2.16.2",
5-
"priorCliVersion": "2.16.2"
2+
"bundleVersion": "codeql-bundle-v2.16.4",
3+
"cliVersion": "2.16.4",
4+
"priorBundleVersion": "codeql-bundle-v2.16.3",
5+
"priorCliVersion": "2.16.3"
66
}

src/codeql.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,11 @@ export const CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = "2.15.0";
334334
*/
335335
export const CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE = "2.15.0";
336336

337+
/**
338+
* Versions 2.15.2+ of the CodeQL CLI support the `--sarif-include-query-help` option.
339+
*/
340+
const CODEQL_VERSION_INCLUDE_QUERY_HELP = "2.15.2";
341+
337342
/**
338343
* Set up CodeQL CLI access.
339344
*
@@ -855,9 +860,9 @@ export async function getCodeQLForCmd(
855860
"--print-diagnostics-summary",
856861
"--print-metrics-summary",
857862
"--sarif-add-baseline-file-info",
858-
"--sarif-add-query-help",
859-
"--sarif-group-rules-by-pack",
860863
...(await getCodeScanningConfigExportArguments(config, this)),
864+
"--sarif-group-rules-by-pack",
865+
...(await getCodeScanningQueryHelpArguments(this)),
861866
...getExtraOptionsFromEnv(["database", "interpret-results"]),
862867
];
863868
if (automationDetailsId !== undefined) {
@@ -1389,3 +1394,14 @@ async function isSublanguageFileCoverageEnabled(
13891394
))
13901395
);
13911396
}
1397+
1398+
async function getCodeScanningQueryHelpArguments(
1399+
codeql: CodeQL,
1400+
): Promise<string[]> {
1401+
if (
1402+
await util.codeQlVersionAbove(codeql, CODEQL_VERSION_INCLUDE_QUERY_HELP)
1403+
) {
1404+
return ["--sarif-include-query-help=always"];
1405+
}
1406+
return ["--sarif-add-query-help"];
1407+
}

src/defaults.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"bundleVersion": "codeql-bundle-v2.16.3",
3-
"cliVersion": "2.16.3",
4-
"priorBundleVersion": "codeql-bundle-v2.16.2",
5-
"priorCliVersion": "2.16.2"
2+
"bundleVersion": "codeql-bundle-v2.16.4",
3+
"cliVersion": "2.16.4",
4+
"priorBundleVersion": "codeql-bundle-v2.16.3",
5+
"priorCliVersion": "2.16.3"
66
}

0 commit comments

Comments
 (0)