Author: adam-guest
Date: 2008-07-10 20:53:32 +0000 (Thu, 10 Jul 2008)
New Revision: 1569

Modified:
   trunk/debian/changelog
   trunk/scripts/checkbashisms.pl
Log:
Fix a false negative in the "function" check (Closes: #490223)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-07-09 22:39:48 UTC (rev 1568)
+++ trunk/debian/changelog      2008-07-10 20:53:32 UTC (rev 1569)
@@ -8,6 +8,7 @@
       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"
+    + Fix a false negative in the "function" check (Closes: #490223)
     + Treat """" as "" when removing quotes
     + Catch shell script wrappers which use "foo $0 $@ &\nexec true"
     + Don't treat '. "a b"' as a sourced script being passed arguments

Modified: trunk/scripts/checkbashisms.pl
===================================================================
--- trunk/scripts/checkbashisms.pl      2008-07-09 22:39:48 UTC (rev 1568)
+++ trunk/scripts/checkbashisms.pl      2008-07-10 20:53:32 UTC (rev 1569)
@@ -443,7 +443,7 @@
     my $LEADIN = qr'(?:(^|[`&;(|{])\s*|(if|then|do|while|shell)\s+)';
 
     %bashisms = (
-       qr'(?:^|\s+)function \w+\(\s*\)' =>   q<'function' is useless>,
+       qr'(?:^|\s+)function \w+(\s|\(|\Z)' => q<'function' is useless>,
        $LEADIN . qr'select\s+\w+' =>     q<'select' is not POSIX>,
        $LEADIN . qr'source\s+(?:\.\/|\/|\$)[^\s]+' =>
                                       q<should be '.', not 'source'>,



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to