The following commit has been merged in the master branch:
commit 667df30a498a6f0837aa2681ea88a2dd491ad75c
Author: Raphael Geissert <[email protected]>
Date:   Sun Feb 24 12:41:58 2013 +0100

    checkbashims: Avoid some false positives on $_ check
    
    "$$_foo" doesn't refer to the $_ variable, so don't flag it as a
    bashism.
    
    Signed-off-by: Raphael Geissert <[email protected]>
    Signed-off-by: James McCoy <[email protected]>

diff --git a/scripts/checkbashisms.pl b/scripts/checkbashisms.pl
index 44f1f04..fd0b1be 100755
--- a/scripts/checkbashisms.pl
+++ b/scripts/checkbashisms.pl
@@ -672,7 +672,7 @@ sub init_hashes {
        qr'(?:^|\s+)TMOUT='           => q<TMOUT=>,
        qr'\$\{?TIMEFORMAT\}?\b'      => q<$TIMEFORMAT>,
        qr'(?:^|\s+)TIMEFORMAT='      => q<TIMEFORMAT=>,
-       qr'\$\{?_\}?\b'               => q<$_>,
+       qr'(?<!\$)\$\{?_\}?\b'        => q<$_>,
        qr'(?:^|\s+)GLOBIGNORE='      => q<GLOBIGNORE=>,
        qr'<<<'                       => q<\<\<\< here string>,
        $LEADIN . qr'echo\s+(?:-[^e\s]+\s+)?\"[^\"]*(\\[abcEfnrtv0])+.*?[\"]' 
=> q<unsafe echo with backslash>,

-- 
Git repository for devscripts

_______________________________________________
devscripts-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel

Reply via email to