changeset 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 faff8c2b5ee3
children f736f98e16ca
files contrib/check-code.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Sat Apr 02 15:56:47 2016 -0700
+++ b/contrib/check-code.py	Wed Mar 30 22:01:47 2016 +0000
@@ -132,6 +132,7 @@
     (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
   [