From bd69d3280691fe12777c2350c4de5d440383c140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Fri, 18 Apr 2014 10:37:06 +0200 Subject: [PATCH] dib-lint: check for tab indent in files With this change, dib-lint ensure elements do not use tab indentation. The following files are checked: - executable file - .md file Change-Id: I071262ff9f6599548f869f5439ee127f64eeb46f --- bin/dib-lint | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/dib-lint b/bin/dib-lint index c0d8d8c7..57f929c7 100755 --- a/bin/dib-lint +++ b/bin/dib-lint @@ -84,4 +84,12 @@ for i in $(find elements -type f); do fi fi done + +for i in $(find elements -type f -and -name '*.md' -or -type f -executable); do + # Check for tab indentation + if grep -q $'^ *\t' ${i}; then + echo "ERROR: $i contains tab characters" + rc=1 + fi +done exit $rc