contrib/check-code.py
changeset 19380 ee07f9d142c9
parent 19378 9de689d20230
child 19382 5aeb03b48ab4
--- a/contrib/check-code.py	Tue Nov 06 00:22:56 2012 +0100
+++ b/contrib/check-code.py	Mon Jul 01 06:50:58 2013 +0200
@@ -68,8 +68,8 @@
     (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.*\\([1-9]|0\d)', "don't use 'printf \NNN', use Python"),
-    (r'printf.*\\x', "don't use printf \\x, 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"),
     (r'(^|\|\s*)grep (-\w\s+)*[^|]*[(|]\w',