Enable language specific baselines via feature flag
This commit is contained in:
parent
9a510d9b07
commit
8a7b2e9c9b
6 changed files with 45 additions and 3 deletions
|
|
@ -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,
|
||||
[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue