From 42f539ee8ef66ba39199644815d3ee0c9c61abb8 Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Mon, 29 Nov 2010 19:54:29 +0100
Subject: [PATCH] Check for editor-specific settings at build time

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 autotools/check-python-code | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/autotools/check-python-code b/autotools/check-python-code
index 4f14ccb0c..ec1d96bc2 100755
--- a/autotools/check-python-code
+++ b/autotools/check-python-code
@@ -41,6 +41,12 @@ for script; do
     echo "Forbidden function 'xrange' used in $script" >&2
   fi
 
+  if grep -n -H -E -i '#[[:space:]]*(vim|Local[[:space:]]+Variables):' "$script"
+  then
+    let ++problems
+    echo "Found editor-specific settings in $script" >&2
+  fi
+
   if [[ "$(wc --max-line-length < "$script")" -gt 80 ]]; then
     let ++problems
     echo "Longest line in $script is longer than 80 characters" >&2
-- 
GitLab