]> eyrie.org Git - kerberos/krb5-strength.git/commitdiff
Use new support for SPDX check exclusions main
authorRuss Allbery <eagle@eyrie.org>
Sun, 31 Dec 2023 00:55:21 +0000 (16:55 -0800)
committerRuss Allbery <eagle@eyrie.org>
Sun, 31 Dec 2023 00:55:21 +0000 (16:55 -0800)
Update the SPDX check and test configuration machinery from
rra-c-util and use the new support for excluding paths from SPDX
checks.

tests/data/perl.conf
tests/docs/spdx-license-t
tests/tap/perl/Test/RRA/Config.pm

index 43db7b482701dd64ee9ec8367e23d1a6d94c3ccb..fd26d5a707a537f36017dda7907c04cb36ff294d 100644 (file)
@@ -3,8 +3,12 @@
 # Ignore the script in cracklib for Perl style checking.  This is verbatim
 # from CrackLib and isn't useful to rewrite.
 @CRITIC_IGNORE = qw(cracklib);
 # Ignore the script in cracklib for Perl style checking.  This is verbatim
 # from CrackLib and isn't useful to rewrite.
 @CRITIC_IGNORE = qw(cracklib);
+@SPDX_IGNORE = (qr{ \A cracklib/ }xms);
 @STRICT_IGNORE = qw(cracklib);
 
 @STRICT_IGNORE = qw(cracklib);
 
+# Default minimum version requirement for included Perl scripts.
+$MINIMUM_VERSION = '5.010';
+
 # The Heimdal history implementation uses a bunch of modules, but may not be
 # of interest to all users.  Skip strict testing if its prerequisites aren't
 # installed.
 # The Heimdal history implementation uses a bunch of modules, but may not be
 # of interest to all users.  Skip strict testing if its prerequisites aren't
 # installed.
@@ -13,8 +17,5 @@
   Readonly
 );
 
   Readonly
 );
 
-# Default minimum version requirement for included Perl scripts.
-$MINIMUM_VERSION = '5.010';
-
 # File must end with this line.
 1;
 # File must end with this line.
 1;
index cf407ad2b9105281db8f9df3e92e81cd497e6fac..ea43c7ce24142b5673d338c5550636b3d29f04f2 100755 (executable)
@@ -39,6 +39,7 @@ use lib "$ENV{C_TAP_SOURCE}/tap/perl";
 
 use Test::RRA qw(skip_unless_automated);
 use Test::RRA::Automake qw(all_files automake_setup);
 
 use Test::RRA qw(skip_unless_automated);
 use Test::RRA::Automake qw(all_files automake_setup);
+use Test::RRA::Config qw(@SPDX_IGNORE);
 
 use File::Basename qw(basename);
 use Test::More;
 
 use File::Basename qw(basename);
 use Test::More;
@@ -58,7 +59,7 @@ my @IGNORE = (
     qr{ [.] output \z }xms,             # Test data
 );
 my @IGNORE_PATHS = (
     qr{ [.] output \z }xms,             # Test data
 );
 my @IGNORE_PATHS = (
-    qr{ \A cracklib/ }xms,                     # Special case for krb5-strength
+    @SPDX_IGNORE,
     qr{ \A debian/ }xms,                       # Found in debian/* branches
     qr{ \A docs/metadata/ }xms,                # Package license should be fine
     qr{ \A docs/protocol[.](html|txt) \z }xms, # Generated by xml2rfc
     qr{ \A debian/ }xms,                       # Found in debian/* branches
     qr{ \A docs/metadata/ }xms,                # Package license should be fine
     qr{ \A docs/protocol[.](html|txt) \z }xms, # Generated by xml2rfc
index 0c6973c68de0ef18bb90110fe866e6487898d087..99ae5455416d72edfdaf59c9846f8fb87320a760 100644 (file)
@@ -26,7 +26,7 @@ BEGIN {
     @EXPORT_OK = qw(
         $COVERAGE_LEVEL @COVERAGE_SKIP_TESTS @CRITIC_IGNORE $LIBRARY_PATH
         $MINIMUM_VERSION %MINIMUM_VERSION @MODULE_VERSION_IGNORE
     @EXPORT_OK = qw(
         $COVERAGE_LEVEL @COVERAGE_SKIP_TESTS @CRITIC_IGNORE $LIBRARY_PATH
         $MINIMUM_VERSION %MINIMUM_VERSION @MODULE_VERSION_IGNORE
-        @POD_COVERAGE_EXCLUDE @STRICT_IGNORE @STRICT_PREREQ
+        @POD_COVERAGE_EXCLUDE @SPDX_IGNORE @STRICT_IGNORE @STRICT_PREREQ
     );
 
     # This version should match the corresponding rra-c-util release, but with
     );
 
     # This version should match the corresponding rra-c-util release, but with
@@ -62,6 +62,7 @@ our $MINIMUM_VERSION = '5.010';
 our %MINIMUM_VERSION;
 our @MODULE_VERSION_IGNORE;
 our @POD_COVERAGE_EXCLUDE;
 our %MINIMUM_VERSION;
 our @MODULE_VERSION_IGNORE;
 our @POD_COVERAGE_EXCLUDE;
+our @SPDX_IGNORE;
 our @STRICT_IGNORE;
 our @STRICT_PREREQ;
 
 our @STRICT_IGNORE;
 our @STRICT_PREREQ;
 
@@ -76,7 +77,7 @@ __END__
 
 =for stopwords
 Allbery rra-c-util Automake perlcritic .libs namespace subdirectory sublicense
 
 =for stopwords
 Allbery rra-c-util Automake perlcritic .libs namespace subdirectory sublicense
-MERCHANTABILITY NONINFRINGEMENT regexes
+MERCHANTABILITY NONINFRINGEMENT regexes SPDX
 
 =head1 NAME
 
 
 =head1 NAME
 
@@ -159,6 +160,12 @@ testing.  Normally, all methods have to be documented in the POD for a Perl
 module, but methods matching any of these regexes will be considered private
 and won't require documentation.
 
 module, but methods matching any of these regexes will be considered private
 and won't require documentation.
 
+=item @SPDX_IGNORE
+
+Regexes that match files that should be excluded from SPDX license header
+checks, in addition to the standard exclusions.  The regular expression is
+matched against the file path relative to the top of the source tree.
+
 =item @STRICT_IGNORE
 
 Additional directories to ignore when doing recursive Test::Strict testing for
 =item @STRICT_IGNORE
 
 Additional directories to ignore when doing recursive Test::Strict testing for
@@ -183,7 +190,7 @@ Russ Allbery <eagle@eyrie.org>
 
 =head1 COPYRIGHT AND LICENSE
 
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2015-2016, 2019, 2021 Russ Allbery <eagle@eyrie.org>
+Copyright 2015-2016, 2019, 2021, 2023 Russ Allbery <eagle@eyrie.org>
 
 Copyright 2013-2014 The Board of Trustees of the Leland Stanford Junior
 University
 
 Copyright 2013-2014 The Board of Trustees of the Leland Stanford Junior
 University