# HG changeset patch # User Pierre-Yves David # Date 1491836754 -7200 # Node ID 14c5a7637ecc5f57a643cf387509bc8938d252c0 # Parent 94c1d3c1aea2f6b9021616b4e64bc4143787b6c0 checkcode: only match pushd/popd as word otherwise it partially match common words like "pushdestination". diff -r 94c1d3c1aea2 -r 14c5a7637ecc contrib/check-code.py --- 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'(?