Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th

## [UNRELEASED]

No user facing changes.
- The experimental `quality-queries` input that was deprecated in CodeQL Action 3.30.2 has now been removed.

## 4.32.1 - 02 Feb 2026

Expand Down
3 changes: 0 additions & 3 deletions init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ inputs:
queries:
description: Comma-separated list of additional queries to run. By default, this overrides the same setting in a configuration file; prefix with "+" to use both sets of queries.
required: false
quality-queries:
description: '[Internal] DEPRECATED. Comma-separated list of code quality queries to run.'
required: false
packs:
description: >-
Comma-separated list of packs to run. Reference a pack in the format `scope/name[@version]`. If `version` is not
Expand Down
9 changes: 3 additions & 6 deletions lib/init-action.js

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

9 changes: 5 additions & 4 deletions src/analyses.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@ test("getAnalysisKinds - returns expected analysis kinds for `analysis-kinds` in
t.assert(result.includes(AnalysisKind.CodeQuality));
});

test("getAnalysisKinds - includes `code-quality` when deprecated `quality-queries` input is used", async (t) => {
test("getAnalysisKinds - throws ConfigurationError when deprecated `quality-queries` input is used", async (t) => {
const requiredInputStub = sinon.stub(actionsUtil, "getRequiredInput");
requiredInputStub.withArgs("analysis-kinds").returns("code-scanning");
const optionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
optionalInputStub.withArgs("quality-queries").returns("code-quality");
const result = await getAnalysisKinds(getRunnerLogger(true), true);
t.assert(result.includes(AnalysisKind.CodeScanning));
t.assert(result.includes(AnalysisKind.CodeQuality));

await t.throwsAsync(getAnalysisKinds(getRunnerLogger(true), true), {
instanceOf: ConfigurationError,
});
});

test("getAnalysisKinds - throws if `analysis-kinds` input is invalid", async (t) => {
Expand Down
22 changes: 5 additions & 17 deletions src/analyses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,16 @@ let cachedAnalysisKinds: AnalysisKind[] | undefined;

/**
* Initialises the analysis kinds for the analysis based on the `analysis-kinds` input.
* This function will also use the deprecated `quality-queries` input as an indicator to enable `code-quality`.
* If the `analysis-kinds` input cannot be parsed, a `ConfigurationError` is thrown.
*
* @param logger The logger to use.
* @param _logger The logger to use.
* @param skipCache For testing, whether to ignore the cached values (default: false).
*
* @returns The array of enabled analysis kinds.
* @throws A `ConfigurationError` if the `analysis-kinds` input cannot be parsed.
*/
export async function getAnalysisKinds(
logger: Logger,
_logger: Logger,
skipCache: boolean = false,
): Promise<AnalysisKind[]> {
if (!skipCache && cachedAnalysisKinds !== undefined) {
Expand All @@ -71,26 +70,15 @@ export async function getAnalysisKinds(
getRequiredInput("analysis-kinds"),
);

// Warn that `quality-queries` is deprecated if there is an argument for it.
// Throw if there is an argument for `quality-queries`.
const qualityQueriesInput = getOptionalInput("quality-queries");

if (qualityQueriesInput !== undefined) {
logger.warning(
"The `quality-queries` input is deprecated and will be removed in a future version of the CodeQL Action. " +
"Use the `analysis-kinds` input to configure different analysis kinds instead.",
throw new ConfigurationError(
"The `quality-queries` input is no longer supported. Use `analysis-kinds` instead.",
);
}

// For backwards compatibility, add Code Quality to the enabled analysis kinds
// if an input to `quality-queries` was specified. We should remove this once
// `quality-queries` is no longer used.
if (
!cachedAnalysisKinds.includes(AnalysisKind.CodeQuality) &&
qualityQueriesInput !== undefined
) {
cachedAnalysisKinds.push(AnalysisKind.CodeQuality);
}

return cachedAnalysisKinds;
}

Expand Down
Loading