From: Gary V. Vaughan Date: Fri, 21 Sep 2012 14:06:47 +0000 (+0700) Subject: syntax-check: improve prohibit_test_const_follows_var. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec0db8383225e191e7902031dbec24dda5a97bfd;p=thirdparty%2Flibtool.git syntax-check: improve prohibit_test_const_follows_var. * cfg.mk (sc_prohibit_test_const_follows_var): Also flag errors when the variable reference on the var side use ${brace_notation}. Signed-off-by: Gary V. Vaughan --- diff --git a/cfg.mk b/cfg.mk index fcaf39f9a..2cfd90cb5 100644 --- a/cfg.mk +++ b/cfg.mk @@ -184,7 +184,7 @@ sc_prohibit_test_unary_operators: # when the other operand is a constant -- just swap them, and remove the # spurious leading `x'. sc_prohibit_test_const_follows_var: - @var='[ ]+"[^$$"]*\$$[0-9A-Za-z_][^"]*"' \ + @var='[ ]+"[^$$"]*\$${?[0-9A-Za-z_][^"]*"' \ op='[ ]+(!?=|-[lgn][et]|-eq)' \ const='[ ]+[^-$$][^$$; ]*' \ prohibit='test'$$var$$op$$const'[ ]*(&&|\|\||;|\\?$$)' \