[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
run syntax-check rules on gnulib's own sources
From: |
Jim Meyering |
Subject: |
run syntax-check rules on gnulib's own sources |
Date: |
Tue, 17 Jan 2012 19:05:51 +0100 |
Here's a framework by which "make sc_check" will run
maint.mk's syntax-check rules on gnulib's own sources.
The first patch adds the rule and a new file, cfg.mk
which disables all of the currently-failing tests (many!)
The next few patches enable tests one by one, removing
the test name from the skip-list in cfg.mk and addressing
the problem -- either legitimate (by fixing sources and/or maint.mk)
or false positive (by exempting the affected files via the regexp
variables at the end of cfg.mk).
Just poking semi-randomly, by enabling tests and examining
the resulting "make sc_check" failures, I've found a few easy fixes.
If it's easy to change upstream copies of
build-aux/texinfo.tex and doc/Copyright/assign.future.manual,
I'd be happy to do that (let me know how), and then we
won't need to exempt them.
I went ahead and removed the single trailing blank in
doc/gnu-oids.texi on the principle that it won't be updated
frequently, and it might be easy to fix upstream to match.
[1/8] maint: add framework to run syntax-check rules against
[2/8] maint: remove empty lines at EOF, but excluding
[3/8] maint: enable double-word-prohibiting rule
[4/8] maint: enable sc_prohibit_hash_pjw_without_use
[5/8] maint: enable sc_prohibit_intprops_without_use
[6/8] maint: enable sc_prohibit_cloexec_without_use
[7/8] maint: enable sc_prohibit_openat_without_use
[8/8] maint: enable sc_trailing_blank
Here are the ChangeLog entries:
2012-01-17 Jim Meyering <address@hidden>
maint: enable sc_trailing_blank
* build-aux/pmccabe.css: Remove trailing blanks.
* doc/acl-cygwin.txt: Likewise.
* doc/gnu-oids.texi: Likewise
* cfg.mk: Enable sc_trailing_blank.
Exempt build-aux/texinfo.tex and doc/Copyright/assign.future.manual.
maint: enable sc_prohibit_openat_without_use
* cfg.mk: Enable sc_prohibit_openat_without_use.
Exempt lib/selinux-at.c.
maint: enable sc_prohibit_cloexec_without_use
* cfg.mk: Enable sc_prohibit_cloexec_without_use.
* lib/dup-safer-flag.c: Don't include "cloexec.h". Not needed.
maint: enable sc_prohibit_intprops_without_use
* cfg.mk: Enable sc_prohibit_intprops_without_use
* tests/test-nanosleep.c: Don't include "intprops.h". Not needed.
maint: enable sc_prohibit_hash_pjw_without_use
* cfg.mk: Enable sc_prohibit_hash_pjw_without_use.
* top/maint.mk (sc_prohibit_hash_pjw_without_use): Adjust regexp
to match any use of \<hash_pjw\>, i.e., not necessarily with a
following " (".
maint: enable double-word-prohibiting rule
* cfg.mk (local-checks-to-skip): Enable sc_prohibit_doubled_word.
Exempt three files.
maint: remove empty lines at EOF, but excluding modules/*
Apply syntax rules at home as well as abroad. Most changes
were induced by running this:
make srcdir=. _build-aux=build-aux -f top/maint.mk \
sc_prohibit_empty_lines_at_EOF | grep -v modules/ \
| xargs perl -pi -0777 -e 's/\n\n+$/\n/'
* cfg.mk (local-checks-to-skip): Enable sc_prohibit_empty_lines_at_EOF.
Exempt modules/* and two binary files.
* doc/regexprops-generic.texi: *Add* a newline at EOF. There was none.
* doc/Copyright/assign.translation.manual: Remove empty lines at EOF.
* doc/Copyright/request-assign.future: Likewise.
* doc/Copyright/request-disclaim.changes: Likewise.
* doc/INSTALL: Likewise.
* doc/INSTALL.ISO: Likewise.
* doc/INSTALL.UTF-8: Likewise.
* doc/acl-cygwin.txt: Likewise.
* doc/acl-resources.txt: Likewise.
* doc/fdl-1.2.texi: Likewise.
* doc/fdl-1.3.texi: Likewise.
* doc/fdl.texi: Likewise.
* lib/argp-pin.c: Likewise.
* lib/round.c: Likewise.
* lib/unicase/u16-totitle.c: Likewise.
* lib/unictype/block_test.c: Likewise.
* lib/uninorm/canonical-decomposition.c: Likewise.
* m4/README: Likewise.
* m4/relocatable-lib.m4: Likewise.
* tests/test-isnand-nolibm.c: Likewise.
* tests/test-isnand.c: Likewise.
* tests/uninorm/NormalizationTest.txt: Likewise.
maint: add framework to run syntax-check rules against gnulib sources
* cfg.mk: New file, to disable all currently-failing tests.
We'll enable them one by one, as they are made to pass.
* Makefile (sc_maint): New rule.
- run syntax-check rules on gnulib's own sources,
Jim Meyering <=
- [PATCH 6/8] maint: enable sc_prohibit_cloexec_without_use, Jim Meyering, 2012/01/17
- [PATCH 5/8] maint: enable sc_prohibit_intprops_without_use, Jim Meyering, 2012/01/17
- [PATCH 8/8] maint: enable sc_trailing_blank, Jim Meyering, 2012/01/17
- [PATCH 7/8] maint: enable sc_prohibit_openat_without_use, Jim Meyering, 2012/01/17
- [PATCH 1/8] maint: add framework to run syntax-check rules against gnulib sources, Jim Meyering, 2012/01/17
- [PATCH 3/8] maint: enable double-word-prohibiting rule, Jim Meyering, 2012/01/17
- [PATCH 2/8] maint: remove empty lines at EOF, but excluding modules/*, Jim Meyering, 2012/01/17