Add some output to dib-lint

It's hard to tell if dib-lint is working as it outputs nothing.  Add
some minimal output strings at some key points.

Change-Id: Id11cc9ecb8d5215d6fc8d8ef3584bfeeba53ff13
This commit is contained in:
Ian Wienand 2016-04-22 10:21:51 +10:00
parent 33d7e8b25e
commit b388b20f99
1 changed files with 14 additions and 0 deletions

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