Forward category input to codeql cli

This commit is contained in:
David Verdeguer 2021-05-03 19:41:53 +02:00
parent 519d0771c7
commit c93cbc943a
15 changed files with 33 additions and 17 deletions

View file

@ -94,7 +94,8 @@ export interface CodeQL {
querySuite: string,
memoryFlag: string,
addSnippetsFlag: string,
threadsFlag: string
threadsFlag: string,
automationDetailsId: string | undefined
): Promise<void>;
}
@ -671,7 +672,8 @@ function getCodeQLForCmd(cmd: string): CodeQL {
querySuite: string,
memoryFlag: string,
addSnippetsFlag: string,
threadsFlag: string
threadsFlag: string,
automationDetailsId: string | undefined
) {
const args = [
"database",
@ -689,6 +691,9 @@ function getCodeQLForCmd(cmd: string): CodeQL {
if (extraSearchPath !== undefined) {
args.push("--search-path", extraSearchPath);
}
if (automationDetailsId !== undefined) {
args.push("--sarif-category", automationDetailsId);
}
args.push(querySuite);
await new toolrunner.ToolRunner(cmd, args).exec();
},