nix/.golangci.yml
2024-10-25 16:57:29 +02:00

101 lines
1.7 KiB
YAML

linters-settings:
errcheck:
check-type-assertions: true
gci:
sections:
- standard
- default
- prefix(go.c3c.cz)
forbidigo:
analyze-types: true
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
- hugeParam
- paramTypeCombine
- sloppyReassign
govet:
enable-all: true
settings:
shadow:
strict: true
nolintlint:
require-explanation: true
require-specific: true
sloglint:
attr-only: true
context: scope
forbidden-keys:
- time
- level
- msg
- source
key-naming-case: snake
no-global: all
static-msg: true
stylecheck:
checks:
- all
- -ST1000
wsl:
allow-cuddle-declarations: true
linters:
disable-all: true
enable:
- bidichk
- bodyclose
- canonicalheader
- copyloopvar
- errcheck
- errorlint
- exhaustive
- forbidigo
- gci
- gocheckcompilerdirectives
- gochecksumtype
- goconst
- gocritic
- gofumpt
- gosec
- gosimple
- govet
- ineffassign
- makezero
- mirror
- misspell
- nakedret
- nilnil
- noctx
- nolintlint
- nosprintfhostport
- perfsprint
- prealloc
- predeclared
- protogetter
- sloglint
- spancheck
- staticcheck
- stylecheck
- unconvert
- unconvert
- unparam
- unused
- whitespace
- usestdlibvars
- wastedassign
- whitespace
- wsl
issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude-use-default: false
exclude:
- Error return value of .*\.Body\.Close. is not checked