Summary: | t/00-testcritic.t should only test files part of git repo | ||
---|---|---|---|
Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
Component: | Architecture, internals, and plumbing | Assignee: | Marcel de Rooy <m.de.rooy> |
Status: | RESOLVED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | jonathan.druart, lucas |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.11.00,23.05.02,22.11.08,22.05.16
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 34911 | ||
Attachments: |
Bug 34303: Only perlcritic files from git repo
Bug 34303: Only perlcritic files from git repo Bug 34303: Loop over pl and pm from the git repo Bug 34303: Only perlcritic files from git repo Bug 34303: Only perlcritic files from git repo Bug 34303: Only perlcritic files from git repo |
Description
Marcel de Rooy
2023-07-18 10:45:40 UTC
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 |