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

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

Issue 7974012: Speed up check_licenses by another 30% by scanning less files. (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
OLDNEW
1 --- licensecheck.pl.orig 2011-09-22 10:51:25.934402455 -0700 1 --- licensecheck.pl.orig 2011-09-22 10:51:25.934402455 -0700
2 +++ licensecheck.pl 2011-09-22 10:45:54.585545044 -0700 2 +++ licensecheck.pl 2011-09-22 10:45:54.585545044 -0700
3 @@ -241,6 +241,12 @@ my @files = ();
4 my @find_args = ();
5 my $files_count = @ARGV;
6
7 +push @find_args, qw(-not ( -path */LayoutTests/* -prune ) );
8 +push @find_args, qw(-not ( -path */out/Debug/* -prune ) );
9 +push @find_args, qw(-not ( -path */out/Release/* -prune ) );
10 +push @find_args, qw(-not ( -path *.git* -prune ) );
11 +push @find_args, qw(-not ( -path *.svn* -prune ) );
12 +
13 push @find_args, qw(-maxdepth 1) unless $opt_recursive;
14 push @find_args, qw(-follow -type f -print);
15
3 @@ -277,10 +277,6 @@ 16 @@ -277,10 +277,6 @@
4 while (<F>) { 17 while (<F>) {
5 last if ($. > $opt_lines); 18 last if ($. > $opt_lines);
6 $content .= $_; 19 $content .= $_;
7 - $copyright_match = parse_copyright($_); 20 - $copyright_match = parse_copyright($_);
8 - if ($copyright_match) { 21 - if ($copyright_match) {
9 - $copyrights{lc("$copyright_match")} = "$copyright_match"; 22 - $copyrights{lc("$copyright_match")} = "$copyright_match";
10 - } 23 - }
11 } 24 }
12 close(F); 25 close(F);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 - $license = "WTFPL"; 138 - $license = "WTFPL";
126 - } 139 - }
127 - 140 -
128 - if ($licensetext =~ /(License WTFPL|Under (the|a) WTFPL)/i) { 141 - if ($licensetext =~ /(License WTFPL|Under (the|a) WTFPL)/i) {
129 - $license = "WTFPL"; 142 - $license = "WTFPL";
130 + } elsif ($licensetext =~ /This code is released under the libpng license/) { 143 + } elsif ($licensetext =~ /This code is released under the libpng license/) {
131 + $license = "libpng $license"; 144 + $license = "libpng $license";
132 } 145 }
133 146
134 $license = "UNKNOWN" if (!length($license)); 147 $license = "UNKNOWN" if (!length($license));
OLDNEW
« no previous file with comments | « no previous file | third_party/devscripts/licensecheck.pl » ('j') | third_party/devscripts/licensecheck.pl » ('J')

Powered by Google App Engine
This is Rietveld 408576698