comparison contrib/check-code.py @ 28781:c042b98a6ff8

check-code: reject sed ... \\n This would have caught 142891ab6e89 (fixed by a5a13eeffc59) if repcomment didn't make the content of the perl code opaque to the check.
author timeless <timeless@mozdev.org>
date Wed, 30 Mar 2016 22:01:47 +0000
parents 35ad5bcdeb7e
children 9848a6c77a9b
comparison
equal deleted inserted replaced
28780:faff8c2b5ee3 28781:c042b98a6ff8
130 (r'^\s+(if)? diff *-\w*[uU]', "prefix diff -u/-U with cmp"), 130 (r'^\s+(if)? diff *-\w*[uU]', "prefix diff -u/-U with cmp"),
131 (r'seq ', "don't use 'seq', use $TESTDIR/seq.py"), 131 (r'seq ', "don't use 'seq', use $TESTDIR/seq.py"),
132 (r'\butil\.Abort\b', "directly use error.Abort"), 132 (r'\butil\.Abort\b', "directly use error.Abort"),
133 (r'\|&', "don't use |&, use 2>&1"), 133 (r'\|&', "don't use |&, use 2>&1"),
134 (r'\w = +\w', "only one space after = allowed"), 134 (r'\w = +\w', "only one space after = allowed"),
135 (r'\bsed\b.*[^\\]\\n', "don't use 'sed ... \\n', use a \\ and a newline"),
135 ], 136 ],
136 # warnings 137 # warnings
137 [ 138 [
138 (r'^function', "don't use 'function', use old style"), 139 (r'^function', "don't use 'function', use old style"),
139 (r'^diff.*-\w*N', "don't use 'diff -N'"), 140 (r'^diff.*-\w*N', "don't use 'diff -N'"),