diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 000000000..925763113 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,21 @@ +linters: + enable: + - structcheck + - varcheck + - staticcheck + - unconvert + - gofmt + - goimports + - golint + - ineffassign + - vet + - unused + - misspell + disable: + - errcheck + +run: + skip-dirs: + - api + - design + - docs diff --git a/.gometalinter.json b/.gometalinter.json deleted file mode 100644 index d40138005..000000000 --- a/.gometalinter.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "Vendor": true, - "Deadline": "2m", - "Sort": ["linter", "severity", "path", "line"], - "Exclude": [ - ".*\\.pb\\.go", - "fetch\\.go:.*::error: unrecognized printf verb 'r'" - ], - "EnableGC": true, - - "Enable": [ - "structcheck", - "varcheck", - "staticcheck", - "unconvert", - - "gofmt", - "goimports", - "golint", - "ineffassign", - "vet" - ] -} diff --git a/Makefile b/Makefile index 3d94059e6..0a7f5761e 100644 --- a/Makefile +++ b/Makefile @@ -121,7 +121,7 @@ all: binaries check: proto-fmt ## run all linters @echo "$(WHALE) $@" - gometalinter --config .gometalinter.json ./... + golangci-lint run ci: check binaries checkprotos coverage coverage-integration ## to be used by the CI diff --git a/script/setup/install-dev-tools b/script/setup/install-dev-tools index d49932dd8..fa36c1d6a 100755 --- a/script/setup/install-dev-tools +++ b/script/setup/install-dev-tools @@ -21,6 +21,5 @@ set -eu -o pipefail go get -u github.com/stevvooe/protobuild -go get -u github.com/alecthomas/gometalinter -gometalinter --install >/dev/null +go get -u github.com/golangci/golangci-lint/cmd/golangci-lint go get -u github.com/cpuguy83/go-md2man