contrib/check-code.py
changeset 32959 20ed0e6a4905
parent 32716 0c09afdf5704
child 33285 98f6c25aaf61
equal deleted inserted replaced
32958:75be14993fda 32959:20ed0e6a4905
   136     (r'^( *)\t', "don't use tabs to indent"),
   136     (r'^( *)\t', "don't use tabs to indent"),
   137     (r'sed (-e )?\'(\d+|/[^/]*/)i(?!\\\n)',
   137     (r'sed (-e )?\'(\d+|/[^/]*/)i(?!\\\n)',
   138      "put a backslash-escaped newline after sed 'i' command"),
   138      "put a backslash-escaped newline after sed 'i' command"),
   139     (r'^diff *-\w*[uU].*$\n(^  \$ |^$)', "prefix diff -u/-U with cmp"),
   139     (r'^diff *-\w*[uU].*$\n(^  \$ |^$)', "prefix diff -u/-U with cmp"),
   140     (r'^\s+(if)? diff *-\w*[uU]', "prefix diff -u/-U with cmp"),
   140     (r'^\s+(if)? diff *-\w*[uU]', "prefix diff -u/-U with cmp"),
       
   141     (r'python\s.+\.py', "don't use 'python', use '$PYTHON'"),
   141     (r'seq ', "don't use 'seq', use $TESTDIR/seq.py"),
   142     (r'seq ', "don't use 'seq', use $TESTDIR/seq.py"),
   142     (r'\butil\.Abort\b', "directly use error.Abort"),
   143     (r'\butil\.Abort\b', "directly use error.Abort"),
   143     (r'\|&', "don't use |&, use 2>&1"),
   144     (r'\|&', "don't use |&, use 2>&1"),
   144     (r'\w =  +\w', "only one space after = allowed"),
   145     (r'\w =  +\w', "only one space after = allowed"),
   145     (r'\bsed\b.*[^\\]\\n', "don't use 'sed ... \\n', use a \\ and a newline"),
   146     (r'\bsed\b.*[^\\]\\n', "don't use 'sed ... \\n', use a \\ and a newline"),