Check available languages
This commit is contained in:
parent
91700099ba
commit
4f51b8c47e
9 changed files with 60 additions and 8 deletions
13
lib/codeql.js
generated
13
lib/codeql.js
generated
|
|
@ -282,6 +282,7 @@ function setCodeQL(partialCodeql) {
|
|||
runAutobuild: resolveFunction(partialCodeql, "runAutobuild"),
|
||||
extractScannedLanguage: resolveFunction(partialCodeql, "extractScannedLanguage"),
|
||||
finalizeDatabase: resolveFunction(partialCodeql, "finalizeDatabase"),
|
||||
resolveLanguages: resolveFunction(partialCodeql, "resolveLanguages"),
|
||||
resolveQueries: resolveFunction(partialCodeql, "resolveQueries"),
|
||||
databaseAnalyze: resolveFunction(partialCodeql, "databaseAnalyze"),
|
||||
};
|
||||
|
|
@ -418,6 +419,18 @@ function getCodeQLForCmd(cmd) {
|
|||
databasePath,
|
||||
], error_matcher_1.errorMatchers);
|
||||
},
|
||||
async resolveLanguages() {
|
||||
const codeqlArgs = ["resolve", "languages", "--format=json"];
|
||||
let output = "";
|
||||
await new toolrunner.ToolRunner(cmd, codeqlArgs, {
|
||||
listeners: {
|
||||
stdout: (data) => {
|
||||
output += data.toString();
|
||||
},
|
||||
},
|
||||
}).exec();
|
||||
return JSON.parse(output);
|
||||
},
|
||||
async resolveQueries(queries, extraSearchPath) {
|
||||
const codeqlArgs = [
|
||||
"resolve",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue