OUTPUT=$(mktemp)
for file in $(find . -iname '*.pp') ; do
- echo "parsing $file"
+ echo -n "parsing $file: "
#
# first check for blatant errors which immediatly cause failure
#
- puppet parser validate --color false --render-as s --modulepath=modules $file || exit 1
+ if puppet parser validate --color false --render-as s --modulepath=modules $file
+ then
+ echo -n "parser ok"
+ else
+ echo "parser failed."
+ exit 1
+ fi
#
# now run puppet-lint on it and save the output
#
- puppet-lint --no-80chars-check --log-format "%{path}:%{linenumber}:%{check}:%{KIND}:%{message}" $file >$OUTPUT 2>&1
+ if puppet-lint --no-80chars-check --log-format "%{path}:%{linenumber}:%{check}:%{KIND}:%{message}" $file >$OUTPUT 2>&1
+ then
+ echo -n ", lint ok"
+ else
+ echo -n ", lint failed"
+ fi
+
# if there is output...
if [ -s $OUTPUT ] ; then
#
cat $OUTPUT
fi
fi
+ echo "."
done
-rm -f $OUTPUT
+echo "$OUTPUT"
+#rm -f $OUTPUT