From 8fdf56a74cd4377a8fdbf7df8142c42238c9001e Mon Sep 17 00:00:00 2001 From: Mathias Klette Date: Thu, 28 Jun 2012 16:23:52 +0200 Subject: [PATCH] more output --- puppet_lint_run.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) 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 -- 2.39.5