Add external git repositories to search path for custom queries
This commit is contained in:
parent
1fa35632f2
commit
578f9fc99e
15 changed files with 244 additions and 100 deletions
12
lib/codeql.js
generated
12
lib/codeql.js
generated
|
|
@ -427,8 +427,8 @@ function getCodeQLForCmd(cmd) {
|
|||
}).exec();
|
||||
return JSON.parse(output);
|
||||
},
|
||||
async databaseAnalyze(databasePath, sarifFile, querySuite, memoryFlag, addSnippetsFlag, threadsFlag) {
|
||||
await new toolrunner.ToolRunner(cmd, [
|
||||
async databaseAnalyze(databasePath, sarifFile, extraSearchPath, querySuite, memoryFlag, addSnippetsFlag, threadsFlag) {
|
||||
const args = [
|
||||
"database",
|
||||
"analyze",
|
||||
memoryFlag,
|
||||
|
|
@ -440,8 +440,12 @@ function getCodeQLForCmd(cmd) {
|
|||
`--output=${sarifFile}`,
|
||||
addSnippetsFlag,
|
||||
...getExtraOptionsFromEnv(["database", "analyze"]),
|
||||
querySuite,
|
||||
]).exec();
|
||||
];
|
||||
if (extraSearchPath !== undefined) {
|
||||
args.push("--search-path", extraSearchPath);
|
||||
}
|
||||
args.push(querySuite);
|
||||
await new toolrunner.ToolRunner(cmd, args).exec();
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue