travis: echo failure if astyle fails

pull/8711/head
Martin Kojtal 2018-11-12 14:41:38 +00:00
parent 6d6c09bb80
commit cbdd6324ed
1 changed files with 3 additions and 5 deletions

View File

@ -132,8 +132,9 @@ matrix:
- git diff --name-only $TRAVIS_BRANCH | grep '.*\.\(h\|c\|hpp\|cpp\)' | fgrep -v -f .astyleignore | xargs -n 100 -I {} bash -c "astyle -n --options=.astylerc \"{}\"" > astyle-files-changed.out;
if [ $(cat astyle-files-changed.out | grep Formatted | wc -l) -ne 0 ]; then
git --no-pager diff;
echo "Please fix style issues as shown above";
exit 1;
echo "";
echo "AStyle check failed, please fix style issues as shown above";
(exit 1);
else
echo "Coding style check OK";
fi
@ -156,9 +157,6 @@ matrix:
STATUSM="$STATUSM ($(python -c "print '%+d' % ($CURR-$PREV)") files)"
fi
- bash -c "$STATUS" success "$STATUSM"
after_failure:
- bash -c "$STATUS" coding style failures"
- env:
- NAME=events
- EVENTS=events