# HG changeset patch # User Mads Kiilerich # Date 2012-04-22 23:39:26 # Node ID ac987a9d8d494fc7c753af02fea454cd3d136bb1 # Parent f48b075ff0884b8fa08e41da25fb34c7b70feef6 check-code: 'printf \0' is apparently fine - accept it in check-code Nobody complained over '\0' in test-eol.t. The too strict check becomes a problem when this check is applied to more lines. diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -55,7 +55,7 @@ testpats = [ (r'head -c', "don't use 'head -c', use 'dd'"), (r'sha1sum', "don't use sha1sum, use $TESTDIR/md5sum.py"), (r'ls.*-\w*R', "don't use 'ls -R', use 'find'"), - (r'printf.*\\\d{1,3}', "don't use 'printf \NNN', use Python"), + (r'printf.*\\([1-9]|0\d)', "don't use 'printf \NNN', use Python"), (r'printf.*\\x', "don't use printf \\x, use Python"), (r'\$\(.*\)', "don't use $(expr), use `expr`"), (r'rm -rf \*', "don't use naked rm -rf, target a directory"),