contrib/check-code.py
changeset 27557 28b5c4fcf48d
parent 26808 b81b8dbecc26
child 27560 15b06f306c1f
--- a/contrib/check-code.py	Tue Dec 29 18:11:14 2015 -0500
+++ b/contrib/check-code.py	Sun Dec 27 15:24:48 2015 -0800
@@ -122,7 +122,8 @@
     (r'^( *)\t', "don't use tabs to indent"),
     (r'sed (-e )?\'(\d+|/[^/]*/)i(?!\\\n)',
      "put a backslash-escaped newline after sed 'i' command"),
-    (r'^diff *-\w*u.*$\n(^  \$ |^$)', "prefix diff -u with cmp"),
+    (r'^diff *-\w*[uU].*$\n(^  \$ |^$)', "prefix diff -u/-U with cmp"),
+    (r'^\s+(if)? diff *-\w*[uU]', "prefix diff -u/-U with cmp"),
     (r'seq ', "don't use 'seq', use $TESTDIR/seq.py"),
     (r'\butil\.Abort\b', "directly use error.Abort"),
     (r'\|&', "don't use |&, use 2>&1"),