Skip to content

Commit d74701c

Browse files
committed
Drive-by cleanup: Always use --cache-cleanup
1 parent d05b50b commit d74701c

10 files changed

+10
-74
lines changed

lib/analyze-action-post.js

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

lib/analyze-action.js

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

lib/autobuild-action.js

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

lib/init-action-post.js

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

lib/init-action.js

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

lib/resolve-environment-action.js

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

lib/setup-codeql-action.js

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

lib/upload-lib.js

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

lib/upload-sarif-action.js

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

src/codeql.ts

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -300,19 +300,6 @@ const GHES_MOST_RECENT_DEPRECATION_DATE = "2025-06-19";
300300
/** The CLI verbosity level to use for extraction in debug mode. */
301301
const EXTRACTION_DEBUG_MODE_VERBOSITY = "progress++";
302302

303-
/*
304-
* Deprecated in favor of ToolsFeature.
305-
*
306-
* Versions of CodeQL that version-flag certain functionality in the Action.
307-
* For convenience, please keep these in descending order. Once a version
308-
* flag is older than the oldest supported version above, it may be removed.
309-
*/
310-
311-
/**
312-
* Versions 2.17.1+ of the CodeQL CLI support the `--cache-cleanup` option.
313-
*/
314-
const CODEQL_VERSION_CACHE_CLEANUP = "2.17.1";
315-
316303
/**
317304
* Set up CodeQL CLI access.
318305
*
@@ -891,19 +878,13 @@ async function getCodeQLForCmd(
891878
config: Config,
892879
cleanupLevel: CleanupLevel,
893880
): Promise<void> {
894-
const cacheCleanupFlag = (await util.codeQlVersionAtLeast(
895-
this,
896-
CODEQL_VERSION_CACHE_CLEANUP,
897-
))
898-
? "--cache-cleanup"
899-
: "--mode";
900881
for (const language of config.languages) {
901882
const databasePath = util.getCodeQLDatabasePath(config, language);
902883
const codeqlArgs = [
903884
"database",
904885
"cleanup",
905886
databasePath,
906-
`${cacheCleanupFlag}=${cleanupLevel}`,
887+
`--cache-cleanup=${cleanupLevel}`,
907888
...getExtraOptionsFromEnv(["database", "cleanup"]),
908889
];
909890
await runCli(cmd, codeqlArgs);

0 commit comments

Comments
 (0)