Cleanup CodeQL DBs and output their location for later steps

This commit is contained in:
Edoardo Pirovano 2021-05-24 17:26:13 +01:00 committed by Edoardo Pirovano
parent cbdf0df97b
commit ddb83a462d
12 changed files with 113 additions and 14 deletions

10
lib/codeql.js generated
View file

@ -286,6 +286,7 @@ function setCodeQL(partialCodeql) {
resolveLanguages: resolveFunction(partialCodeql, "resolveLanguages"),
resolveQueries: resolveFunction(partialCodeql, "resolveQueries"),
databaseAnalyze: resolveFunction(partialCodeql, "databaseAnalyze"),
databaseCleanup: resolveFunction(partialCodeql, "databaseCleanup"),
};
return cachedCodeQL;
}
@ -498,6 +499,15 @@ function getCodeQLForCmd(cmd) {
}).exec();
return output;
},
async databaseCleanup(databasePath, cleanupLevel) {
const args = [
"database",
"cleanup",
databasePath,
`--mode=${cleanupLevel}`,
];
await new toolrunner.ToolRunner(cmd, args).exec();
},
};
}
/**