mirror of
https://github.com/github/codeql-action.git
synced 2026-04-26 16:58:47 +00:00
Move after Git version check
This commit is contained in:
Generated
+16
-16
@@ -90261,22 +90261,6 @@ async function initConfig(features, inputs) {
|
||||
);
|
||||
}
|
||||
const config = await initActionState(inputs, userConfig);
|
||||
if (await features.getValue("ignore_generated_files" /* IgnoreGeneratedFiles */) && isCCR()) {
|
||||
try {
|
||||
const generatedFiles = await getGeneratedFiles(inputs.sourceRoot);
|
||||
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)) {
|
||||
throw new ConfigurationError(
|
||||
@@ -90299,6 +90283,22 @@ async function initConfig(features, inputs) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
if (await features.getValue("ignore_generated_files" /* IgnoreGeneratedFiles */) && isCCR()) {
|
||||
try {
|
||||
const generatedFiles = await getGeneratedFiles(inputs.sourceRoot);
|
||||
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.`);
|
||||
}
|
||||
const { overlayDatabaseMode, useOverlayDatabaseCaching } = await getOverlayDatabaseMode(
|
||||
inputs.codeql,
|
||||
inputs.features,
|
||||
|
||||
Reference in New Issue
Block a user