Skip to content

Commit

Permalink
Add logging statements declaring state of the cli_config_file_enabled
Browse files Browse the repository at this point in the history
It's possible to determine this otherwise, but this makes it easier to
spot.
  • Loading branch information
aeisenberg committed Oct 1, 2022
1 parent 4cf8004 commit 6ace05b
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 2 deletions.
6 changes: 6 additions & 0 deletions lib/analyze.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/analyze.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions lib/config-utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/config-utils.js.map

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions src/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
7 changes: 7 additions & 0 deletions src/config-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 6ace05b

Please sign in to comment.