]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/check-non-portable-shell.pl
The seventh batch
[thirdparty/git.git] / t / check-non-portable-shell.pl
index dd8107cd7da24b01541f0bccf4cff332940f31e9..b2b28c2cedc6b2bd5f88876466243581cf294c53 100755 (executable)
@@ -47,6 +47,8 @@ while (<>) {
        /\bgrep\b.*--file\b/ and err 'grep --file FILE is not portable (use grep -f FILE)';
        /\b[ef]grep\b/ and err 'egrep/fgrep obsolescent (use grep -E/-F)';
        /\bexport\s+[A-Za-z0-9_]*=/ and err '"export FOO=bar" is not portable (use FOO=bar && export FOO)';
+       /\blocal\s+[A-Za-z0-9_]*=\$([A-Za-z0-9_{]|[(][^(])/ and
+               err q(quote "$val" in 'local var=$val');
        /^\s*([A-Z0-9_]+=(\w*|(["']).*?\3)\s+)+(\w+)/ and exists($func{$4}) and
                err '"FOO=bar shell_func" assignment extends beyond "shell_func"';
        $line = '';