diff --git a/.golangci.yml b/.golangci.yml index 042fd2e67..aebf6dbc3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -41,6 +41,9 @@ linters-settings: - emptyStringTest - hugeParam - rangeValCopy + gosimple: + go: "1.16" + checks: ["all"] nolintlint: allow-leading-space: false # require machine-readable nolint directives (i.e. with no leading space) allow-unused: false # report any unused nolint directives @@ -48,6 +51,12 @@ linters-settings: require-specific: true # require nolint directives to be specific about which linter is being skipped revive: min-confidence: 0 + staticcheck: + go: "1.16" + checks: ["all"] + stylecheck: + go: "1.16" + checks: ["all", "-ST1000"] linters: # please, do not use `enable-all`: it's deprecated and will be removed soon. @@ -91,14 +100,14 @@ linters: - revive - rowserrcheck # - scopelint - # - staticcheck + - staticcheck # - structcheck - # - stylecheck + - stylecheck # - testpackage # - typecheck - unconvert - unparam - # - unused + - unused # - varcheck # - whitespace # - wsl diff --git a/Makefile b/Makefile index dd5fd026f..5d6f818b5 100644 --- a/Makefile +++ b/Makefile @@ -40,11 +40,6 @@ $(GOLANGCILINT_BIN): deps @echo "+ $@" go install github.com/golangci/golangci-lint/cmd/golangci-lint -STATICCHECK_BIN := $(GOBIN)/staticcheck -$(STATICCHECK_BIN): deps - @echo "+ $@" - go install honnef.co/go/tools/cmd/staticcheck - ########### ## Lint ## ########### @@ -60,12 +55,8 @@ else golangci-lint run --fix endif -.PHONY: staticcheck -staticcheck: $(STATICCHECK_BIN) - staticcheck -checks=all,-ST1000 ./... - .PHONY: lint -lint: golangci-lint staticcheck +lint: golangci-lint #################### ## Code generation #