Switch to golangci-lint

Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
This commit is contained in:
Maksym Pavlenko 2019-07-14 19:32:37 -07:00
parent f2b6c31d0f
commit 2b521e25a7
4 changed files with 23 additions and 26 deletions

21
.golangci.yml Normal file
View File

@ -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

View File

@ -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"
]
}

View File

@ -121,7 +121,7 @@ all: binaries
check: proto-fmt ## run all linters check: proto-fmt ## run all linters
@echo "$(WHALE) $@" @echo "$(WHALE) $@"
gometalinter --config .gometalinter.json ./... golangci-lint run
ci: check binaries checkprotos coverage coverage-integration ## to be used by the CI ci: check binaries checkprotos coverage coverage-integration ## to be used by the CI

View File

@ -21,6 +21,5 @@
set -eu -o pipefail set -eu -o pipefail
go get -u github.com/stevvooe/protobuild go get -u github.com/stevvooe/protobuild
go get -u github.com/alecthomas/gometalinter go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
gometalinter --install >/dev/null
go get -u github.com/cpuguy83/go-md2man go get -u github.com/cpuguy83/go-md2man