diff --git a/bin/dib-lint b/bin/dib-lint index 248778499..ca9df80cf 100755 --- a/bin/dib-lint +++ b/bin/dib-lint @@ -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