Bugzilla – Attachment 186893 Details for
Bug 40872
opac/unapi type not detected by tidy.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40872: List opac/unapi as a Perl file
Bug-40872-List-opacunapi-as-a-Perl-file.patch (text/plain), 1.67 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-09-24 15:08:10 UTC
(
hide
)
Description:
Bug 40872: List opac/unapi as a Perl file
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-09-24 15:08:10 UTC
Size:
1.67 KB
patch
obsolete
>From afb988d1bf2d47f36f0924b81d0baf353ead4e56 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Tom=C3=A1s=20Cohen=20Arazi?= <tomascohen@theke.io> >Date: Wed, 24 Sep 2025 12:01:26 -0300 >Subject: [PATCH] Bug 40872: List opac/unapi as a Perl file > >This patch makes `tidy.pl` treat the file as a Perl one. > >To test: > >1. Run: > $ ktd --shell > k$ misc/devel/tidy.pl opac/unapi >=> FAIL: You get: > >``` >Cannot guess filetype for opac/unapi at /kohadevbox/koha/Koha/Devel/Files.pm line 241. >``` >2. Apply this patch >3. Repeat 1 >=> SUCCESS: The file is now tidy. >4. Sign off :-D >--- > Koha/Devel/Files.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/Devel/Files.pm b/Koha/Devel/Files.pm >index f644641404..8c006adc77 100644 >--- a/Koha/Devel/Files.pm >+++ b/Koha/Devel/Files.pm >@@ -148,7 +148,7 @@ Lists Perl files (with extensions .pl, .PL, .pm, .t) that have been modified wit > > sub ls_perl_files { > my ($self) = @_; >- my $cmd = sprintf q{git ls-files '*.pl' '*.PL' '*.pm' '*.t' svc opac/svc debian/build-git-snapshot %s}, >+ my $cmd = sprintf q{git ls-files '*.pl' '*.PL' '*.pm' '*.t' svc opac/svc opac/unapi debian/build-git-snapshot %s}, > $self->build_git_exclude('pl'); > my @files = qx{$cmd}; > chomp for @files; >@@ -232,7 +232,7 @@ sub get_filetype { > 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 'pl' if $file =~ m{debian/build-git-snapshot}; >+ return 'pl' if $file =~ m{debian/build-git-snapshot} || $file =~ m{opac/unapi}; > > return 'js' if $file =~ m{\.js$} || $file =~ m{\.ts$} || $file =~ m{\.vue$}; > >-- >2.51.0
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 40872
: 186893 |
186894