Extract logging statements to separate function

This commit is contained in:
Andrew Eisenberg
2022-10-03 08:17:27 -07:00
parent 59fbe34861
commit 5960ce1190
9 changed files with 35 additions and 30 deletions

View File

@@ -817,6 +817,22 @@ export async function useCodeScanningConfigInCli(
return await codeQlVersionAbove(codeql, CODEQL_VERSION_CONFIG_FILES);
}
export async function logCodeScanningConfigInCli(
codeql: CodeQL,
featureFlags: FeatureFlags,
logger: Logger
) {
if (await useCodeScanningConfigInCli(codeql, featureFlags)) {
logger.info(
"Code Scanning configuration file being processed in the codeql CLI."
);
} else {
logger.info(
"Code Scanning configuration file being processed in the codeql-action."
);
}
}
/*
* Returns whether the path in the argument represents an existing directory.
*/