mirror of https://github.com/ARMmbed/mbed-os.git
travis: echo failure if astyle fails
parent
6d6c09bb80
commit
cbdd6324ed
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue