提交 a818afcc 编写于 作者: H helinwang 提交者: GitHub

Merge pull request #2887 from helinwang/fix_pre_commit

fix travis check style for Go
#!/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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册