checkcode: only match pushd/popd as word
otherwise it partially match common words like "pushdestination".
--- 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"),