[Bug 39149] New: .PL files not tidy
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 Bug ID: 39149 Summary: .PL files not tidy Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Somehow we missed we have `.PL` files in the codebase. They are not considered in `tidy.pl` and remain untidy. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | CC| |tomascohen@gmail.com Depends on| |39096 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 [Bug 39096] Add "tidy all" commits to a git blame ignore file -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 178148 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178148&action=edit Bug 39149: Make tidy.pl deal with .PL files This patch adds handling for files with the `.PL` extension to the `tidy.pl` helper script. It will now consider them Perl files and tidy them as appropriate. I opted for explicitly listing `PL` instead of making the existing check case-insensitive because the only files I found with changed case (i.e. Perl scripts that don't have `.pl`) are: $ find . -type f -iname "*.pl" ! -name "*.pl" ./fix-perl-path.PL ./build-resources.PL ./rewrite-config.PL ./Makefile.PL Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 --- Comment #2 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 178149 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178149&action=edit Bug 39149: Tidy .PL files This patch is the result of running: ```shell perl misc/devel/tidy.pl *.PL ``` Commiting raised an error about fix-perl-path.PL calling `warn` which I dismiss for the time being. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com, | |katrin.fischer@bsz-bw.de, | |victor@tuxayo.net -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 --- Comment #3 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Good news, it seems there aren't other cases of files with slightly diverging extensions that escaped tidying. After looking at all the stuff not having the most common extensions: find . -type f -not -path "./.git/*" -not -path "./misc/translator/po/.git/*" -regextype posix-egrep -not -regex ".*\.(sql|pl|yml|md|yaml|js|txt|xml|json|xsl|chr|pm|t|ts|mrc|csv|inc|pod|att|tag|abs|mar|cfg|conf|properties|ods|po|png|svg|idx|gif|tt|css|vue|html|jpg|in|ogg|woff|woff2|ttf|map|scss|map|py|pref|sh|pdf|odt)$" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178148|0 |1 is obsolete| | --- Comment #4 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 178150 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178150&action=edit Bug 39149: Make tidy.pl deal with .PL files This patch adds handling for files with the `.PL` extension to the `tidy.pl` helper script. It will now consider them Perl files and tidy them as appropriate. I opted for explicitly listing `PL` instead of making the existing check case-insensitive because the only files I found with changed case (i.e. Perl scripts that don't have `.pl`) are: $ find . -type f -iname "*.pl" ! -name "*.pl" ./fix-perl-path.PL ./build-resources.PL ./rewrite-config.PL ./Makefile.PL Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178149|0 |1 is obsolete| | --- Comment #5 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 178151 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178151&action=edit Bug 39149: Tidy .PL files This patch is the result of running: ```shell perl misc/devel/tidy.pl *.PL ``` Commiting raised an error about fix-perl-path.PL calling `warn` which I dismiss for the time being. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #6 from Victor Grousset/tuxayo <victor@tuxayo.net> --- It works! :) Testing notes: apply last commit of Bug 39096 before this, otherwise it won't apply. Because that follow-up isn't on main yet. Bug 39096: Add .git-blame-ignore-revs mapping to Makefile.PL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 --- Comment #7 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 178152 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178152&action=edit Bug 39149: Make perltidy.t also check .PL files Now perltidy.t will check 2958 files instead of 2954. Which matches with the 4 .PL files. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |RM_priority -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178152|0 |1 is obsolete| | --- Comment #8 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 178170 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178170&action=edit Bug 39149: Make perltidy.t also check .PL files Now perltidy.t will check 2958 files instead of 2954. Which matches with the 4 .PL files. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 --- Comment #10 from Jonathan Druart <jonathan.druart@gmail.com> --- Added a commit to koha-testing-docker for the pre-commit git hooks https://gitlab.com/koha-community/koha-testing-docker/-/commit/d2b480e2c2462... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Keywords|RM_priority | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to main |Needs documenting --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Not for 24.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs documenting |RESOLVED CC| |david@davidnind.com --- Comment #12 from David Nind <david@davidnind.com> --- No changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 Bug 39149 depends on bug 39096, which changed state. Bug 39096 Summary: Add "tidy all" commits to a git blame ignore file https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org