mirror of
https://github.com/curl/curl.git
synced 2026-08-24 20:13:35 +03:00
copyright: verify SPDX-License-Identifier presence as well
This commit is contained in:
parent
be632e23df
commit
758537854f
1 changed files with 8 additions and 0 deletions
|
|
@ -107,6 +107,9 @@ sub scanfile {
|
|||
$found++;
|
||||
}
|
||||
}
|
||||
if($l =~ /SPDX-License-Identifier:/) {
|
||||
$spdx = 1;
|
||||
}
|
||||
# allow within the first 100 lines
|
||||
if(++$line > 100) {
|
||||
last;
|
||||
|
|
@ -120,6 +123,7 @@ sub checkfile {
|
|||
my ($file) = @_;
|
||||
my $fine = 0;
|
||||
@copyright=();
|
||||
$spdx = 0;
|
||||
my $found = scanfile($file);
|
||||
|
||||
if($found < 1) {
|
||||
|
|
@ -131,6 +135,10 @@ sub checkfile {
|
|||
# that fine
|
||||
return 1;
|
||||
}
|
||||
if(!$spdx) {
|
||||
print "$file:1: missing SPDX-License-Identifier\n";
|
||||
return 2;
|
||||
}
|
||||
|
||||
my $commityear = undef;
|
||||
@copyright = sort {$$b{year} cmp $$a{year}} @copyright;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue