Author: adam-guest
Date: 2008-06-03 05:21:20 +0000 (Tue, 03 Jun 2008)
New Revision: 1473
Modified:
trunk/scripts/checkbashisms.pl
Log:
Fix explanation for $""
Modified: trunk/scripts/checkbashisms.pl
===================================================================
--- trunk/scripts/checkbashisms.pl 2008-06-02 18:45:23 UTC (rev 1472)
+++ trunk/scripts/checkbashisms.pl 2008-06-03 05:21:20 UTC (rev 1473)
@@ -304,7 +304,7 @@
# can match "foo <<-?'xyz'" as a heredoc later
# The check is a little more greedy than we'd like, but the
# heredoc test itself will weed out any false positives
- $cat_line =~ s/(^|[^<\\-](\\\\)*)\'(\\.|[^\\\'])+\'/$1''/g;
+ $cat_line =~ s/(^|[^<\\-](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g;
while (my ($re,$expl) = each %string_bashisms) {
if ($line =~ m/($re)/) {
@@ -318,7 +318,7 @@
# We've checked for all the things we still want to notice in
# double-quoted strings, so now remove those strings as well.
$line =~ s/(^|[^\\](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g;
- $cat_line =~ s/(^|[^<\\-](\\\\)*)\"(\\.|[^\\\"])+\"/$1""/g;
+ $cat_line =~ s/(^|[^<\\-](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g;
while (my ($re,$expl) = each %bashisms) {
if ($line =~ m/($re)/) {
$found = 1;
@@ -454,7 +454,7 @@
'\$\{?SHLVL\}?\b' => q<$SHLVL>,
'<<<' => q<\<\<\< here string>,
$LEADIN .
'echo\s+(?:-[^e]+\s+)?([\"])[^\"]*(\\\[abcEfnrtv\\\0])+.*?[\"]' => q<unsafe
echo with backslash>,
- '(?<![\$\\\])\$\"[^\"]+\"' => q<$"foo" should be eval gettext "foo">,
+ '(?<![\$\\\])\$\"[^\"]+\"' => q<$"foo" should be eval_gettext "foo">,
);
%singlequote_bashisms = (
--
To unsubscribe, send mail to [EMAIL PROTECTED]