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;
|
- 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
|
if [ $(cat astyle-files-changed.out | grep Formatted | wc -l) -ne 0 ]; then
|
||||||
git --no-pager diff;
|
git --no-pager diff;
|
||||||
echo "Please fix style issues as shown above";
|
echo "";
|
||||||
exit 1;
|
echo "AStyle check failed, please fix style issues as shown above";
|
||||||
|
(exit 1);
|
||||||
else
|
else
|
||||||
echo "Coding style check OK";
|
echo "Coding style check OK";
|
||||||
fi
|
fi
|
||||||
|
@ -156,9 +157,6 @@ matrix:
|
||||||
STATUSM="$STATUSM ($(python -c "print '%+d' % ($CURR-$PREV)") files)"
|
STATUSM="$STATUSM ($(python -c "print '%+d' % ($CURR-$PREV)") files)"
|
||||||
fi
|
fi
|
||||||
- bash -c "$STATUS" success "$STATUSM"
|
- bash -c "$STATUS" success "$STATUSM"
|
||||||
after_failure:
|
|
||||||
- bash -c "$STATUS" coding style failures"
|
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- NAME=events
|
- NAME=events
|
||||||
- EVENTS=events
|
- EVENTS=events
|
||||||
|
|
Loading…
Reference in New Issue