comparison contrib/check-code.py @ 32696: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
comparison
equal deleted inserted replaced
32695:0841382d114a 32696:0c09afdf5704
143 (r'\|&', "don't use |&, use 2>&1"), 143 (r'\|&', "don't use |&, use 2>&1"),
144 (r'\w = +\w', "only one space after = allowed"), 144 (r'\w = +\w', "only one space after = allowed"),
145 (r'\bsed\b.*[^\\]\\n', "don't use 'sed ... \\n', use a \\ and a newline"), 145 (r'\bsed\b.*[^\\]\\n', "don't use 'sed ... \\n', use a \\ and a newline"),
146 (r'env.*-u', "don't use 'env -u VAR', use 'unset VAR'"), 146 (r'env.*-u', "don't use 'env -u VAR', use 'unset VAR'"),
147 (r'cp.* -r ', "don't use 'cp -r', use 'cp -R'"), 147 (r'cp.* -r ', "don't use 'cp -r', use 'cp -R'"),
148 (r'grep.* -[ABC] ', "don't use grep's context flags"),
148 ], 149 ],
149 # warnings 150 # warnings
150 [ 151 [
151 (r'^function', "don't use 'function', use old style"), 152 (r'^function', "don't use 'function', use old style"),
152 (r'^diff.*-\w*N', "don't use 'diff -N'"), 153 (r'^diff.*-\w*N', "don't use 'diff -N'"),