Skip to content

Commit ac35d7a

Browse files
authoredAug 14, 2023
Merge pull request #1835 from github/henrymercer/language-baseline-config
Enable language specific baselines via feature flag
2 parents 9a510d9 + d03c744 commit ac35d7a

File tree

7 files changed

+35
-3
lines changed

7 files changed

+35
-3
lines changed
 

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
77
- Log a warning if the amount of available disk space runs low during a code scanning run. [#1825](https://github.com/github/codeql-action/pull/1825)
88
- When downloading CodeQL bundle version 2.13.4 and later, cache these bundles in the Actions tool cache using a simpler version number. [#1832](https://github.com/github/codeql-action/pull/1832)
99
- Fix an issue that first appeared in CodeQL Action v2.21.2 that prevented CodeQL invocations from being logged. [#1833](https://github.com/github/codeql-action/pull/1833)
10+
- We are rolling out a feature in August 2023 that will improve the quality of file coverage information. [#1835](https://github.com/github/codeql-action/pull/1835)
1011

1112
## 2.21.3 - 08 Aug 2023
1213

‎lib/codeql.js

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/codeql.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/feature-flags.js

+11-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/feature-flags.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/codeql.ts

+7
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,13 @@ export async function getCodeQLForCmd(
574574
) {
575575
extraArgs.push(`--qlconfig-file=${qlconfigFile}`);
576576
}
577+
578+
if (
579+
await features.getValue(Feature.LanguageBaselineConfigEnabled, this)
580+
) {
581+
extraArgs.push("--calculate-language-specific-baseline");
582+
}
583+
577584
await runTool(
578585
cmd,
579586
[

‎src/feature-flags.ts

+11
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ export const CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = "2.14.0";
2828
*/
2929
export const CODEQL_VERSION_INTRA_LAYER_PARALLELISM = "2.14.0";
3030

31+
/**
32+
* Versions 2.14.2+ of the CodeQL CLI support language-specific baseline configuration.
33+
*/
34+
export const CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = "2.14.2";
35+
3136
export interface CodeQLDefaultVersionInfo {
3237
cliVersion: string;
3338
tagName: string;
@@ -55,6 +60,7 @@ export enum Feature {
5560
DisablePythonDependencyInstallationEnabled = "disable_python_dependency_installation_enabled",
5661
EvaluatorIntraLayerParallelismEnabled = "evaluator_intra_layer_parallelism_enabled",
5762
ExportDiagnosticsEnabled = "export_diagnostics_enabled",
63+
LanguageBaselineConfigEnabled = "language_baseline_config_enabled",
5864
MlPoweredQueriesEnabled = "ml_powered_queries_enabled",
5965
QaTelemetryEnabled = "qa_telemetry_enabled",
6066
ScalingReservedRamEnabled = "scaling_reserved_ram_enabled",
@@ -95,6 +101,11 @@ export const featureConfig: Record<
95101
minimumVersion: "2.12.4",
96102
defaultValue: true,
97103
},
104+
[Feature.LanguageBaselineConfigEnabled]: {
105+
envVar: "CODEQL_ACTION_LANGUAGE_BASELINE_CONFIG",
106+
minimumVersion: CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG,
107+
defaultValue: false,
108+
},
98109
[Feature.MlPoweredQueriesEnabled]: {
99110
envVar: "CODEQL_ML_POWERED_QUERIES",
100111
minimumVersion: undefined,

0 commit comments

Comments
 (0)
Please sign in to comment.