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