Remove analysisSummaryV2Default FF

This commit is contained in:
Henry Mercer
2025-10-22 12:25:25 +01:00
parent bab3f2b5f5
commit 3934593862
12 changed files with 0 additions and 142 deletions

View File

@@ -119703,12 +119703,6 @@ ${output}`
} else {
codeqlArgs.push("--no-sarif-include-diagnostics");
}
if (!isSupportedToolsFeature(
await this.getVersion(),
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
)) {
codeqlArgs.push("--new-analysis-summary");
}
codeqlArgs.push(databasePath);
if (querySuitePaths) {
codeqlArgs.push(...querySuitePaths);

6
lib/analyze-action.js generated
View File

@@ -93101,12 +93101,6 @@ ${output}`
} else {
codeqlArgs.push("--no-sarif-include-diagnostics");
}
if (!isSupportedToolsFeature(
await this.getVersion(),
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
)) {
codeqlArgs.push("--new-analysis-summary");
}
codeqlArgs.push(databasePath);
if (querySuitePaths) {
codeqlArgs.push(...querySuitePaths);

View File

@@ -80754,12 +80754,6 @@ ${output}`
} else {
codeqlArgs.push("--no-sarif-include-diagnostics");
}
if (!isSupportedToolsFeature(
await this.getVersion(),
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
)) {
codeqlArgs.push("--new-analysis-summary");
}
codeqlArgs.push(databasePath);
if (querySuitePaths) {
codeqlArgs.push(...querySuitePaths);

View File

@@ -131053,12 +131053,6 @@ ${output}`
} else {
codeqlArgs.push("--no-sarif-include-diagnostics");
}
if (!isSupportedToolsFeature(
await this.getVersion(),
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
)) {
codeqlArgs.push("--new-analysis-summary");
}
codeqlArgs.push(databasePath);
if (querySuitePaths) {
codeqlArgs.push(...querySuitePaths);

6
lib/init-action.js generated
View File

@@ -91391,12 +91391,6 @@ ${output}`
} else {
codeqlArgs.push("--no-sarif-include-diagnostics");
}
if (!isSupportedToolsFeature(
await this.getVersion(),
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
)) {
codeqlArgs.push("--new-analysis-summary");
}
codeqlArgs.push(databasePath);
if (querySuitePaths) {
codeqlArgs.push(...querySuitePaths);

View File

@@ -80453,12 +80453,6 @@ ${output}`
} else {
codeqlArgs.push("--no-sarif-include-diagnostics");
}
if (!isSupportedToolsFeature(
await this.getVersion(),
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
)) {
codeqlArgs.push("--new-analysis-summary");
}
codeqlArgs.push(databasePath);
if (querySuitePaths) {
codeqlArgs.push(...querySuitePaths);

View File

@@ -88326,12 +88326,6 @@ ${output}`
} else {
codeqlArgs.push("--no-sarif-include-diagnostics");
}
if (!isSupportedToolsFeature(
await this.getVersion(),
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
)) {
codeqlArgs.push("--new-analysis-summary");
}
codeqlArgs.push(databasePath);
if (querySuitePaths) {
codeqlArgs.push(...querySuitePaths);

6
lib/upload-lib.js generated
View File

@@ -90884,12 +90884,6 @@ ${output}`
} else {
codeqlArgs.push("--no-sarif-include-diagnostics");
}
if (!isSupportedToolsFeature(
await this.getVersion(),
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
)) {
codeqlArgs.push("--new-analysis-summary");
}
codeqlArgs.push(databasePath);
if (querySuitePaths) {
codeqlArgs.push(...querySuitePaths);

View File

@@ -91557,12 +91557,6 @@ ${output}`
} else {
codeqlArgs.push("--no-sarif-include-diagnostics");
}
if (!isSupportedToolsFeature(
await this.getVersion(),
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
)) {
codeqlArgs.push("--new-analysis-summary");
}
codeqlArgs.push(databasePath);
if (querySuitePaths) {
codeqlArgs.push(...querySuitePaths);

View File

@@ -36,7 +36,6 @@ import {
createTestConfig,
} from "./testing-utils";
import { ToolsDownloadStatusReport } from "./tools-download";
import { ToolsFeature } from "./tools-features";
import * as util from "./util";
import { initializeEnvironment } from "./util";
@@ -870,84 +869,6 @@ test("does not pass a qlconfig to the CLI when it is undefined", async (t: Execu
});
});
const NEW_ANALYSIS_SUMMARY_TEST_CASES = [
{
codeqlVersion: makeVersionInfo("2.15.0", {
[ToolsFeature.AnalysisSummaryV2IsDefault]: true,
}),
githubVersion: {
type: util.GitHubVariant.DOTCOM,
},
flagPassed: false,
negativeFlagPassed: false,
},
{
codeqlVersion: makeVersionInfo("2.15.0"),
githubVersion: {
type: util.GitHubVariant.DOTCOM,
},
flagPassed: true,
negativeFlagPassed: false,
},
{
codeqlVersion: makeVersionInfo("2.15.0"),
githubVersion: {
type: util.GitHubVariant.GHES,
version: "3.10.0",
},
flagPassed: true,
negativeFlagPassed: false,
},
];
for (const {
codeqlVersion,
flagPassed,
githubVersion,
negativeFlagPassed,
} of NEW_ANALYSIS_SUMMARY_TEST_CASES) {
test(`database interpret-results passes ${
flagPassed
? "--new-analysis-summary"
: negativeFlagPassed
? "--no-new-analysis-summary"
: "nothing"
} for CodeQL version ${JSON.stringify(codeqlVersion)} and ${
util.GitHubVariant[githubVersion.type]
} ${githubVersion.version ? ` ${githubVersion.version}` : ""}`, async (t) => {
const runnerConstructorStub = stubToolRunnerConstructor();
const codeqlObject = await codeql.getCodeQLForTesting();
sinon.stub(codeqlObject, "getVersion").resolves(codeqlVersion);
// io throws because of the test CodeQL object.
sinon.stub(io, "which").resolves("");
await codeqlObject.databaseInterpretResults(
"",
[],
"",
"",
"",
"-v",
undefined,
"",
Object.assign({}, stubConfig, { gitHubVersion: githubVersion }),
createFeatures([]),
);
const actualArgs = runnerConstructorStub.firstCall.args[1] as string[];
t.is(
actualArgs.includes("--new-analysis-summary"),
flagPassed,
`--new-analysis-summary should${flagPassed ? "" : "n't"} be passed`,
);
t.is(
actualArgs.includes("--no-new-analysis-summary"),
negativeFlagPassed,
`--no-new-analysis-summary should${
negativeFlagPassed ? "" : "n't"
} be passed`,
);
});
}
test("runTool summarizes several fatal errors", async (t) => {
const heapError =
"A fatal error occurred: Evaluator heap must be at least 384.00 MiB";

View File

@@ -860,14 +860,6 @@ export async function getCodeQLForCmd(
} else {
codeqlArgs.push("--no-sarif-include-diagnostics");
}
if (
!isSupportedToolsFeature(
await this.getVersion(),
ToolsFeature.AnalysisSummaryV2IsDefault,
)
) {
codeqlArgs.push("--new-analysis-summary");
}
codeqlArgs.push(databasePath);
if (querySuitePaths) {
codeqlArgs.push(...querySuitePaths);

View File

@@ -3,7 +3,6 @@ import * as semver from "semver";
import type { VersionInfo } from "./codeql";
export enum ToolsFeature {
AnalysisSummaryV2IsDefault = "analysisSummaryV2Default",
BuiltinExtractorsSpecifyDefaultQueries = "builtinExtractorsSpecifyDefaultQueries",
DatabaseInterpretResultsSupportsSarifRunProperty = "databaseInterpretResultsSupportsSarifRunProperty",
ForceOverwrite = "forceOverwrite",