mirror of
https://github.com/github/codeql-action.git
synced 2025-12-27 09:40:17 +08:00
Forward file baseline information enablement to CLI
This commit is contained in:
@@ -173,7 +173,8 @@ export interface CodeQL {
|
||||
addSnippetsFlag: string,
|
||||
threadsFlag: string,
|
||||
verbosityFlag: string | undefined,
|
||||
automationDetailsId: string | undefined
|
||||
automationDetailsId: string | undefined,
|
||||
featureEnablement: FeatureEnablement
|
||||
): Promise<string>;
|
||||
/**
|
||||
* Run 'codeql database print-baseline'.
|
||||
@@ -1066,7 +1067,8 @@ async function getCodeQLForCmd(
|
||||
addSnippetsFlag: string,
|
||||
threadsFlag: string,
|
||||
verbosityFlag: string,
|
||||
automationDetailsId: string | undefined
|
||||
automationDetailsId: string | undefined,
|
||||
featureEnablement: FeatureEnablement
|
||||
): Promise<string> {
|
||||
const codeqlArgs = [
|
||||
"database",
|
||||
@@ -1092,6 +1094,14 @@ async function getCodeQLForCmd(
|
||||
) {
|
||||
codeqlArgs.push("--sarif-category", automationDetailsId);
|
||||
}
|
||||
if (
|
||||
await featureEnablement.getValue(
|
||||
Feature.FileBaselineInformationEnabled,
|
||||
this
|
||||
)
|
||||
) {
|
||||
codeqlArgs.push("--sarif-add-baseline-file-info");
|
||||
}
|
||||
codeqlArgs.push(databasePath);
|
||||
if (querySuitePaths) {
|
||||
codeqlArgs.push(...querySuitePaths);
|
||||
|
||||
Reference in New Issue
Block a user