add optional workflow input to specify whether snippets are added to sarif output

This commit is contained in:
Nick Fyson
2020-09-10 17:18:02 +01:00
parent 75af0bf309
commit 77f767cb34
19 changed files with 79 additions and 20 deletions

View File

@@ -79,6 +79,7 @@ export interface CodeQL {
sarifFile: string,
querySuite: string,
memoryFlag: string,
addSnippetsFlag: string,
threadsFlag: string): Promise<void>;
}
@@ -467,6 +468,7 @@ function getCodeQLForCmd(cmd: string): CodeQL {
sarifFile: string,
querySuite: string,
memoryFlag: string,
addSnippetsFlag: string,
threadsFlag: string) {
await new toolrunnner.ToolRunner(cmd, [
@@ -477,7 +479,7 @@ function getCodeQLForCmd(cmd: string): CodeQL {
databasePath,
'--format=sarif-latest',
'--output=' + sarifFile,
'--no-sarif-add-snippets',
addSnippetsFlag,
...getExtraOptionsFromEnv(['database', 'analyze']),
querySuite
]).exec();