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:
parent
cbdf218417
commit
6fedbc58f9
@ -71,8 +71,10 @@ for i in $(find elements -type f); do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Ensure 4 spaces indent are used
|
# Ensure 4 spaces indent are used
|
||||||
if grep -q "^ \{4\}* \{1,3\}[^ ]" ${i}; then
|
if ! excluded indent; then
|
||||||
error "$i should use 4 spaces indent"
|
if grep -q "^ \{4\}* \{1,3\}[^ ]" ${i}; then
|
||||||
|
error "$i should use 4 spaces indent"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -118,7 +120,7 @@ done
|
|||||||
|
|
||||||
for i in $(find elements -type f -and -name '*.md' -or -type f -executable); do
|
for i in $(find elements -type f -and -name '*.md' -or -type f -executable); do
|
||||||
# Check for tab indentation
|
# Check for tab indentation
|
||||||
if ! excluded indent; then
|
if ! excluded tabindent; then
|
||||||
if grep -q $'^ *\t' ${i}; then
|
if grep -q $'^ *\t' ${i}; then
|
||||||
error "$i contains tab characters"
|
error "$i contains tab characters"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user