mirror of
https://github.com/github/codeql-action.git
synced 2026-04-26 08:48:46 +00:00
Add some logging
This commit is contained in:
Generated
+9
-2
@@ -90264,11 +90264,18 @@ async function initConfig(features, inputs) {
|
||||
if (await features.getValue("ignore_generated_files" /* IgnoreGeneratedFiles */) && isCCR()) {
|
||||
try {
|
||||
const generatedFiles = await getGeneratedFiles(inputs.sourceRoot);
|
||||
config.computedConfig["paths-ignore"] ??= [];
|
||||
config.computedConfig["paths-ignore"].push(...generatedFiles);
|
||||
if (generatedFiles.length > 0) {
|
||||
config.computedConfig["paths-ignore"] ??= [];
|
||||
config.computedConfig["paths-ignore"].push(...generatedFiles);
|
||||
logger.info(
|
||||
`Detected ${generatedFiles.length} generated file(s), which will be excluded from analysis: ${generatedFiles.join(", ")}`
|
||||
);
|
||||
}
|
||||
} catch (error3) {
|
||||
logger.info(`Cannot ignore generated files: ${getErrorMessage(error3)}`);
|
||||
}
|
||||
} else {
|
||||
logger.debug(`Skipping check for generated files.`);
|
||||
}
|
||||
if (config.analysisKinds.length === 1 && isCodeQualityEnabled(config)) {
|
||||
if (hasQueryCustomisation(config.computedConfig)) {
|
||||
|
||||
+10
-2
@@ -922,11 +922,19 @@ export async function initConfig(
|
||||
if ((await features.getValue(Feature.IgnoreGeneratedFiles)) && isCCR()) {
|
||||
try {
|
||||
const generatedFiles = await getGeneratedFiles(inputs.sourceRoot);
|
||||
config.computedConfig["paths-ignore"] ??= [];
|
||||
config.computedConfig["paths-ignore"].push(...generatedFiles);
|
||||
|
||||
if (generatedFiles.length > 0) {
|
||||
config.computedConfig["paths-ignore"] ??= [];
|
||||
config.computedConfig["paths-ignore"].push(...generatedFiles);
|
||||
logger.info(
|
||||
`Detected ${generatedFiles.length} generated file(s), which will be excluded from analysis: ${generatedFiles.join(", ")}`,
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
logger.info(`Cannot ignore generated files: ${getErrorMessage(error)}`);
|
||||
}
|
||||
} else {
|
||||
logger.debug(`Skipping check for generated files.`);
|
||||
}
|
||||
|
||||
// If Code Quality analysis is the only enabled analysis kind, then we will initialise
|
||||
|
||||
Reference in New Issue
Block a user