>From baf55461a6b01978ba02327f790f4fd544b1342f Mon Sep 17 00:00:00 2001 From: Jose E. Marchesi <jema...@gnu.org> Date: Sun, 28 Mar 2010 13:35:24 +0200 Subject: [PATCH 2/3] Catch function calls with zero or more blank characters before the argument list in syntax check rules.
--- ChangeLog | 11 +++++++++++ top/maint.mk | 8 ++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1cf6e26..909ddc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2010-03-28 Jose E. Marchesi <jema...@gnu.org> + Catch function calls with zero or more blank characters before the + argument list in syntax check rules. + * top/maint.mk (sc_error_exit_success): Pattern changed to catch + calls to a functions with zero or more blanks separating the + function name and the open parenthesis. + (sc_error_message_warn_fatal): Likewise. + (sc_error_message_uppercase): Likewise. + (sc_error_message_period): Likewise. + +2010-03-28 Jose E. Marchesi <jema...@gnu.org> + Macro _header_without_use renamed to _sc_header_without_use in maint.mk * top/maint.mk: _header_without_use macro renamed to diff --git a/top/maint.mk b/top/maint.mk index 9cae5d9..ffcd728 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -217,21 +217,21 @@ sc_prohibit_magic_number_exit: # Using EXIT_SUCCESS as the first argument to error is misleading, # since when that parameter is 0, error does not exit. Use `0' instead. sc_error_exit_success: - @grep -nE 'error \(EXIT_SUCCESS,' \ + @grep -nE 'error *\(EXIT_SUCCESS,' \ $$($(VC_LIST_EXCEPT) | grep -E '\.[chly]$$') && \ { echo '$(ME): found error (EXIT_SUCCESS' 1>&2; exit 1; } || : # `FATAL:' should be fully upper-cased in error messages # `WARNING:' should be fully upper-cased, or fully lower-cased sc_error_message_warn_fatal: - @grep -nEA2 '[^rp]error \(' $$($(VC_LIST_EXCEPT)) \ + @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \ | grep -E '"Warning|"Fatal|"fatal' && \ { echo '$(ME): use FATAL, WARNING or warning' 1>&2; \ exit 1; } || : # Error messages should not start with a capital letter sc_error_message_uppercase: - @grep -nEA2 '[^rp]error \(' $$($(VC_LIST_EXCEPT)) \ + @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \ | grep -E '"[A-Z]' \ | grep -vE '"FATAL|"WARNING|"Java|"C#|PRIuMAX' && \ { echo '$(ME): found capitalized error message' 1>&2; \ @@ -239,7 +239,7 @@ sc_error_message_uppercase: # Error messages should not end with a period sc_error_message_period: - @grep -nEA2 '[^rp]error \(' $$($(VC_LIST_EXCEPT)) \ + @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \ | grep -E '[^."]\."' && \ { echo '$(ME): found error message ending in period' 1>&2; \ exit 1; } || : -- 1.6.5