From 6fedbc58f962574303f0cc0792a8b41de9c8695c Mon Sep 17 00:00:00 2001 From: Ryan Brady Date: Tue, 11 Nov 2014 21:06:25 -0500 Subject: [PATCH] Fix indent exclusion The current dib-lint script has an exclusion for indent but it is erroneously used as a label around the tab indention check. This patch renames the tab indention exclusion and adds the indent exclusion where it belongs. Change-Id: I701595e7a08f4764a45c6701d67cbb931c3d47f3 --- bin/dib-lint | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/dib-lint b/bin/dib-lint index c49d291b3..559393735 100755 --- a/bin/dib-lint +++ b/bin/dib-lint @@ -71,8 +71,10 @@ for i in $(find elements -type f); do fi # Ensure 4 spaces indent are used - if grep -q "^ \{4\}* \{1,3\}[^ ]" ${i}; then - error "$i should use 4 spaces indent" + if ! excluded indent; then + if grep -q "^ \{4\}* \{1,3\}[^ ]" ${i}; then + error "$i should use 4 spaces indent" + fi fi fi @@ -118,7 +120,7 @@ done for i in $(find elements -type f -and -name '*.md' -or -type f -executable); do # Check for tab indentation - if ! excluded indent; then + if ! excluded tabindent; then if grep -q $'^ *\t' ${i}; then error "$i contains tab characters" fi