From ec0db8383225e191e7902031dbec24dda5a97bfd Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Fri, 21 Sep 2012 21:06:47 +0700 Subject: 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 --- cfg.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfg.mk b/cfg.mk index fcaf39f9..2cfd90cb 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'[ ]*(&&|\|\||;|\\?$$)' \ -- cgit v1.2.1