From 7d150ce973e60526ea8c490713b241a6472bbbbd Mon Sep 17 00:00:00 2001 From: koba1t Date: Sat, 11 Mar 2023 05:08:25 +0900 Subject: [PATCH] Revert "use enable-all on golangci-lint" This reverts commit 39264a7057929ee9f2c9b193d2e18d580b819218. --- .golangci.yml | 118 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 90 insertions(+), 28 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index f07f78ca7..1383562b7 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,34 +6,96 @@ run: go: '1.19' linters: - enable-all: true - disable: - - cyclop - - exhaustivestruct - - forbidigo - - funlen - - gci - - gocognit - - godot - - godox - - goerr113 - - gofumpt - - ifshort # too many false positives - - ireturn - - nilnil - - nlreturn - - noctx - - paralleltest - - stylecheck - - varnamelen - - wsl - - exhaustruct - - deadcode - - scopelint - - nonamedreturns - - golint - - maintidx - - nosnakecase + # please, do not use `enable-all`: it's deprecated and will be removed soon. + # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint + disable-all: true + enable: + - asciicheck + - bidichk + - bodyclose + - contextcheck +# - cyclop + - depguard + - dogsled + - dupl + - dupword + - durationcheck + - errcheck + - errname + - errorlint + - exhaustive +# - exhaustivestruct + - exportloopref +# - forbidigo + - forcetypeassert +# - funlen +# - gci + - gochecknoglobals + - gochecknoinits +# - gocognit + - goconst + - gocritic + - gocyclo +# - godot +# - godox +# - goerr113 + - gofmt +# - gofumpt + - goheader + - goimports + - gomnd + - gomoddirectives + - gomodguard + - goprintffuncname + - gosec + - gosimple + - govet +# - ifshort # too many false positives + - importas + - ineffassign +# - ireturn + - lll + - makezero + - misspell + - nakedret + - nestif + - nilerr +# - nilnil +# - nlreturn +# - noctx + - nolintlint +# - paralleltest + - prealloc + - predeclared + - promlinter + - revive + - rowserrcheck + - sqlclosecheck + - staticcheck +# - stylecheck + - tagliatelle + - tenv + - testpackage + - testableexamples + - thelper + - tparallel + - typecheck + - unconvert + - unparam + - unused +# - varnamelen + - wastedassign + - whitespace + - wrapcheck +# - wsl + - asasalint + - usestdlibvars + - interfacebloat + - loggercheck + - reassign + - ginkgolinter + - gocheckcompilerdirectives + - musttag linters-settings: dupl: