Added trailing white space check to "make check".
This commit is contained in:
parent
e35dcb9de9
commit
80c8a0b58f
1 changed files with 4 additions and 3 deletions
7
Makefile
7
Makefile
|
@ -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
|
Loading…
Add table
Reference in a new issue