Author: adam-guest
Date: 2008-07-06 21:59:31 +0000 (Sun, 06 Jul 2008)
New Revision: 1562

Modified:
   trunk/debian/changelog
   trunk/scripts/checkbashisms.pl
Log:
  + Fix a false-positive in the "source script with arguments check"
  + Treat """" as "" when removing quotes

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-07-06 21:09:49 UTC (rev 1561)
+++ trunk/debian/changelog      2008-07-06 21:59:31 UTC (rev 1562)
@@ -6,6 +6,8 @@
       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
+    + Fix a false-positive in the "source script with arguments check"
+    + Treat """" as "" when removing quotes
   * debchange: Also collapse UNRELEASED stanzas when -d is used
   * debcheckout:
     + Improve git repository handling with --file

Modified: trunk/scripts/checkbashisms.pl
===================================================================
--- trunk/scripts/checkbashisms.pl      2008-07-06 21:09:49 UTC (rev 1561)
+++ trunk/scripts/checkbashisms.pl      2008-07-06 21:59:31 UTC (rev 1562)
@@ -200,8 +200,8 @@
 
            # Remove "" / '' as they clearly aren't quoted strings
            # and not considering them makes the matching easier
-           $line =~ s/(^|[^\\])(\'\')/$1/g;
-           $line =~ s/(^|[^\\])(\"\")/$1/g;
+           $line =~ s/(^|[^\\])(\'\')+/$1/g;
+           $line =~ s/(^|[^\\])(\"\")+/$1/g;
 
            if ($quote_string ne "") {
                my $otherquote = ($quote_string eq "\"" ? "\'" : "\"");
@@ -270,7 +270,7 @@
 
            # since this test is ugly, I have to do it by itself
            # detect source (.) trying to pass args to the command it runs
-           if (not $found and m/^\s*(\.\s+[^\s;\`]+\s+([^\s;]+))/) {
+           if (not $found and m/^\s*(\.\s+[^\s;\`:]+\s+([^\s;]+))/) {
                if ($2 =~ /^(\&|\||\d?>|<)/) {
                    # everything is ok
                    ;



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

Reply via email to