Skip to content

Commit b311eee

Browse files
committed
Add sarifRunPropertyFlag to databaseInterpretResults()
1 parent db53998 commit b311eee

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/analyze.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ export async function runQueries(
247247
): Promise<QueriesStatusReport> {
248248
const statusReport: QueriesStatusReport = {};
249249

250+
const sarifRunPropertyFlag = undefined;
251+
250252
const codeql = await getCodeQL(config.codeQLCmd);
251253
const queryFlags = [memoryFlag, threadsFlag];
252254

@@ -336,6 +338,7 @@ export async function runQueries(
336338
addSnippetsFlag,
337339
threadsFlag,
338340
enableDebugLogging ? "-vv" : "-v",
341+
sarifRunPropertyFlag,
339342
automationDetailsId,
340343
config,
341344
features,

src/codeql.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,7 @@ for (const {
839839
"",
840840
"",
841841
"-v",
842+
undefined,
842843
"",
843844
Object.assign({}, stubConfig, { gitHubVersion: githubVersion }),
844845
createFeatures([]),

src/codeql.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ export interface CodeQL {
166166
addSnippetsFlag: string,
167167
threadsFlag: string,
168168
verbosityFlag: string | undefined,
169+
sarifRunPropertyFlag: string | undefined,
169170
automationDetailsId: string | undefined,
170171
config: Config,
171172
features: FeatureEnablement,
@@ -834,6 +835,7 @@ export async function getCodeQLForCmd(
834835
addSnippetsFlag: string,
835836
threadsFlag: string,
836837
verbosityFlag: string,
838+
sarifRunPropertyFlag: string | undefined,
837839
automationDetailsId: string | undefined,
838840
config: Config,
839841
features: FeatureEnablement,
@@ -861,6 +863,9 @@ export async function getCodeQLForCmd(
861863
...(await getJobRunUuidSarifOptions(this)),
862864
...getExtraOptionsFromEnv(["database", "interpret-results"]),
863865
];
866+
if (sarifRunPropertyFlag !== undefined) {
867+
codeqlArgs.push(sarifRunPropertyFlag);
868+
}
864869
if (automationDetailsId !== undefined) {
865870
codeqlArgs.push("--sarif-category", automationDetailsId);
866871
}

0 commit comments

Comments
 (0)