Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/npm-9fb391b1e9
Browse files Browse the repository at this point in the history
  • Loading branch information
aeisenberg committed Mar 11, 2024
2 parents 54fce28 + 69e120d commit fb87ce3
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Note that the only difference between `v2` and `v3` of the CodeQL Action is the

## [UNRELEASED]

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

## 3.24.6 - 29 Feb 2024

Expand Down
14 changes: 12 additions & 2 deletions lib/codeql.js

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

2 changes: 1 addition & 1 deletion lib/codeql.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions lib/defaults.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"bundleVersion": "codeql-bundle-v2.16.3",
"cliVersion": "2.16.3",
"priorBundleVersion": "codeql-bundle-v2.16.2",
"priorCliVersion": "2.16.2"
"bundleVersion": "codeql-bundle-v2.16.4",
"cliVersion": "2.16.4",
"priorBundleVersion": "codeql-bundle-v2.16.3",
"priorCliVersion": "2.16.3"
}
20 changes: 18 additions & 2 deletions src/codeql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,11 @@ export const CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = "2.15.0";
*/
export const CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE = "2.15.0";

/**
* Versions 2.15.2+ of the CodeQL CLI support the `--sarif-include-query-help` option.
*/
const CODEQL_VERSION_INCLUDE_QUERY_HELP = "2.15.2";

/**
* Set up CodeQL CLI access.
*
Expand Down Expand Up @@ -855,9 +860,9 @@ export async function getCodeQLForCmd(
"--print-diagnostics-summary",
"--print-metrics-summary",
"--sarif-add-baseline-file-info",
"--sarif-add-query-help",
"--sarif-group-rules-by-pack",
...(await getCodeScanningConfigExportArguments(config, this)),
"--sarif-group-rules-by-pack",
...(await getCodeScanningQueryHelpArguments(this)),
...getExtraOptionsFromEnv(["database", "interpret-results"]),
];
if (automationDetailsId !== undefined) {
Expand Down Expand Up @@ -1389,3 +1394,14 @@ async function isSublanguageFileCoverageEnabled(
))
);
}

async function getCodeScanningQueryHelpArguments(
codeql: CodeQL,
): Promise<string[]> {
if (
await util.codeQlVersionAbove(codeql, CODEQL_VERSION_INCLUDE_QUERY_HELP)
) {
return ["--sarif-include-query-help=always"];
}
return ["--sarif-add-query-help"];
}
8 changes: 4 additions & 4 deletions src/defaults.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"bundleVersion": "codeql-bundle-v2.16.3",
"cliVersion": "2.16.3",
"priorBundleVersion": "codeql-bundle-v2.16.2",
"priorCliVersion": "2.16.2"
"bundleVersion": "codeql-bundle-v2.16.4",
"cliVersion": "2.16.4",
"priorBundleVersion": "codeql-bundle-v2.16.3",
"priorCliVersion": "2.16.3"
}

0 comments on commit fb87ce3

Please sign in to comment.