Skip to content

Commit 9c3f69d

Browse files
committed
Add some logging
1 parent 5f5c095 commit 9c3f69d

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

lib/init-action.js

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/config-utils.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,11 +922,19 @@ export async function initConfig(
922922
if ((await features.getValue(Feature.IgnoreGeneratedFiles)) && isCCR()) {
923923
try {
924924
const generatedFiles = await getGeneratedFiles(inputs.sourceRoot);
925-
config.computedConfig["paths-ignore"] ??= [];
926-
config.computedConfig["paths-ignore"].push(...generatedFiles);
925+
926+
if (generatedFiles.length > 0) {
927+
config.computedConfig["paths-ignore"] ??= [];
928+
config.computedConfig["paths-ignore"].push(...generatedFiles);
929+
logger.info(
930+
`Detected ${generatedFiles.length} generated file(s), which will be excluded from analysis: ${generatedFiles.join(", ")}`,
931+
);
932+
}
927933
} catch (error) {
928934
logger.info(`Cannot ignore generated files: ${getErrorMessage(error)}`);
929935
}
936+
} else {
937+
logger.debug(`Skipping check for generated files.`);
930938
}
931939

932940
// If Code Quality analysis is the only enabled analysis kind, then we will initialise

0 commit comments

Comments
 (0)