Bugzilla – Attachment 178150 Details for
Bug 39149
.PL files not tidy
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39149: Make tidy.pl deal with .PL files
Bug-39149-Make-tidypl-deal-with-PL-files.patch (text/plain), 1.75 KB, created by
Victor Grousset/tuxayo
on 2025-02-17 19:13:56 UTC
(
hide
)
Description:
Bug 39149: Make tidy.pl deal with .PL files
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2025-02-17 19:13:56 UTC
Size:
1.75 KB
patch
obsolete
>From 6f86ac8057a6401067dad3511456c34c56ef91f7 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 17 Feb 2025 17:19:57 +0000 >Subject: [PATCH] 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> >--- > misc/devel/tidy.pl | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/misc/devel/tidy.pl b/misc/devel/tidy.pl >index 1445cc3028..5d78d9b7ec 100755 >--- a/misc/devel/tidy.pl >+++ b/misc/devel/tidy.pl >@@ -143,7 +143,7 @@ sub build_git_exclude { > } > > sub get_perl_files { >- my $cmd = sprintf q{git ls-files '*.pl' '*.pm' '*.t' svc opac/svc %s}, build_git_exclude('pl'); >+ my $cmd = sprintf q{git ls-files '*.pl' '*.PL' '*.pm' '*.t' svc opac/svc %s}, build_git_exclude('pl'); > my @files = qx{$cmd}; > chomp for @files; > return @files; >@@ -219,8 +219,9 @@ sub tidy_tt { > > sub get_filetype { > my ($file) = @_; >- return 'pl' if $file =~ m{^svc} || $file =~ m{^opac/svc}; >+ return 'pl' if $file =~ m{^svc} || $file =~ m{^opac/svc}; > return 'pl' if $file =~ m{\.pl$} || $file =~ m{\.pm} || $file =~ m{\.t$}; >+ return 'pl' if $file =~ m{\.PL$}; > > return 'js' if $file =~ m{\.js$} || $file =~ m{\.ts$} || $file =~ m{\.vue$}; > >-- >2.48.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39149
:
178148
|
178149
| 178150 |
178151
|
178152
|
178170