changeset 31877:14c5a7637ecc

checkcode: only match pushd/popd as word otherwise it partially match common words like "pushdestination".
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 10 Apr 2017 17:05:54 +0200
parents 94c1d3c1aea2
children 4d0465dd13d2
files contrib/check-code.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Mon Apr 10 13:07:47 2017 -0700
+++ b/contrib/check-code.py	Mon Apr 10 17:05:54 2017 +0200
@@ -100,7 +100,7 @@
 
 testpats = [
   [
-    (r'pushd|popd', "don't use 'pushd' or 'popd', use 'cd'"),
+    (r'\b(push|pop)d\b', "don't use 'pushd' or 'popd', use 'cd'"),
     (r'\W\$?\(\([^\)\n]*\)\)', "don't use (()) or $(()), use 'expr'"),
     (r'grep.*-q', "don't use 'grep -q', redirect to /dev/null"),
     (r'(?<!hg )grep.* -a', "don't use 'grep -a', use in-line python"),