Skip to content

Commit

Permalink
Merge pull request #1834 from github/henrymercer/analysis-summary-v2-ff
Browse files Browse the repository at this point in the history
Rename new analysis summary feature flag
  • Loading branch information
henrymercer committed Aug 14, 2023
2 parents 2160dd3 + 9a510d9 commit ac49314
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion lib/analyze.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/analyze.js.map

Large diffs are not rendered by default.

4 changes: 2 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.

2 changes: 1 addition & 1 deletion lib/codeql.test.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.test.js.map

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions lib/feature-flags.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/feature-flags.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ export async function runQueries(
}

if (
!(await features.getValue(Feature.NewAnalysisSummaryEnabled, codeql))
!(await features.getValue(Feature.AnalysisSummaryV2Enabled, codeql))
) {
await runPrintLinesOfCode(language);
}
Expand Down
2 changes: 1 addition & 1 deletion src/codeql.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ for (const {
"-v",
"",
stubConfig,
createFeatures(featureEnabled ? [Feature.NewAnalysisSummaryEnabled] : []),
createFeatures(featureEnabled ? [Feature.AnalysisSummaryV2Enabled] : []),
getRunnerLogger(true),
);
t.is(
Expand Down
6 changes: 3 additions & 3 deletions src/codeql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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");
}
Expand Down
14 changes: 7 additions & 7 deletions src/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -48,14 +48,14 @@ 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",
DisablePythonDependencyInstallationEnabled = "disable_python_dependency_installation_enabled",
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",
Expand All @@ -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",
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit ac49314

Please sign in to comment.