Mercurial > hg-stable
comparison contrib/check-code.py @ 29142:c07be448028b
check-code: fix py3 complaint about \NNN being invalid unicode
author | timeless <timeless@mozdev.org> |
---|---|
date | Wed, 11 May 2016 01:56:08 +0000 |
parents | e05bdc01505f |
children | 8ed693ec5398 |
comparison
equal
deleted
inserted
replaced
29141:ba8999547f81 | 29142:c07be448028b |
---|---|
101 (r'(^|\|\s*)\bwc\b[^|]*$\n(?!.*\(re\))', "filter wc output"), | 101 (r'(^|\|\s*)\bwc\b[^|]*$\n(?!.*\(re\))', "filter wc output"), |
102 (r'head -c', "don't use 'head -c', use 'dd'"), | 102 (r'head -c', "don't use 'head -c', use 'dd'"), |
103 (r'tail -n', "don't use the '-n' option to tail, just use '-<num>'"), | 103 (r'tail -n', "don't use the '-n' option to tail, just use '-<num>'"), |
104 (r'sha1sum', "don't use sha1sum, use $TESTDIR/md5sum.py"), | 104 (r'sha1sum', "don't use sha1sum, use $TESTDIR/md5sum.py"), |
105 (r'ls.*-\w*R', "don't use 'ls -R', use 'find'"), | 105 (r'ls.*-\w*R', "don't use 'ls -R', use 'find'"), |
106 (r'printf.*[^\\]\\([1-9]|0\d)', "don't use 'printf \NNN', use Python"), | 106 (r'printf.*[^\\]\\([1-9]|0\d)', r"don't use 'printf \NNN', use Python"), |
107 (r'printf.*[^\\]\\x', "don't use printf \\x, use Python"), | 107 (r'printf.*[^\\]\\x', "don't use printf \\x, use Python"), |
108 (r'\$\(.*\)', "don't use $(expr), use `expr`"), | 108 (r'\$\(.*\)', "don't use $(expr), use `expr`"), |
109 (r'rm -rf \*', "don't use naked rm -rf, target a directory"), | 109 (r'rm -rf \*', "don't use naked rm -rf, target a directory"), |
110 (r'(^|\|\s*)grep (-\w\s+)*[^|]*[(|]\w', | 110 (r'(^|\|\s*)grep (-\w\s+)*[^|]*[(|]\w', |
111 "use egrep for extended grep syntax"), | 111 "use egrep for extended grep syntax"), |