diff --git a/.golangci.yml b/.golangci.yml index 891b3fd6..430555e3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,7 @@ run: timeout: 5m + +linters: disable-all: true enable: - asasalint @@ -8,96 +10,69 @@ run: - bodyclose - containedctx - contextcheck - - cyclop - decorder - - depguard - dogsled - - dupl - durationcheck - errcheck - errchkjson - errname - errorlint - - execinquery - exhaustive - - exhaustivestruct - - exhaustruct - - exportloopref - forbidigo - forcetypeassert - - funlen - - gci - - gochecknoglobals - - gochecknoinits - - gocognit - goconst - gocritic - gocyclo - - godot - - godox - - goerr113 - - gofumpt - goheader - - golint - - gomnd - - gomoddirectives - gomodguard - goprintffuncname - - gosec - gosimple - govet - grouper - - ifshort - importas - ineffassign - - interfacebloat - - interfacer - - ireturn - - lll - loggercheck - maintidx - makezero - - maligned - misspell - nakedret - - nestif - nilerr - - nilnil - - nlreturn +# - nlreturn # Style wise I personally like this one, todo(lazar): unlax at somepoint, good practice - noctx - - nolintlint - nonamedreturns - - nosnakecase - nosprintfhostport - paralleltest - - prealloc - - predeclared - - promlinter - reassign - revive - rowserrcheck - - scopelint - sqlclosecheck - staticcheck - - structcheck - stylecheck - - tagliatelle - tenv - testableexamples - - testpackage - - thelper - tparallel - typecheck - unconvert - unparam - - unused - usestdlibvars - - varcheck - - varnamelen + - unused - wastedassign - whitespace - - wrapcheck - - wsl +# - wrapcheck # we really should be using this, lax for now todo(lazar): unlax at somepoint, good practice issues: max-same-issues: 0 + # Default: https://golangci-lint.run/usage/false-positives/#default-exclusions + exclude-dirs: + - e2etest + exclude-rules: + # Exclude some linters from running on tests files. + - path: _test\.go + linters: + - gocyclo + - errcheck + - dupl + - gosec + - path-except: _test\.go + linters: + - forbidigo