mirror of
https://github.com/github/codeql-action.git
synced 2026-04-27 01:08:46 +00:00
Enable language specific baselines via feature flag
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
Feature,
|
||||
FeatureEnablement,
|
||||
useCodeScanningConfigInCli,
|
||||
CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG,
|
||||
} from "./feature-flags";
|
||||
import { isTracedLanguage, Language } from "./languages";
|
||||
import { Logger } from "./logging";
|
||||
@@ -574,6 +575,20 @@ export async function getCodeQLForCmd(
|
||||
) {
|
||||
extraArgs.push(`--qlconfig-file=${qlconfigFile}`);
|
||||
}
|
||||
|
||||
if (
|
||||
await features.getValue(Feature.LanguageBaselineConfigEnabled, this)
|
||||
) {
|
||||
extraArgs.push("--calculate-language-specific-baseline");
|
||||
} else if (
|
||||
await util.codeQlVersionAbove(
|
||||
this,
|
||||
CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG,
|
||||
)
|
||||
) {
|
||||
extraArgs.push("--no-calculate-language-specific-baseline");
|
||||
}
|
||||
|
||||
await runTool(
|
||||
cmd,
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user