See 33743 and 33745
Created attachment 153588 [details] [review] Bug 34303: Only perlcritic files from git repo Test plan: Run t/00-testcritic.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 153589 [details] [review] Bug 34303: Only perlcritic files from git repo Test plan: Run t/00-testcritic.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
TODO [13:59] <Joubu> a dir in git index can contain files that are not in the git index
Created attachment 153590 [details] [review] Bug 34303: Loop over pl and pm from the git repo We don't want to include files that are not in the git index.
* This is way slower than using all_critic_ok (29sec vs 1m50). To investigate... * Should we include '.t' files? * What about perl files without extensions? (were they tested before?)
Created attachment 153591 [details] [review] Bug 34303: Only perlcritic files from git repo Test plan: Run t/00-testcritic.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(In reply to Jonathan Druart from comment #5) > * This is way slower than using all_critic_ok (29sec vs 1m50). > To investigate... We can use all. See follow-up > * Should we include '.t' files? They are in now. > * What about perl files without extensions? (were they tested before?) Checking
all_perl in the library checks first extension but also shebang line return 1 if defined $first && ( $first =~ m{ \A [#]!.*perl }xms );
Created attachment 153592 [details] [review] Bug 34303: Only perlcritic files from git repo Test plan: Run t/00-testcritic.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 153596 [details] [review] Bug 34303: Only perlcritic files from git repo Test plan: Run t/00-testcritic.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> JD amended patch: tidy Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Noting this warning (not introduced by this patch): Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/PPIx/Regexp/Structure/Quantifier.pm line 117.
Pushed to master for 23.11. Nice work everyone, thanks!
Thanks for all the hard work! Pushed to 23.05.x for the next release
Nice work everyone! Pushed to oldstable for 22.11.x
Backported to 22.05.x for upcoming 22.05.16