diff options
author | Zack Weinberg <zackw@panix.com> | 2020-11-28 12:22:09 -0500 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-11-30 11:45:25 -0500 |
commit | 0cfa111eba910a1467bc74b962a2356898284556 (patch) | |
tree | 7787cfeb268d5f7965386447a6d74521a1da2a44 | |
parent | 50e9bcc67d76f0e7e9fbe1bd08b3c73ae68a4e9b (diff) | |
download | autoconf-0cfa111eba910a1467bc74b962a2356898284556.tar.gz |
sc_error_message_uppercase: allow fully uppercased words
If an error message starts with an entire fully uppercased word,
that’s probably a proper noun and it should stay that way. For
instance, autoreconf has an error message that starts with
"AM_GNU_GETTEXT is used, but ..."; AM_GNU_GETTEXT is the name of an
Automake macro, it needs to stay uppercased.
This subsumes the existing exception for the words FATAL and WARNING.
While I was in there I generalized the exception for PRIuMAX to cover
all of the inttypes.h PRI* and SCN* macros.
This patch has been submitted to Gnulib; until it is merged there,
anyone running ‘make fetch’ should take care not to drop this change.
* maint.mk (sc_error_message_uppercase): Allow error messages that
begin with any fully uppercased word, or with any of the inttypes.h
PRI[dioux]\w+ or SCN[dioux]\w+ macros.
-rw-r--r-- | maint.mk | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -464,12 +464,15 @@ sc_error_message_warn_fatal: exit 1; } \ || : -# Error messages should not start with a capital letter +# Error messages should not start with a capital letter; +# however, if they start with an entire fully uppercased word, that's +# probably a proper noun and it should stay that way. We also exempt +# known instances of proper nouns that should stay mixed-case. sc_error_message_uppercase: @$(VC_LIST_EXCEPT) \ | xargs $(GREP) -nEA2 '[^rp]error *\(' /dev/null \ | $(GREP) -E '"[A-Z]' \ - | $(GREP) -vE '"FATAL|"WARNING|"Java|"C#|PRIuMAX' \ + | $(GREP) -vE '"([A-Z0-9_]{2,}\>|Java|C#|(PRI|SCN)[dioux])' \ && { echo '$(ME): found capitalized error message' 1>&2; \ exit 1; } \ || : |