add optional workflow input to specify whether snippets are added to sarif output
This commit is contained in:
parent
75af0bf309
commit
77f767cb34
19 changed files with 79 additions and 20 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue