Add logging statements declaring state of the cli_config_file_enabled

It's possible to determine this otherwise, but this makes it easier to
spot.
This commit is contained in:
Andrew Eisenberg 2022-09-30 16:06:14 -07:00
parent 4cf80047d0
commit 6ace05baa3
6 changed files with 30 additions and 2 deletions

6
lib/analyze.js generated
View file

@ -136,6 +136,12 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
config.paths, config.pathsIgnore, config.languages, logger);
}
const codeql = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
if (await util.useCodeScanningConfigInCli(codeql, featureFlags)) {
logger.info("Code Scanning configuration file being processed in the codeql-action.");
}
else {
logger.info("Code Scanning configuration file being processed in the codeql CLI.");
}
for (const language of config.languages) {
const queries = config.queries[language];
const queryFilters = validateQueryFilters(config.originalUserInput["query-filters"]);

File diff suppressed because one or more lines are too long

4
lib/config-utils.js generated
View file

@ -909,9 +909,13 @@ async function initConfig(languagesInput, queriesInput, packsInput, registriesIn
// happen in the CLI during the `database init` command, so no need
// to download them here.
if (!(await (0, util_1.useCodeScanningConfigInCli)(codeQL, featureFlags))) {
logger.info("Code Scanning configuration file being processed in the codeql CLI.");
const registries = parseRegistries(registriesInput);
await downloadPacks(codeQL, config.languages, config.packs, registries, apiDetails, config.tempDir, logger);
}
else {
logger.info("Code Scanning configuration file being processed in the codeql-action.");
}
// Save the config so we can easily access it again in the future
await saveConfig(config, logger);
return config;

File diff suppressed because one or more lines are too long

View file

@ -239,6 +239,17 @@ export async function runQueries(
}
const codeql = await getCodeQL(config.codeQLCmd);
if (await util.useCodeScanningConfigInCli(codeql, featureFlags)) {
logger.info(
"Code Scanning configuration file being processed in the codeql-action."
);
} else {
logger.info(
"Code Scanning configuration file being processed in the codeql CLI."
);
}
for (const language of config.languages) {
const queries = config.queries[language];
const queryFilters = validateQueryFilters(

View file

@ -1705,6 +1705,9 @@ export async function initConfig(
// happen in the CLI during the `database init` command, so no need
// to download them here.
if (!(await useCodeScanningConfigInCli(codeQL, featureFlags))) {
logger.info(
"Code Scanning configuration file being processed in the codeql CLI."
);
const registries = parseRegistries(registriesInput);
await downloadPacks(
codeQL,
@ -1715,6 +1718,10 @@ export async function initConfig(
config.tempDir,
logger
);
} else {
logger.info(
"Code Scanning configuration file being processed in the codeql-action."
);
}
// Save the config so we can easily access it again in the future