Rename new analysis summary feature flag

This commit is contained in:
Henry Mercer 2023-08-11 15:51:44 +01:00
parent 2160dd3b55
commit 9a510d9b07
12 changed files with 28 additions and 28 deletions

View file

@ -389,7 +389,7 @@ export async function runQueries(
}
if (
!(await features.getValue(Feature.NewAnalysisSummaryEnabled, codeql))
!(await features.getValue(Feature.AnalysisSummaryV2Enabled, codeql))
) {
await runPrintLinesOfCode(language);
}

View file

@ -1137,7 +1137,7 @@ for (const {
"-v",
"",
stubConfig,
createFeatures(featureEnabled ? [Feature.NewAnalysisSummaryEnabled] : []),
createFeatures(featureEnabled ? [Feature.AnalysisSummaryV2Enabled] : []),
getRunnerLogger(true),
);
t.is(

View file

@ -11,7 +11,7 @@ import type { Config } from "./config-utils";
import { EnvVar } from "./environment";
import {
CODEQL_VERSION_INTRA_LAYER_PARALLELISM,
CODEQL_VERSION_NEW_ANALYSIS_SUMMARY,
CODEQL_VERSION_ANALYSIS_SUMMARY_V2,
CodeQLDefaultVersionInfo,
Feature,
FeatureEnablement,
@ -856,10 +856,10 @@ export async function getCodeQLForCmd(
} else if (await util.codeQlVersionAbove(this, "2.12.4")) {
codeqlArgs.push("--no-sarif-include-diagnostics");
}
if (await features.getValue(Feature.NewAnalysisSummaryEnabled, this)) {
if (await features.getValue(Feature.AnalysisSummaryV2Enabled, this)) {
codeqlArgs.push("--new-analysis-summary");
} else if (
await util.codeQlVersionAbove(this, CODEQL_VERSION_NEW_ANALYSIS_SUMMARY)
await util.codeQlVersionAbove(this, CODEQL_VERSION_ANALYSIS_SUMMARY_V2)
) {
codeqlArgs.push("--no-new-analysis-summary");
}

View file

@ -21,7 +21,7 @@ export const CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = "2.13.4";
/**
* Versions 2.14.0+ of the CodeQL CLI support new analysis summaries.
*/
export const CODEQL_VERSION_NEW_ANALYSIS_SUMMARY = "2.14.0";
export const CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = "2.14.0";
/**
* Versions 2.14.0+ of the CodeQL CLI support intra-layer parallelism (aka fine-grained parallelism) options.
@ -48,6 +48,7 @@ export interface FeatureEnablement {
* Each value of this enum should end with `_enabled`.
*/
export enum Feature {
AnalysisSummaryV2Enabled = "analysis_summary_v2_enabled",
CliConfigFileEnabled = "cli_config_file_enabled",
CodeqlJavaLombokEnabled = "codeql_java_lombok_enabled",
DisableKotlinAnalysisEnabled = "disable_kotlin_analysis_enabled",
@ -55,7 +56,6 @@ export enum Feature {
EvaluatorIntraLayerParallelismEnabled = "evaluator_intra_layer_parallelism_enabled",
ExportDiagnosticsEnabled = "export_diagnostics_enabled",
MlPoweredQueriesEnabled = "ml_powered_queries_enabled",
NewAnalysisSummaryEnabled = "new_analysis_summary_enabled",
QaTelemetryEnabled = "qa_telemetry_enabled",
ScalingReservedRamEnabled = "scaling_reserved_ram_enabled",
UploadFailedSarifEnabled = "upload_failed_sarif_enabled",
@ -65,6 +65,11 @@ export const featureConfig: Record<
Feature,
{ envVar: string; minimumVersion: string | undefined; defaultValue: boolean }
> = {
[Feature.AnalysisSummaryV2Enabled]: {
envVar: "CODEQL_ACTION_ANALYSIS_SUMMARY_V2",
minimumVersion: CODEQL_VERSION_ANALYSIS_SUMMARY_V2,
defaultValue: false,
},
[Feature.CodeqlJavaLombokEnabled]: {
envVar: "CODEQL_JAVA_LOMBOK",
minimumVersion: "2.14.0",
@ -95,11 +100,6 @@ export const featureConfig: Record<
minimumVersion: undefined,
defaultValue: false,
},
[Feature.NewAnalysisSummaryEnabled]: {
envVar: "CODEQL_ACTION_NEW_ANALYSIS_SUMMARY",
minimumVersion: CODEQL_VERSION_NEW_ANALYSIS_SUMMARY,
defaultValue: false,
},
[Feature.QaTelemetryEnabled]: {
envVar: "CODEQL_ACTION_QA_TELEMETRY",
minimumVersion: undefined,