@@ -916,27 +916,6 @@ export async function initConfig(
916916
917917 const config = await initActionState ( inputs , userConfig ) ;
918918
919- // If we are in CCR or the corresponding FF is enabled, try to determine
920- // which files in the repository are marked as generated and add them to
921- // the `paths-ignore` configuration.
922- if ( ( await features . getValue ( Feature . IgnoreGeneratedFiles ) ) && isCCR ( ) ) {
923- try {
924- const generatedFiles = await getGeneratedFiles ( inputs . sourceRoot ) ;
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- }
933- } catch ( error ) {
934- logger . info ( `Cannot ignore generated files: ${ getErrorMessage ( error ) } ` ) ;
935- }
936- } else {
937- logger . debug ( `Skipping check for generated files.` ) ;
938- }
939-
940919 // If Code Quality analysis is the only enabled analysis kind, then we will initialise
941920 // the database for Code Quality. That entails disabling the default queries and only
942921 // running quality queries. We do not currently support query customisations in that case.
@@ -974,6 +953,27 @@ export async function initConfig(
974953 }
975954 }
976955
956+ // If we are in CCR or the corresponding FF is enabled, try to determine
957+ // which files in the repository are marked as generated and add them to
958+ // the `paths-ignore` configuration.
959+ if ( ( await features . getValue ( Feature . IgnoreGeneratedFiles ) ) && isCCR ( ) ) {
960+ try {
961+ const generatedFiles = await getGeneratedFiles ( inputs . sourceRoot ) ;
962+
963+ if ( generatedFiles . length > 0 ) {
964+ config . computedConfig [ "paths-ignore" ] ??= [ ] ;
965+ config . computedConfig [ "paths-ignore" ] . push ( ...generatedFiles ) ;
966+ logger . info (
967+ `Detected ${ generatedFiles . length } generated file(s), which will be excluded from analysis: ${ generatedFiles . join ( ", " ) } ` ,
968+ ) ;
969+ }
970+ } catch ( error ) {
971+ logger . info ( `Cannot ignore generated files: ${ getErrorMessage ( error ) } ` ) ;
972+ }
973+ } else {
974+ logger . debug ( `Skipping check for generated files.` ) ;
975+ }
976+
977977 // The choice of overlay database mode depends on the selection of languages
978978 // and queries, which in turn depends on the user config and the augmentation
979979 // properties. So we need to calculate the overlay database mode after the
0 commit comments