changeset 37243:79af9ae46a78

check-code: tighten the check for `ls -R` Otherwise, this was flagging `... lfs.serve=False -R server ...` in the tests.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 31 Mar 2018 15:54:26 -0400
parents b5caa13d1a73
children 67db84842356
files contrib/check-code.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Sat Mar 31 16:41:17 2018 +0530
+++ b/contrib/check-code.py	Sat Mar 31 15:54:26 2018 -0400
@@ -111,7 +111,7 @@
     (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`"),