diff options
author | Zack Weinberg <zackw@panix.com> | 2021-07-07 10:00:47 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2021-07-20 12:14:37 -0400 |
commit | 23af132d3d7c2256a2f4b0f7ccd3ebebdeb296b4 (patch) | |
tree | bd9177b15280fb2c41c546031e4e5def1e8fee0a /Makefile.am | |
parent | de3ffc1be873dc34cb1c1aa81d1b33eb35b35f32 (diff) | |
download | libxcrypt-23af132d3d7c2256a2f4b0f7ccd3ebebdeb296b4.tar.gz libxcrypt-23af132d3d7c2256a2f4b0f7ccd3ebebdeb296b4.tar.bz2 libxcrypt-23af132d3d7c2256a2f4b0f7ccd3ebebdeb296b4.zip |
List policies exhaustively in .perlcriticrc and enforce this.
.perlcriticrc now explicitly mentions every single policy that is
available from the policy packages we use, as either enabled or
disabled. Furthermore .perlcriticrc lists, in comments, all of the
expected policy sets and related distributions that should be
available, with version pins; this is now the canonical home for this
information.
A new ancillary script, build-aux/check-perlcritic-config, validates
that the list of policies in .perlcriticrc is 1:1 with the set of
available policies. It is run by ‘make distcheck.’ (Todo: convert to
a local perlcritic policy so that every run of perlcritic does this
validation.)
These changes will hopefully prevent future problems along the lines
of 5ad98a9dca84f064e7dc19049afbc478d7320f97 (reverted by
55880f9d2e057b83ccaf29132f01a16d7285a7a7), where two developers did
not have the same set of perlcritic policies installed and therefore
disagreed on whether a ‘no critic’ annotation was necessary. They
will also ensure that the set of perlcritic policies being tested in
CI is exactly what we expect.
The downside of this change is that .perlcriticrc is now harder to
read through and find all the policies with configuration. Better
ideas for organizing it are welcomed.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 86c4183..c1f91d4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -35,6 +35,7 @@ EXTRA_DIST = \ lib/libcrypt.minver \ lib/xcrypt.h.in \ build-aux/BuildCommon.pm \ + build-aux/check-perlcritic-config \ build-aux/compute-symver-floor \ build-aux/expand-selected-hashes \ build-aux/gen-crypt-h \ @@ -597,7 +598,9 @@ phony_targets += test-programs # Additional checks to run in `make distcheck'. distcheck-hook: - cd $(top_srcdir) && perlcritic ./ + cd $(top_srcdir) && \ + $(PERL) ./build-aux/check-perlcritic-config && \ + perlcritic --quiet ./ # Every object file depends on crypt-symbol-vers.h and crypt-hashes.h, # which are generated files, so automatic dependency generation is not |