Merge pull request #2887 from helinwang/fix_pre_commit

fix travis check style for Go
cblas_new
helinwang 8 years ago committed by GitHub
commit a818afcc6c

@ -1,7 +1,7 @@
#!/bin/bash
function abort(){
echo "Your change doesn't follow PaddlePaddle's code style." 1>&2
echo "Please use pre-commit to reformat your code and git push again." 1>&2
echo "Please use pre-commit to check what is wrong." 1>&2
exit 1
}
@ -19,7 +19,8 @@ ln -sf $TRAVIS_BUILD_DIR $GOPATH/src/github.com/PaddlePaddle/Paddle
cd $GOPATH/src/github.com/PaddlePaddle/Paddle/go; glide install; cd -
if ! pre-commit run -a ; then
git diff --exit-code
git diff
exit 1
fi
trap : 0

Loading…
Cancel
Save