Merge "Add some output to dib-lint"

This commit is contained in:
Jenkins 2016-05-13 00:38:09 +00:00 committed by Gerrit Code Review
commit d45d4d46c1

View File

@ -58,6 +58,8 @@ error() {
rc=1
}
echo "Running dib-lint in $(pwd)"
rc=0
TMPDIR=$(mktemp -d /tmp/tmp.XXXXXXXXXX)
trap "rm -rf $TMPDIR" EXIT
@ -70,6 +72,8 @@ for i in $(find elements -type f \
-not -name \*.py \
-not -name \*.pyc); do
echo "Checking $i"
exclusions=("$(parse_exclusions $i)")
# Check that files starting with a shebang are +x
@ -148,6 +152,8 @@ for i in $(find elements -type f \
fi
done
echo "Checking indents..."
for i in $(find elements -type f -and -name '*.rst' -or -type f -executable); do
# Check for tab indentation
if ! excluded tabindent; then
@ -170,6 +176,8 @@ if ! excluded mddocs; then
fi
fi
echo "Checking YAML & JSON parsing"
for i in $(find elements -name '*.yaml' \
-o \( -name pkg-map -type f -a \! -executable \)); do
py_check="
@ -192,4 +200,10 @@ sys.exit(1)"
fi
done
if [[ $rc == 0 ]]; then
echo "PASS"
else
echo "*** FAIL: Some tests failed!"
fi
exit $rc