mirror of
https://github.com/github/codeql-action.git
synced 2026-01-04 21:50:17 +08:00
Enable sub-language file coverage behind a ff
This commit is contained in:
@@ -20,6 +20,7 @@ import {
|
||||
Feature,
|
||||
FeatureEnablement,
|
||||
useCodeScanningConfigInCli,
|
||||
CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE,
|
||||
} from "./feature-flags";
|
||||
import { isTracedLanguage, Language } from "./languages";
|
||||
import { Logger } from "./logging";
|
||||
@@ -611,6 +612,19 @@ export async function getCodeQLForCmd(
|
||||
extraArgs.push("--calculate-language-specific-baseline");
|
||||
}
|
||||
|
||||
if (
|
||||
await features.getValue(Feature.SublanguageFileCoverageEnabled, this)
|
||||
) {
|
||||
extraArgs.push("--sublanguage-file-coverage");
|
||||
} else if (
|
||||
await util.codeQlVersionAbove(
|
||||
this,
|
||||
CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE,
|
||||
)
|
||||
) {
|
||||
extraArgs.push("--no-sublanguage-file-coverage");
|
||||
}
|
||||
|
||||
await runTool(
|
||||
cmd,
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user