check-code: tighten the check for `ls -R`
authorMatt Harbison <matt_harbison@yahoo.com>
Sat, 31 Mar 2018 15:54:26 -0400
changeset 37241 79af9ae46a78
parent 37240 b5caa13d1a73
child 37242 67db84842356
check-code: tighten the check for `ls -R` Otherwise, this was flagging `... lfs.serve=False -R server ...` in the tests.
contrib/check-code.py
--- 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`"),