From ae12c841bc1bb9aa77e42d3c3ff58156c972d813 Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Fri, 11 Sep 2020 17:43:32 +0200 Subject: [PATCH] Upgrade linter Signed-off-by: Mark Sagi-Kazar --- .golangci.yml | 80 +++++++++++++++++++++++++++++++++++++++------------ Makefile | 4 +-- 2 files changed, 64 insertions(+), 20 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index a0755ce..b0b865e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -5,23 +5,67 @@ linters-settings: local-prefixes: github.com/spf13/viper linters: - enable-all: true - disable: - - funlen - - maligned + disable-all: true + enable: + - bodyclose + - deadcode + - dogsled + - dupl + - exhaustive + - exportloopref + - goconst + - gofmt + - goimports + - golint + - goprintffuncname + - govet + - ineffassign + - misspell + - nakedret + - noctx + - nolintlint + - prealloc + - rowserrcheck + - sqlclosecheck + - staticcheck + - structcheck + - stylecheck + - typecheck + - unconvert + - unparam + - unused + - varcheck + - whitespace - # TODO: fix me - - wsl - - gochecknoinits - - gosimple - - gochecknoglobals - - errcheck - - lll - - godox - - scopelint - - gocyclo - - gocognit - - gocritic + # fixme + # - errcheck + # - gci + # - gochecknoglobals + # - gochecknoinits + # - gocognit + # - gocritic + # - gocyclo + # - godot + # - gofumpt + # - gosec + # - gosimple + # - lll + # - nlreturn + # - scopelint -service: - golangci-lint-version: 1.21.x + # unused + # - depguard + # - goheader + # - gomodguard + + # don't enable: + # - asciicheck + # - funlen + # - godox + # - goerr113 + # - gomnd + # - interfacer + # - maligned + # - nestif + # - testpackage + # - wsl diff --git a/Makefile b/Makefile index 1c2cab0..dd487eb 100644 --- a/Makefile +++ b/Makefile @@ -15,8 +15,8 @@ TEST_FORMAT = short-verbose endif # Dependency versions -GOTESTSUM_VERSION = 0.4.0 -GOLANGCI_VERSION = 1.21.0 +GOTESTSUM_VERSION = 0.5.3 +GOLANGCI_VERSION = 1.31.0 # Add the ability to override some variables # Use with care