Skip to content

Commit

Permalink
Fix Go pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
helinwang committed Jul 17, 2017
1 parent 5d7bccb commit 37624b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@
hooks:
- id: clang-formater
- repo: https://github.com/PaddlePaddle/pre-commit-golang
sha: 6bce8cc8a6ce601bcf6feccf6bfbd43fe04ccbeb
sha: fb3ba0e9e38a516543925e96cef76740b61321ab
hooks:
- id: go-fmt
types: [go]
- id: go-lint
types: [go]
- id: gometalinter
types: [go]
5 changes: 5 additions & 0 deletions paddle/scripts/travis/check_style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ export PATH=/usr/bin:$PATH
pre-commit install
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
git diff --exit-code
fi
Expand Down

0 comments on commit 37624b3

Please sign in to comment.