[Bash-completion-commits] [SCM] bash-completion branch, master, updated. bd35adfe218859c1a92fd3e6da94ec99337b7b38
Ville Skyttä
ville.skytta at iki.fi
Mon May 10 21:54:24 UTC 2010
The following commit has been merged in the master branch:
commit 783acae98cdc19317abdcc882551503822851c7c
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Tue May 11 00:47:52 2010 +0300
(lint) Anchor command start more strictly to avoid false positives.
diff --git a/test/runLint b/test/runLint
index b001676..b2bf005 100755
--- a/test/runLint
+++ b/test/runLint
@@ -14,26 +14,28 @@ gitgrep()
unset CDPATH
cd $(dirname "$0") ; cd ..
-gitgrep "\bawk\b.*-F([[:space:]]|[[:space:]]*[\"'][^\"']{2,})" \
+cmdstart='(^|[[:space:]]|\()'
+
+gitgrep $cmdstart"awk\b.*-F([[:space:]]|[[:space:]]*[\"'][^\"']{2,})" \
'awk with -F char or -F ERE, use -Fchar instead (Solaris)'
-gitgrep "\bawk\b.*\[:[a-z]*:\]" \
+gitgrep $cmdstart"awk\b.*\[:[a-z]*:\]" \
'awk with POSIX character class not supported in mawk (Debian/Ubuntu)'
-gitgrep '\bsed\b.*\\[?+]' \
+gitgrep $cmdstart'sed\b.*\\[?+]' \
'sed with ? or +, use POSIX BRE instead (\{m,n\})'
-gitgrep '\bsed\b.*\\\|' \
+gitgrep $cmdstart'sed\b.*\\\|' \
"sed with \|, use POSIX BRE (possibly multiple sed invocations) or another tool instead"
# TODO: really nonportable? appears to work fine in Linux, FreeBSD, Solaris
-#gitgrep '\bsed\b.*;' \
+#gitgrep $cmdstart'sed\b.*;' \
# 'sed with ;, use multiple -e options instead (POSIX?) (false positives?)'
-gitgrep '\bsed\b.*-[^[:space:]]*[rE]' \
+gitgrep $cmdstart'sed\b.*-[^[:space:]]*[rE]' \
'sed with -r or -E, drop and use POSIX BRE instead'
-gitgrep '\b[ef]grep\b' \
+gitgrep $cmdstart'[ef]grep\b' \
'[ef]grep, use grep -[EF] instead (historical/deprecated)'
# TODO: $ in sed subexpression used as an anchor (POSIX BRE optional, not in
--
bash-completion
More information about the Bash-completion-commits
mailing list