update golangci-lint config

Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
This commit is contained in:
Matthias Bertschy
2025-09-16 13:54:23 +02:00
parent 3481af4a5b
commit 1a4c979ab8

View File

@@ -1,51 +1,57 @@
linters-settings: version: "2"
govet: linters:
shadow: true enable:
- bodyclose
- gosec
- nolintlint
disable:
- dupl
- errcheck
- gochecknoglobals
- gochecknoinits
- gocognit
- gocritic
- lll
- nakedret
- revive
- unconvert
- unparam
settings:
dupl: dupl:
threshold: 200 threshold: 200
gocognit:
min-complexity: 65
goconst: goconst:
min-len: 3 min-len: 3
min-occurrences: 2 min-occurrences: 2
gocognit: exclusions:
min-complexity: 65 generated: lax
presets:
linters: - comments
enable: - common-false-positives
- gosec - legacy
- std-error-handling
rules:
- linters:
- revive
text: var-naming
- linters:
- revive
text: type name will be used as (.+?) by other packages, and that stutters
- linters:
- staticcheck - staticcheck
- nolintlint text: ST1003
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt - gofmt
- unused
- govet
- bodyclose
- typecheck
- goimports - goimports
- ineffassign exclusions:
- gosimple generated: lax
disable: paths:
# temporarily disabled - third_party$
- errcheck - builtin$
- dupl - examples$
- gocritic
- gocognit
- nakedret
- revive
- stylecheck
- unconvert
- unparam
#- forbidigo # <- see later
# should remain disabled
- lll
- gochecknoinits
- gochecknoglobals
issues:
exclude-rules:
- linters:
- revive
text: "var-naming"
- linters:
- revive
text: "type name will be used as (.+?) by other packages, and that stutters"
- linters:
- stylecheck
text: "ST1003"