changeset 35087:dd000a958364

check-code: grep's context flags don't need an extra space before number A bit of useless trivia found while researching this: OpenBSD's grep's -C has a default value (of 2) and disallows space before the argument (while -A and -B allow).
author Anton Shestakov <av6@dwimlabs.net>
date Sat, 18 Nov 2017 13:00:47 +0800
parents 8db4ca768416
children a9454beb9dd8
files contrib/check-code.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Wed Nov 15 01:07:42 2017 -0800
+++ b/contrib/check-code.py	Sat Nov 18 13:00:47 2017 +0800
@@ -148,7 +148,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"),
+    (r'grep.* -[ABC]', "don't use grep's context flags"),
   ],
   # warnings
   [