Add configuration option to set CodeQL DB location
This commit is contained in:
parent
feccdcb876
commit
79c79f1be5
38 changed files with 133 additions and 79 deletions
12
src/util.ts
12
src/util.ts
|
|
@ -8,6 +8,7 @@ import * as semver from "semver";
|
|||
|
||||
import { getApiClient, GitHubApiDetails } from "./api-client";
|
||||
import * as apiCompatibility from "./api-compatibility.json";
|
||||
import { Config } from "./config-utils";
|
||||
import { Language } from "./languages";
|
||||
import { Logger } from "./logging";
|
||||
|
||||
|
|
@ -171,18 +172,11 @@ export function getThreadsFlag(
|
|||
return `--threads=${numThreads}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the directory where CodeQL databases should be placed.
|
||||
*/
|
||||
export function getCodeQLDatabasesDir(tempDir: string) {
|
||||
return path.resolve(tempDir, "codeql_databases");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the path where the CodeQL database for the given language lives.
|
||||
*/
|
||||
export function getCodeQLDatabasePath(tempDir: string, language: Language) {
|
||||
return path.resolve(getCodeQLDatabasesDir(tempDir), language);
|
||||
export function getCodeQLDatabasePath(config: Config, language: Language) {
|
||||
return path.resolve(config.dbLocation, language);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue