提交 37624b30 编写于 作者: H Helin Wang

Fix Go pre-commit

上级 5d7bccb2
...@@ -22,11 +22,9 @@ ...@@ -22,11 +22,9 @@
hooks: hooks:
- id: clang-formater - id: clang-formater
- repo: https://github.com/PaddlePaddle/pre-commit-golang - repo: https://github.com/PaddlePaddle/pre-commit-golang
sha: 6bce8cc8a6ce601bcf6feccf6bfbd43fe04ccbeb sha: fb3ba0e9e38a516543925e96cef76740b61321ab
hooks: hooks:
- id: go-fmt - id: go-fmt
types: [go] types: [go]
- id: go-lint
types: [go]
- id: gometalinter - id: gometalinter
types: [go] types: [go]
...@@ -13,6 +13,11 @@ export PATH=/usr/bin:$PATH ...@@ -13,6 +13,11 @@ export PATH=/usr/bin:$PATH
pre-commit install pre-commit install
clang-format --version clang-format --version
# set up go environment for running gometalinter
mkdir -p $GOPATH/src/github.com/PaddlePaddle/
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 if ! pre-commit run -a ; then
git diff --exit-code git diff --exit-code
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册