From 7be20f912b443031bf6a92d26e1fcff40189b0a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim Rühsen?= Date: Sat, 29 Apr 2017 22:50:50 +0200 Subject: [PATCH] * top/maint.mk: Improve sc_useless_cpp_parens Also find useles parens in #elif and even when tabs are used instead of spaces for indentation (before and after #). --- top/maint.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/top/maint.mk b/top/maint.mk index 0cabd2f31..356c66c82 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -775,7 +775,7 @@ sc_unmarked_diagnostics: # Avoid useless parentheses like those in this example: # #if defined (SYMBOL) || defined (SYM2) sc_useless_cpp_parens: - @prohibit='^# *if .*defined *\(' \ + @prohibit='^[ $(printf "\t")]*#[ $(printf "\t")]*(if|elif) .*defined *\(' \ halt='found useless parentheses in cpp directive' \ $(_sc_search_regexp) -- 2.11.0