[PATCH 4 of 4] check-code: tighten the check for `ls -R`
Matt Harbison
mharbison72 at gmail.com
Sat Mar 31 18:28:27 EDT 2018
# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1522526066 14400
# Sat Mar 31 15:54:26 2018 -0400
# Node ID 0d8b5aa297053419ed4a46678462aa295803cbeb
# Parent f3e750cdf0b3fb1977b7ea0f7685d2a86d3c199c
check-code: tighten the check for `ls -R`
Otherwise, this was flagging `... lfs.serve=False -R server ...` in the tests.
diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -111,7 +111,7 @@ testpats = [
(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"),
- (r'ls.*-\w*R', "don't use 'ls -R', use 'find'"),
+ (r'\bls\b.*-\w*R', "don't use 'ls -R', use 'find'"),
(r'printf.*[^\\]\\([1-9]|0\d)', r"don't use 'printf \NNN', use Python"),
(r'printf.*[^\\]\\x', "don't use printf \\x, use Python"),
(r'\$\(.*\)', "don't use $(expr), use `expr`"),
More information about the Mercurial-devel
mailing list