Added trailing white space check to "make check".

This commit is contained in:
Timo Mkinen 2010-10-14 13:32:23 +03:00
parent e35dcb9de9
commit 80c8a0b58f

View file

@ -14,7 +14,8 @@ check:
@for name in `git diff --name-only`; do \
echo $${name} | egrep '\.pp$$' > /dev/null || continue ; \
errors="`puppet --color=false --parseonly --ignoreimport $${name}`" ; \
[ $$? -eq 0 ] && continue ; \
echo "syntax check failed on $${name}" 1>&2 ; \
echo " $${errors}" 1>&2 ; \
[ $$? -eq 0 ] || echo "$${errors}" 1>&2 ; \
errors="`egrep --line-number '[[:space:]]$$' $${name}`" ; \
[ $$? -eq 0 ] && echo "$${name}: trailing white spaces on" \
"line $${errors}" 1>&2 ; \
done