maint.mk: prohibit doubled words
authorJim Meyering <meyering@redhat.com>
Sun, 10 Apr 2011 08:26:46 +0000 (10:26 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 11 Apr 2011 08:35:24 +0000 (10:35 +0200)
commita81348d2e136b0f2de110b49a5d0dfa5d7d76f71
treecdd76fd9321f2b367fe7e5ea6423de57ef5e4192
parentab426d01279fa5cb18891d4f088dc13683f86659
maint.mk: prohibit doubled words

Detect them also when they're separated by a newline.
There are 3 ways to customize it:
  - disable the test on a per file basis, as usual with rules using
    $(VC_LIST_EXCEPT)
  - replace the default doubled-word-selecting regexp (affects all files)
  - ignore a particular file-vs-doubled-word match
I nearly used that last one to ignore the "is is" match in
coreutils' NEWS file, since the text was "ls -is is ..."
To do that, I would have added this line to cfg.mk:
  ignore_doubled_word_match_RE_ = ^NEWS:[0-9]+:is[ ]is$
but it would have ignored any "is is" match in NEWS.
Low probability, but still...
Instead, I changed the text, slightly:
  -  ls -is is now consistent with ls -lis in ignoring values returned
  +  "ls -is" is now consistent with ls -lis in ignoring values returned
* top/maint.mk (prohibit_double_word_RE_): Provide default.
(prohibit_doubled_word_): Define.
(sc_prohibit_doubled_word): New rule.
(sc_prohibit_the_the): Remove.  Subsumed by the above.
ChangeLog
top/maint.mk