Skip to content

Commit 37624b3

Browse files
committed
Fix Go pre-commit
1 parent 5d7bccb commit 37624b3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@
2222
hooks:
2323
- id: clang-formater
2424
- repo: https://github.com/PaddlePaddle/pre-commit-golang
25-
sha: 6bce8cc8a6ce601bcf6feccf6bfbd43fe04ccbeb
25+
sha: fb3ba0e9e38a516543925e96cef76740b61321ab
2626
hooks:
2727
- id: go-fmt
2828
types: [go]
29-
- id: go-lint
30-
types: [go]
3129
- id: gometalinter
3230
types: [go]

paddle/scripts/travis/check_style.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ export PATH=/usr/bin:$PATH
1313
pre-commit install
1414
clang-format --version
1515

16+
# set up go environment for running gometalinter
17+
mkdir -p $GOPATH/src/github.com/PaddlePaddle/
18+
ln -sf $TRAVIS_BUILD_DIR $GOPATH/src/github.com/PaddlePaddle/Paddle
19+
cd $GOPATH/src/github.com/PaddlePaddle/Paddle/go; glide install; cd -
20+
1621
if ! pre-commit run -a ; then
1722
git diff --exit-code
1823
fi

0 commit comments

Comments
 (0)