Add configuration option to set CodeQL DB location

This commit is contained in:
Edoardo Pirovano 2021-05-17 10:35:09 +01:00 committed by Edoardo Pirovano
parent feccdcb876
commit 79c79f1be5
38 changed files with 133 additions and 79 deletions

11
lib/util.js generated
View file

@ -153,18 +153,11 @@ function getThreadsFlag(userInput, logger) {
return `--threads=${numThreads}`;
}
exports.getThreadsFlag = getThreadsFlag;
/**
* Get the directory where CodeQL databases should be placed.
*/
function getCodeQLDatabasesDir(tempDir) {
return path.resolve(tempDir, "codeql_databases");
}
exports.getCodeQLDatabasesDir = getCodeQLDatabasesDir;
/**
* Get the path where the CodeQL database for the given language lives.
*/
function getCodeQLDatabasePath(tempDir, language) {
return path.resolve(getCodeQLDatabasesDir(tempDir), language);
function getCodeQLDatabasePath(config, language) {
return path.resolve(config.dbLocation, language);
}
exports.getCodeQLDatabasePath = getCodeQLDatabasePath;
/**