Refactoring: Add getExtractionVerbosityArguments wrapper
This commit is contained in:
parent
070b05147a
commit
8da95d81a8
3 changed files with 20 additions and 19 deletions
|
|
@ -692,9 +692,7 @@ export async function getCodeQLForCmd(
|
|||
"trace-command",
|
||||
"--index-traceless-dbs",
|
||||
...(await getTrapCachingExtractorConfigArgsForLang(config, language)),
|
||||
...(config.debugMode
|
||||
? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`]
|
||||
: []),
|
||||
...getExtractionVerbosityArguments(config.debugMode),
|
||||
...getExtraOptionsFromEnv(["database", "trace-command"]),
|
||||
util.getCodeQLDatabasePath(config, language),
|
||||
]);
|
||||
|
|
@ -705,9 +703,7 @@ export async function getCodeQLForCmd(
|
|||
"trace-command",
|
||||
"--use-build-mode",
|
||||
...(await getTrapCachingExtractorConfigArgsForLang(config, language)),
|
||||
...(config.debugMode
|
||||
? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`]
|
||||
: []),
|
||||
...getExtractionVerbosityArguments(config.debugMode),
|
||||
...getExtraOptionsFromEnv(["database", "trace-command"]),
|
||||
util.getCodeQLDatabasePath(config, language),
|
||||
]);
|
||||
|
|
@ -724,9 +720,7 @@ export async function getCodeQLForCmd(
|
|||
"--finalize-dataset",
|
||||
threadsFlag,
|
||||
memoryFlag,
|
||||
...(enableDebugLogging
|
||||
? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`]
|
||||
: []),
|
||||
...getExtractionVerbosityArguments(enableDebugLogging),
|
||||
...getExtraOptionsFromEnv(["database", "finalize"]),
|
||||
databasePath,
|
||||
];
|
||||
|
|
@ -1425,3 +1419,11 @@ async function getCodeScanningQueryHelpArguments(
|
|||
}
|
||||
return ["--sarif-add-query-help"];
|
||||
}
|
||||
|
||||
function getExtractionVerbosityArguments(
|
||||
enableDebugLogging: boolean,
|
||||
): string[] {
|
||||
return enableDebugLogging
|
||||
? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`]
|
||||
: [];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue