summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-06-13 09:51:32 +0200
committerDaniel Stenberg <daniel@haxx.se>2022-06-13 09:51:32 +0200
commit758537854f9a9165e19428868a4d5cd0e1c04a8c (patch)
tree2ce12046628314e008eee80393b6b7591b15bfda /scripts
parentbe632e23dffcf5165444cef6f8671988f065ac88 (diff)
downloadcurl-758537854f9a9165e19428868a4d5cd0e1c04a8c.tar.gz
copyright: verify SPDX-License-Identifier presence as well
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/copyright.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/copyright.pl b/scripts/copyright.pl
index 466a0459b..833c06f8d 100755
--- a/scripts/copyright.pl
+++ b/scripts/copyright.pl
@@ -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;