diff options
author | Gary V. Vaughan <gary@gnu.org> | 2011-11-20 21:08:24 +0700 |
---|---|---|
committer | Gary V. Vaughan <gary@gnu.org> | 2011-11-25 14:53:42 +0700 |
commit | 8fad6be03e8eca44e5e771cfbb907d3840a8e01e (patch) | |
tree | 82ccc492a8aef1fef65fdaecca176331e43aa5a0 /cfg.mk | |
parent | 4757bf0637658fd2e298042d9f7a0d51c5f49495 (diff) | |
download | libtool-8fad6be03e8eca44e5e771cfbb907d3840a8e01e.tar.gz |
syntax-check: fix violations and implement sc_useless_braces_in_variable_derefs.
Until now, libtool sources have used braced variable names
seemingly at random! Almost always the braces are just noise, so
remove all the unnecessary ones.
* cfg.mk (sc_useless_braces_in_variable_derefs): New syntax
check rule to ensure we only reintroduce braced variable
dereferences if they are followed by a valid variable name
character.
build-aux/general.m4sh, build-aux/git-hooks/commit-msg,
build-aux/ltmain.m4sh, build-aux/options-parser, configure.ac,
libltdl/configure.ac, m4/libtool.m4, m4/ltdl.m4,
m4/ltoptions.m4, tests/defs.m4sh, tests/demo-nopic.test,
tests/depdemo/configure.ac, tests/flags.at, tests/link.test,
tests/objectlist.test, tests/quote.test, tests/static.at: Remove
spurious braces.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Diffstat (limited to 'cfg.mk')
-rw-r--r-- | cfg.mk | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -190,6 +190,12 @@ define _sc_search_regexp_or_exclude fi || :; endef +exclude_file_name_regexp--sc_useless_braces_in_variable_derefs = /cvsu$$ +sc_useless_braces_in_variable_derefs: + @prohibit='\$${[0-9A-Za-z_]+}[^0-9A-Za-z_]' \ + halt='found spurious braces around variable dereference' \ + $(_sc_search_regexp) + sc_useless_quotes_in_assignment: @prohibit='^[ ]*[A-Za-z_][A-Za-z0-9_]*="[^ !#&()*;<>?@~^{|}]*"$$' \ halt='found spurious quotes around assignment value' \ |