changeset 32959:20ed0e6a4905

contrib: add check-code rule to enforce non-use of `python` in tests
author Augie Fackler <augie@google.com>
date Tue, 20 Jun 2017 09:49:43 -0400
parents 75be14993fda
children 5af78c524f34
files contrib/check-code.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Tue Jun 20 09:45:02 2017 -0400
+++ b/contrib/check-code.py	Tue Jun 20 09:49:43 2017 -0400
@@ -138,6 +138,7 @@
      "put a backslash-escaped newline after sed 'i' command"),
     (r'^diff *-\w*[uU].*$\n(^  \$ |^$)', "prefix diff -u/-U with cmp"),
     (r'^\s+(if)? diff *-\w*[uU]', "prefix diff -u/-U with cmp"),
+    (r'python\s.+\.py', "don't use 'python', use '$PYTHON'"),
     (r'seq ', "don't use 'seq', use $TESTDIR/seq.py"),
     (r'\butil\.Abort\b', "directly use error.Abort"),
     (r'\|&', "don't use |&, use 2>&1"),