Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: third_party/devscripts/chromium-1.patch

Issue 7988008: Make check_licenses about 5x faster. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | third_party/devscripts/licensecheck.pl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 --- licensecheck.pl.orig» 2011-09-12 15:54:33.369133553 -0700 1 --- licensecheck.pl.orig» 2011-09-22 10:51:25.934402455 -0700
2 +++ licensecheck.pl» 2011-09-12 16:53:51.189069386 -0700 2 +++ licensecheck.pl» 2011-09-22 10:45:54.585545044 -0700
3 @@ -406,7 +406,7 @@ 3 @@ -277,10 +277,6 @@
4 while (<F>) {
5 last if ($. > $opt_lines);
6 $content .= $_;
7 -» $copyright_match = parse_copyright($_);
8 -» if ($copyright_match) {
9 -» $copyrights{lc("$copyright_match")} = "$copyright_match";
10 -» }
11 }
12 close(F);
13
14 @@ -298,7 +294,6 @@
15
16 $license = parselicense($content);
17 print "$file: ";
18 - print "*No copyright* " unless $copyright;
19 print $license . "\n";
20 print " [Copyright: " . $copyright . "]\n"
21 if $copyright and $opt_copyright;
22 @@ -398,15 +393,11 @@
23 » $gplver = " (v$1 or later)";
24 }
25
26 - if ($licensetext =~ /(?:675 Mass Ave|59 Temple Place|51 Franklin Steet|0213 9|02111-1307)/i) {
27 -» $extrainfo = " (with incorrect FSF address)$extrainfo";
28 - }
29 -
30 if ($licensetext =~ /permission (?:is (also granted|given))? to link (the c ode of )?this program with (any edition of )?(Qt|the Qt library)/i) {
4 $extrainfo = " (with Qt exception)$extrainfo" 31 $extrainfo = " (with Qt exception)$extrainfo"
5 } 32 }
6 33
7 - if ($licensetext =~ /(All changes made in this file will be lost|DO NOT (ED IT|delete this file)|Generated by)/i) { 34 - if ($licensetext =~ /(All changes made in this file will be lost|DO NOT (ED IT|delete this file)|Generated by)/i) {
8 + if ($licensetext =~ /(All changes made in this file will be lost|DO NOT (ED IT|delete this file)|Generated (automatically|by|from)|generated.*file)/i) { 35 + if ($licensetext =~ /(All changes made in this file will be lost|DO NOT (ED IT|delete this file)|Generated (automatically|by|from)|generated.*file)/i) {
9 $license = "GENERATED FILE"; 36 $license = "GENERATED FILE";
10 } 37 }
11 38
12 @@ -437,7 +437,7 @@ 39 @@ -414,20 +405,12 @@
40 » $license = "LGPL$gplver$extrainfo $license";
41 }
42
43 - if ($licensetext =~ /is free software.? you can redistribute it and\/or mod ify it under the terms of the (GNU Affero General Public License|AGPL)/i) {
44 -» $license = "AGPL$gplver$extrainfo $license";
45 - }
46 -
47 if ($licensetext =~ /is free software.? you (can|may) redistribute it and\/ or modify it under the terms of (?:version [^ ]+ (?:\(?only\)? )?of )?the GNU Ge neral Public License/i) {
48 » $license = "GPL$gplver$extrainfo $license";
49 - }
50 -
51 - if ($licensetext =~ /is distributed under the terms of the GNU General Publ ic License,/
52 + } elsif ($licensetext =~ /is distributed under the terms of the GNU General Public License,/
53 » and length $gplver) {
54 » $license = "GPL$gplver$extrainfo $license";
55 - }
56 -
57 - if ($licensetext =~ /is distributed.*terms.*GPL/) {
58 + } elsif ($licensetext =~ /is distributed.*terms.*GPL/) {
59 » $license = "GPL (unversioned/unknown version) $license";
60 }
61
62 @@ -437,7 +420,7 @@
13 $license = "QPL $license"; 63 $license = "QPL $license";
14 } 64 }
15 65
16 - if ($licensetext =~ /http:\/\/opensource\.org\/licenses\/mit-license\.php/) { 66 - if ($licensetext =~ /http:\/\/opensource\.org\/licenses\/mit-license\.php/) {
17 + if ($licensetext =~ /opensource\.org\/licenses\/mit-license\.php/) { 67 + if ($licensetext =~ /opensource\.org\/licenses\/mit-license\.php/) {
18 $license = "MIT/X11 (BSD like) $license"; 68 $license = "MIT/X11 (BSD like) $license";
19 } elsif ($licensetext =~ /Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files \(the Software\), to deal in the Software/) { 69 } elsif ($licensetext =~ /Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files \(the Software\), to deal in the Software/) {
20 $license = "MIT/X11 (BSD like) $license"; 70 $license = "MIT/X11 (BSD like) $license";
21 @@ -459,6 +459,12 @@ 71 @@ -448,15 +431,19 @@
22 » }
23 } 72 }
24 73
25 + if ($licensetext =~ /Use of this source code is governed by a BSD-style lic ense/) { 74 if ($licensetext =~ /THIS SOFTWARE IS PROVIDED .*AS IS AND ANY EXPRESS OR I MPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERC HANTABILITY/) {
75 -» if ($licensetext =~ /All advertising materials mentioning features or us e of this software must display the following acknowledge?ment.*This product inc ludes software developed by/i) {
76 +» if ($licensetext =~ /All advertising materials mentioning features or us e of this software must display the following/) {
77 » $license = "BSD (4 clause) $license";
78 -» } elsif ($licensetext =~ /(The name of .*? may not|Neither the names? of .*? nor the names of (its|their) contributors may) be used to endorse or promot e products derived from this software/i) {
79 +» } elsif ($licensetext =~ /be used to endorse or promote products derived from this software/) {
80 » $license = "BSD (3 clause) $license";
81 -» } elsif ($licensetext =~ /Redistributions of source code must retain the above copyright notice/i) {
82 +» } elsif ($licensetext =~ /Redistributions of source code must retain the above copyright notice/) {
83 » $license = "BSD (2 clause) $license";
84 » } else {
85 » $license = "BSD $license";
86 » }
87 + } elsif ($licensetext =~ /Use of this source code is governed by a BSD-styl e license/) {
26 + $license = "BSD-like $license"; 88 + $license = "BSD-like $license";
27 + } elsif ($licensetext =~ /BSD terms apply.*see.*COPYING.*for details/) { 89 + } elsif ($licensetext =~ /BSD terms apply/) {
28 + $license = "BSD-like $license"; 90 + $license = "BSD-like $license";
29 + } 91 }
30 + 92
31 if ($licensetext =~ /Mozilla Public License Version ([^ ]+)/) { 93 if ($licensetext =~ /Mozilla Public License Version ([^ ]+)/) {
32 » $license = "MPL (v$1) $license"; 94 @@ -495,7 +482,7 @@
33 }
34 @@ -495,7 +501,7 @@
35 $license = "SGI Free Software License B $license"; 95 $license = "SGI Free Software License B $license";
36 } 96 }
37 97
38 - if ($licensetext =~ /is in the public domain/i) { 98 - if ($licensetext =~ /is in the public domain/i) {
39 + if ($licensetext =~ /is.*in the public domain|disclaims copyright/i) { 99 + if ($licensetext =~ /in the public domain/i) {
40 $license = "Public domain"; 100 $license = "Public domain";
41 } 101 }
42 102
43 @@ -503,6 +509,10 @@ 103 @@ -503,6 +490,10 @@
44 $license = "CDDL " . ($1 ? "(v$2) " : '') . $license; 104 $license = "CDDL " . ($1 ? "(v$2) " : '') . $license;
45 } 105 }
46 106
47 + if ($licensetext =~ /Microsoft Permissive License \(Ms-PL\)/) { 107 + if ($licensetext =~ /Microsoft Permissive License \(Ms-PL\)/) {
48 + $license = "Ms-PL $license"; 108 + $license = "Ms-PL $license";
49 + } 109 + }
50 + 110 +
51 if ($licensetext =~ /Permission is hereby granted, free of charge, to any p erson or organization obtaining a copy of the software and accompanying document ation covered by this license \(the \"Software\"\)/ or 111 if ($licensetext =~ /Permission is hereby granted, free of charge, to any p erson or organization obtaining a copy of the software and accompanying document ation covered by this license \(the \"Software\"\)/ or
52 $licensetext =~ /Boost Software License([ ,-]+Version ([^ ]+)?(\.))/i) { 112 $licensetext =~ /Boost Software License([ ,-]+Version ([^ ]+)?(\.))/i) {
53 $license = "BSL " . ($1 ? "(v$2) " : '') . $license; 113 $license = "BSL " . ($1 ? "(v$2) " : '') . $license;
54 @@ -515,6 +525,8 @@ 114 @@ -515,18 +506,8 @@
55 if ($licensetext =~ /The origin of this software must not be misrepresented .*Altered source versions must be plainly marked as such.*This notice may not be removed or altered from any source distribution/ or 115 if ($licensetext =~ /The origin of this software must not be misrepresented .*Altered source versions must be plainly marked as such.*This notice may not be removed or altered from any source distribution/ or
56 $licensetext =~ /see copyright notice in zlib\.h/) { 116 $licensetext =~ /see copyright notice in zlib\.h/) {
57 $license = "zlib/libpng $license"; 117 $license = "zlib/libpng $license";
118 - }
119 -
120 - if ($licensetext =~ /Do What The Fuck You Want To Public License, Version ( [^, ]+)/i) {
121 - $license = "WTFPL (v$1)";
122 - }
123 -
124 - if ($licensetext =~ /Do what The Fuck You Want To Public License/i) {
125 - $license = "WTFPL";
126 - }
127 -
128 - if ($licensetext =~ /(License WTFPL|Under (the|a) WTFPL)/i) {
129 - $license = "WTFPL";
58 + } elsif ($licensetext =~ /This code is released under the libpng license/) { 130 + } elsif ($licensetext =~ /This code is released under the libpng license/) {
59 + $license = "libpng $license"; 131 + $license = "libpng $license";
60 } 132 }
61 133
62 if ($licensetext =~ /Do What The Fuck You Want To Public License, Version ( [^, ]+)/i) { 134 $license = "UNKNOWN" if (!length($license));
OLDNEW
« no previous file with comments | « no previous file | third_party/devscripts/licensecheck.pl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698