diff contrib/check-code.py @ 32716:0c09afdf5704

check-code: ban grep's context flags (-A/-B/-C) since they're not on Solaris
author Danek Duvall <danek.duvall@oracle.com>
date Tue, 06 Jun 2017 08:58:27 -0700
parents 071423d0a584
children 20ed0e6a4905
line wrap: on
line diff
--- a/contrib/check-code.py	Tue Jun 06 08:52:51 2017 +0200
+++ b/contrib/check-code.py	Tue Jun 06 08:58:27 2017 -0700
@@ -145,6 +145,7 @@
     (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'"),
     (r'cp.* -r ', "don't use 'cp -r', use 'cp -R'"),
+    (r'grep.* -[ABC] ', "don't use grep's context flags"),
   ],
   # warnings
   [