Bugzilla – Attachment 153899 Details for
Bug 29324
Some files still don't have the correct license statement
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29324: Change test to look at all .pm or .pl files
Bug-29324-Change-test-to-look-at-all-pm-or-pl-file.patch (text/plain), 2.03 KB, created by
Philip Orr
on 2023-07-26 08:23:27 UTC
(
hide
)
Description:
Bug 29324: Change test to look at all .pm or .pl files
Filename:
MIME Type:
Creator:
Philip Orr
Created:
2023-07-26 08:23:27 UTC
Size:
2.03 KB
patch
obsolete
>From ae3b54bb466c405a1e735c47d5d103e82410b3a0 Mon Sep 17 00:00:00 2001 >From: Philip Orr <philip.orr@lmscloud.de> >Date: Wed, 26 Jul 2023 08:18:53 +0000 >Subject: [PATCH] Bug 29324: Change test to look at all .pm or .pl files > >This patch changes the test at xt/find-license-problems.t to look >at all .pm or .pl files. Other files will only be checked if >they contain the message "This file is part of Koha". > >To test: >1. Apply the patch >2. Run find-license-problems.t from the > root of your Koha src directory: > $ perl xt/find-license-problems.t >3. You should be getting 1476 fails >--- > xt/find-license-problems.t | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/xt/find-license-problems.t b/xt/find-license-problems.t >index 1417677b89..0e1323c5ef 100755 >--- a/xt/find-license-problems.t >+++ b/xt/find-license-problems.t >@@ -55,15 +55,16 @@ foreach my $name (@files) { > $haslinktolicense = 1 if $line =~ m|http://www\.gnu\.org/licenses|; > $hasfranklinst = 1 if ( $line =~ /51 Franklin Street/ ); > $is_not_us = 1 if $line =~ m|This file is part of the Zebra server|; >- $needs_copyright = 1 if $line =~ m|This file is part of Koha|; >+ $needs_copyright = 1 if $line =~ m|This file is part of Koha| || $name =~ /(.*).pl/ || $name =~ /(.*).pm/; > } > close $fh; > next unless $hascopyright || $needs_copyright; > next if $is_not_us; >- is( $hasgpl >+ is( $hascopyright >+ && $hasgpl > && $hasv3 > && $hasorlater > && $haslinktolicense >- && !$hasfranklinst, 1 ) or diag(sprintf "File %s has wrong copyright: hasgpl=%s, hasv3=%s, hasorlater=%s, haslinktolicense=%s, hasfranklinst=%s", $name, $hasgpl, $hasv3, $hasorlater, $haslinktolicense, $hasfranklinst); >+ && !$hasfranklinst, 1 ) or diag(sprintf "File %s has wrong copyright: hascopyright=%s, hasgpl=%s, hasv3=%s, hasorlater=%s, haslinktolicense=%s, hasfranklinst=%s", $name, $hascopyright, $hasgpl, $hasv3, $hasorlater, $haslinktolicense, $hasfranklinst); > } > done_testing; >-- >2.30.2
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 29324
:
126916
|
153309
|
153310
|
153555
|
153556
|
153680
|
153681
|
153861
|
153899
|
153924
|
154240
|
156256
|
156257
|
156258
|
156259
|
156260
|
156261
|
156262