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
This commit is contained in:
Ryan Brady 2014-11-11 21:06:25 -05:00
parent cbdf218417
commit 6fedbc58f9

View file

@ -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