Author: adam-guest
Date: 2008-07-07 17:19:05 +0000 (Mon, 07 Jul 2008)
New Revision: 1565
Modified:
trunk/debian/changelog
trunk/scripts/checkbashisms.pl
Log:
Fix false positives in the brace expansion and invalid function name checks
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-07-07 13:36:12 UTC (rev 1564)
+++ trunk/debian/changelog 2008-07-07 17:19:05 UTC (rev 1565)
@@ -5,7 +5,8 @@
+ Fix a thinko in the quoted-block detection (thankfully the effects were
largely benign, unless one was attempting to check libtool...)
+ Fix false positives in the checks for "dirs", "popd", "pushd", "shopt"
- and "ulimit" and the "echo with unsafe backslash" checks
+ and "ulimit" and the "echo with unsafe backslash", brace expansion and
+ invalid function name checks
+ Fix a false-positive in the "source script with arguments check"
+ Treat """" as "" when removing quotes
+ Catch shell script wrappers which use "foo $0 $@ &\nexec true"
Modified: trunk/scripts/checkbashisms.pl
===================================================================
--- trunk/scripts/checkbashisms.pl 2008-07-07 13:36:12 UTC (rev 1564)
+++ trunk/scripts/checkbashisms.pl 2008-07-07 17:19:05 UTC (rev 1565)
@@ -447,7 +447,7 @@
q<should be 'b = a'>,
qr'\[\s+[^\]]+\s+==\s' => q<should be 'b = a'>,
qr'\s\|\&' => q<pipelining is not POSIX>,
- qr'[^\\]\{([^\s\\\}]+?,)+[^\\\}\s]+\}' =>
+ qr'[^\\\$]\{([^\s\\\}]+?,)+[^\\\}\s]+\}' =>
q<brace expansion>,
qr'(?:^|\s+)\w+\[\d+\]=' => q<bash arrays, H[0]>,
$LEADIN . qr'(read\s*(-[^r]+)*(?:;|$))' => q<should be read [-r]
variable>,
@@ -478,7 +478,7 @@
$LEADIN . qr'local\s+-[a-zA-Z]+' => q<local -opt>,
$LEADIN . qr'local\s+\w+=' => q<local foo=bar>,
$LEADIN . qr'local\s+\w+\s+\w+' => q<local x y>,
- qr'(?:^|\s+)\s*\(?\w*[^\(\w\s]+\S*?\s*\(\)[^\"]?'
+ qr'(?:^|\s+)\s*\(?\w*[^\(\w\s]+\S*?\s*\(\)\s*([\{|\(]|\Z)'
=> q<function names should only contain [a-z0-9_]>,
$LEADIN . qr'(push|pop)d(\s|\Z)' => q<(push|pod)d>,
$LEADIN . qr'export\s+-[^p]' => q<export only takes -p as an option>,
--
To unsubscribe, send mail to [EMAIL PROTECTED]