From b388b20f9946c05b59f51af6cc4fd76fb913c8e6 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 22 Apr 2016 10:21:51 +1000 Subject: [PATCH] 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 --- bin/dib-lint | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bin/dib-lint b/bin/dib-lint index 24877849..ca9df80c 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