Bugzilla – Attachment 184164 Details for
Bug 40419
xt/find-license-problems.t isn't catching all instances of 51 Franklin St/Street
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40419: Remove check for Copyright line
Bug-40419-Remove-check-for-Copyright-line.patch (text/plain), 2.16 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-07-16 18:14:00 UTC
(
hide
)
Description:
Bug 40419: Remove check for Copyright line
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-07-16 18:14:00 UTC
Size:
2.16 KB
patch
obsolete
>From 04f44ec7e60753ed8030e601f184630982f93dc3 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 16 Jul 2025 14:56:43 -0300 >Subject: [PATCH] Bug 40419: Remove check for Copyright line > >The Copyright line should not be mandatory. And if missing, is not a >reason to skip the GPL-related checks anyway. > >This 'fix' will highlight existing errors that were skipped until now. > >To test: >1. Run: > $ ktd --shell > k$ prove xt/find-license-problems.t >=> FAIL: Tests pass! Some files should make them fail! >2. Apply this patch >3. Repeat 1 >=> SUCCESS: Tests fail! >--- > xt/find-license-problems.t | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > >diff --git a/xt/find-license-problems.t b/xt/find-license-problems.t >index 5f93516aa54..9a1322b7242 100755 >--- a/xt/find-license-problems.t >+++ b/xt/find-license-problems.t >@@ -45,14 +45,13 @@ find( { wanted => \&wanted, no_chdir => 1 }, File::Spec->curdir() ); > foreach my $name (@files) { > open( my $fh, '<', $name ) || die "cannot open file $name $!"; > my ( >- $hascopyright, $hasgpl, $hasv3, $hasorlater, $haslinktolicense, >+ $hasgpl, $hasv3, $hasorlater, $haslinktolicense, > $hasfranklinst, $is_not_us > ) = (0) x 7; > while ( my $line = <$fh> ) { >- $hascopyright = 1 if ( $line =~ /^(#|--)?\s*Copyright.*\d\d/ ); >- $hasgpl = 1 if ( $line =~ /GNU General Public License/ ); >- $hasv3 = 1 if ( $line =~ /either version 3/ ); >- $hasorlater = 1 >+ $hasgpl = 1 if ( $line =~ /GNU General Public License/ ); >+ $hasv3 = 1 if ( $line =~ /either version 3/ ); >+ $hasorlater = 1 > if ( $line =~ /any later version/ > || $line =~ /at your option/ ); > $haslinktolicense = 1 if $line =~ m|http://www\.gnu\.org/licenses|; >@@ -60,8 +59,8 @@ foreach my $name (@files) { > $is_not_us = 1 if $line =~ m|This file is part of the Zebra server|; > } > close $fh; >- next unless $hascopyright; > next if $is_not_us; >+ next if !$hasgpl; > is( $hasgpl && $hasv3 && $hasorlater && $haslinktolicense && !$hasfranklinst, 1 ) > or diag( > sprintf >-- >2.50.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 40419
:
184164
|
184165
|
184166
|
184175
|
184176
|
184182
|
184183