mirror of https://github.com/ARMmbed/mbed-os.git
Travis: add astyle
Fetch 3.1 astyle from website (install from ubuntu contains old 2.05). Print version to verify and run on our codebasepull/6590/head
parent
1ff77d8dbc
commit
f6541f9fc8
21
.travis.yml
21
.travis.yml
|
@ -94,6 +94,27 @@ matrix:
|
||||||
# Report success since we have overridden default behaviour
|
# Report success since we have overridden default behaviour
|
||||||
- bash -c "$STATUS" success "Local $NAME testing has passed"
|
- bash -c "$STATUS" success "Local $NAME testing has passed"
|
||||||
|
|
||||||
|
- env:
|
||||||
|
- NAME=astyle
|
||||||
|
install:
|
||||||
|
- wget https://downloads.sourceforge.net/project/astyle/astyle/astyle%203.1/astyle_3.1_linux.tar.gz;
|
||||||
|
mkdir -p BUILD && tar xf astyle_3.1_linux.tar.gz -C BUILD;
|
||||||
|
pushd BUILD/astyle/build/gcc;
|
||||||
|
make;
|
||||||
|
export PATH=$PWD/bin:$PATH;
|
||||||
|
popd;
|
||||||
|
- astyle --version
|
||||||
|
script:
|
||||||
|
- find -regex '.*\.\(h\|c\|hpp\|cpp\)' -type f | fgrep -v -f .astyleignore | xargs -n 100 -I {} bash -c "astyle -n --options=.astylerc \"{}\"" > astyle.out;
|
||||||
|
if [ $(cat astyle.out | grep Formatted | wc -l) -ne 0 ]; then
|
||||||
|
git --no-pager diff;
|
||||||
|
echo "Please fix style issues as shown above";
|
||||||
|
exit 1;
|
||||||
|
else
|
||||||
|
echo "Coding style check OK";
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- NAME=events
|
- NAME=events
|
||||||
- EVENTS=events
|
- EVENTS=events
|
||||||
|
|
Loading…
Reference in New Issue