Mercurial > hg-stable
changeset 22100:efd5b7eb3e6d
check-code: capture "wc" as a word
Otherwise entries such as "wcchange" give false negative
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Sat, 02 Aug 2014 17:01:55 -0700 |
parents | 9ed5e1053303 |
children | 6fa40bd78bc8 |
files | contrib/check-code.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/check-code.py Wed Jun 25 15:58:05 2014 +0100 +++ b/contrib/check-code.py Sat Aug 02 17:01:55 2014 -0700 @@ -94,7 +94,7 @@ (r'sed.*-i', "don't use 'sed -i', use a temporary file"), (r'\becho\b.*\\n', "don't use 'echo \\n', use printf"), (r'echo -n', "don't use 'echo -n', use printf"), - (r'(^| )wc[^|]*$\n(?!.*\(re\))', "filter wc output"), + (r'(^| )\bwc\b[^|]*$\n(?!.*\(re\))', "filter wc output"), (r'head -c', "don't use 'head -c', use 'dd'"), (r'tail -n', "don't use the '-n' option to tail, just use '-<num>'"), (r'sha1sum', "don't use sha1sum, use $TESTDIR/md5sum.py"),