# HG changeset patch # User timeless # Date 2016-03-30 22:01:47 # Node ID c042b98a6ff8ee65a681f4a14c71c37c20193c16 # Parent faff8c2b5ee338606c86e8865e2a483c1a142e7c 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. diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -132,6 +132,7 @@ testpats = [ (r'\butil\.Abort\b', "directly use error.Abort"), (r'\|&', "don't use |&, use 2>&1"), (r'\w = +\w', "only one space after = allowed"), + (r'\bsed\b.*[^\\]\\n', "don't use 'sed ... \\n', use a \\ and a newline"), ], # warnings [