Author: adam-guest
Date: 2008-03-29 11:43:15 +0000 (Sat, 29 Mar 2008)
New Revision: 1221
Modified:
trunk/debian/changelog
trunk/scripts/checkbashisms.pl
Log:
Catch "foo && exec bar" shell script wrappers
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-03-29 11:40:49 UTC (rev 1220)
+++ trunk/debian/changelog 2008-03-29 11:43:15 UTC (rev 1221)
@@ -8,7 +8,8 @@
+ Fix heredoc detection to match '<< \EOT ... EOT'
+ Improve the invalid function name test to not trigger on IFS="()"
+ Modify the brace expansion test to allow "${foo},${bar}"
- + Add another variation on the theme of shell wrapper detection (${1+"$@"})
+ + Add another couple of variations on the theme of shell wrapper detection
+ (${1+"$@"} and "foo && exec bar")
+ Temporarily disable the check for "complete" as it's too prone to false
positives
+ Add checks for pushd and popd
Modified: trunk/scripts/checkbashisms.pl
===================================================================
--- trunk/scripts/checkbashisms.pl 2008-03-29 11:40:49 UTC (rev 1220)
+++ trunk/scripts/checkbashisms.pl 2008-03-29 11:43:15 UTC (rev 1221)
@@ -364,7 +364,7 @@
next if /^#/o;
next if /^$/o;
last if (++$i > 55);
- if
(/(^\s*|\beval\s*[\'\"]|;\s*)exec\s*.+\s*.?\$$var.?\s*(--\s*)?.?(\${1:?\+.?)?\$(\@|\*)/)
{
+ if
(/(^\s*|\beval\s*[\'\"]|;\s*|&&\s*)exec\s*.+\s*.?\$$var.?\s*(--\s*)?.?(\${1:?\+.?)?\$(\@|\*)/)
{
$ret = 1;
last;
} elsif (/^\s*(\w+)=\$0;/) {
--
To unsubscribe, send mail to [EMAIL PROTECTED]