Check for trailing whitespace during CI

This commit is contained in:
Fang 2019-01-17 23:27:36 -08:00
parent 8cd2a02f04
commit 93a7033a8d
2 changed files with 16 additions and 2 deletions

View File

@ -3,9 +3,12 @@ node_js:
- 4
before_install:
# building vere directly in lieu of a working debian package script
# pwd: ~/urbit/arvo
- cd ../
- cd .travis/
- bash check-trailing-whitespace.sh
- cd ../../
# pwd: ~/urbit
# building vere directly in lieu of a working debian package script
- wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip
- unzip ninja-linux.zip
- sudo mv ninja /usr/bin/

View File

@ -0,0 +1,11 @@
#!/bin/bash
whitespace=$(find .. -path ../.git -prune -o \
-type f -exec egrep -l " +$" {} \;);
if [ ! -z $whitespace ]
then
echo 'found trailing whitespace in:';
echo $whitespace;
exit 1;
fi