From b6cd1365ebcee88d5a6e6ae0b4089516a07ea850 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 31 Aug 2023 14:09:52 +0200 Subject: [PATCH] golangci.yml: enable all, disable failing linters golangci-lint has a number of helpful linters and new ones are being continuously added. Instead of enabling only a minimal subset of these linters, enable all by default and - for now - disable failing ones. This allows us to make use of new linters on updates and to selectively enable those we deem useful. Signed-off-by: Valentin Rothberg --- .golangci.yml | 80 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 71 insertions(+), 9 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 88376a7e9..449ac3ac9 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -10,15 +10,77 @@ run: concurrency: 6 deadline: 5m linters: - enable: - - dupl - - gocritic - - unparam - - exportloopref - - revive - - prealloc - - makezero - - gofumpt + enable-all: true + disable: + # linters deprecated by upstreams ... + - interfacer + - varcheck + - deadcode + - scopelint + - maligned + - nosnakecase + - exhaustivestruct + - structcheck + - ifshort + - golint + # others to be re-enabled one-by-one ... + - forbidigo + - funlen + - gci + - gochecknoinits + - gocognit + - goconst + - godox + - golint + - lll + - maligned + - mirror + - misspell + - nestif + - unconvert + - whitespace + - wsl + - contextcheck + - cyclop + - depguard + - dupword + - errchkjson + - errname + - errorlint + - exhaustive + - exhaustivestruct + - ginkgolinter + - gochecknoglobals + - goerr113 + - gomnd + - nolintlint + - wrapcheck + - wastedassign + - varnamelen + - testpackage + - tenv + - tagliatelle + - stylecheck + - paralleltest + - nonamedreturns + - nlreturn + - nakedret + - musttag + - maintidx + - ireturn + - exhaustruct + - gosec + - godot + - gocyclo + - dogsled + - tparallel + - thelper + - nilnil + - nilerr + - interfacebloat + - forcetypeassert + - gomoddirectives + - predeclared linters-settings: errcheck: check-type-assertions: true