summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2012-09-21 21:06:47 +0700
committerGary V. Vaughan <gary@gnu.org>2012-09-21 23:03:38 +0700
commitec0db8383225e191e7902031dbec24dda5a97bfd (patch)
tree89fc060b036b6a50f023faf3b00999ab8fece644
parent85e8fa29b6d7ca87fce8d09b1bbdc4ef14c2cb11 (diff)
downloadlibtool-ec0db8383225e191e7902031dbec24dda5a97bfd.tar.gz
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 <gary@gnu.org>
-rw-r--r--cfg.mk2
1 files changed, 1 insertions, 1 deletions
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'[ ]*(&&|\|\||;|\\?$$)' \