changeset 29136:e05bdc01505f

check-code: add a rule banning `env -u`
author Kevin Bullock <kbullock+mercurial@ringworld.org>
date Fri, 06 May 2016 08:45:56 -0500
parents 3879d02cd1cc
children d115cbf5980b
files contrib/check-code.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Fri May 06 08:41:24 2016 -0500
+++ b/contrib/check-code.py	Fri May 06 08:45:56 2016 -0500
@@ -133,6 +133,7 @@
     (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"),
+    (r'env.*-u', "don't use 'env -u VAR', use 'unset VAR'")
   ],
   # warnings
   [