Add dib-lint exclusions

This patch adds exclusions for the indentation and newline
rules in dib-lint.  The indentation exclusion is needed for
files using heredoc and wanting to preserve indentation.
The newline exclusion is added here for consisently treating
all dib-lint rules the same.

Change-Id: Ic8a2164eba3cf99e55473846e3a5fe663a3c1095
This commit is contained in:
Ryan Brady 2014-07-24 13:50:48 -04:00
parent 22cf8e824b
commit c1985ea772

View File

@ -118,12 +118,16 @@ 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 grep -q $'^ *\t' ${i}; then if grep -q $'^ *\t' ${i}; then
error "$i contains tab characters" error "$i contains tab characters"
fi fi
fi
if ! excluded newline; then
if [ "$(tail -c 1 $i)" != "" ]; then if [ "$(tail -c 1 $i)" != "" ]; then
error "No newline at end of file: $i" error "No newline at end of file: $i"
fi fi
fi
done done
exit $rc exit $rc