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

4
lib/codeql.js generated
View file

@ -344,7 +344,7 @@ function getCodeQLForCmd(cmd) {
}).exec();
return JSON.parse(output);
},
databaseAnalyze: async function (databasePath, sarifFile, querySuite, memoryFlag, threadsFlag) {
databaseAnalyze: async function (databasePath, sarifFile, querySuite, memoryFlag, addSnippetsFlag, threadsFlag) {
await new toolrunnner.ToolRunner(cmd, [
'database',
'analyze',
@ -353,7 +353,7 @@ function getCodeQLForCmd(cmd) {
databasePath,
'--format=sarif-latest',
'--output=' + sarifFile,
'--no-sarif-add-snippets',
addSnippetsFlag,
...getExtraOptionsFromEnv(['database', 'analyze']),
querySuite
]).exec();