Skip to content

Commit

Permalink
switch to the golangci-lint linter (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
dajohi committed Jan 24, 2019
1 parent 6059071 commit ab61745
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Expand Up @@ -3,8 +3,7 @@ go:
- 1.11.x
sudo: false
install:
- go get -v github.com/alecthomas/gometalinter
- gometalinter --install
- go get -v github.com/golangci/golangci-lint/cmd/golangci-lint
script:
- export GO111MODULE=on
- (cd cmswww && go build)
Expand Down
20 changes: 4 additions & 16 deletions goclean.sh
Expand Up @@ -8,29 +8,17 @@
# 6. race detector (http://blog.golang.org/race-detector)
# 7. test coverage (http://blog.golang.org/cover)

# gometaling (github.com/alecthomas/gometalinter) is used to run each each
# static checker.

set -ex

# run tests
env GORACE="halt_on_error=1" go test -race ./...

# Make sure gometalinter is installed and $GOPATH/bin is in your path.
# $ go get -v github.com/alecthomas/gometalinter"
# $ gometalinter --install"
if [ ! -x "$(type -p gometalinter)" ]; then
exit 1
fi
# golangci-lint (github.com/golangci/golangci-lint) is used to run each each
# static checker.

# check linters
# linters do not work with modules yet
go mod vendor
unset GO111MODULE

gometalinter --vendor --disable-all --deadline=10m \
golangci-lint run --disable-all --deadline=10m \
--enable=gofmt \
--enable=vet \
--enable=unconvert \
--enable=ineffassign \
./...
--enable=ineffassign

0 comments on commit ab61745

Please sign in to comment.