From: Mathias Klette Date: Thu, 28 Jun 2012 14:23:52 +0000 (+0200) Subject: more output X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=8fdf56a74cd4377a8fdbf7df8142c42238c9001e;p=profitbricks%2Fjenkins-build-scripts.git more output --- diff --git a/puppet_lint_run.sh b/puppet_lint_run.sh index c135c9d..141442e 100755 --- a/puppet_lint_run.sh +++ b/puppet_lint_run.sh @@ -4,15 +4,27 @@ 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 # @@ -36,5 +48,7 @@ for file in $(find . -iname '*.pp') ; do cat $OUTPUT fi fi + echo "." done -rm -f $OUTPUT +echo "$OUTPUT" +#rm -f $OUTPUT