neoq/.golangci.yaml
2025-06-28 10:53:37 +02:00

136 lines
2.5 KiB
YAML

version: "2"
run:
concurrency: 12
build-tags:
- testing
modules-download-mode: vendor
issues-exit-code: 1
tests: true
linters:
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
- cyclop
- decorder
- dogsled
- dupl
- dupword
- durationcheck
- err113
- errchkjson
- errname
- errorlint
- exhaustive
- funlen
- gocognit
- goconst
- gocritic
- gocyclo
- goheader
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- grouper
- importas
- interfacebloat
- lll
- loggercheck
- maintidx
- makezero
- misspell
- mnd
- nestif
- nilerr
- nilnil
- noctx
- nosprintfhostport
- prealloc
- predeclared
- promlinter
- reassign
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- testableexamples
- thelper
- unconvert
- unparam
- usestdlibvars
- wastedassign
- whitespace
- wrapcheck
settings:
dupl:
threshold: 100
funlen:
lines: 100
statements: 50
goconst:
min-len: 2
min-occurrences: 2
gocritic:
disabled-checks:
- ifElseChain
- octalLiteral
- unnamedResult
- whyNoLint
- wrapperFunc
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
gocyclo:
min-complexity: 15
govet:
settings:
printf:
funcs:
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
lll:
line-length: 140
misspell:
locale: US
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- cyclop
- funlen
path: _test\.go
- path: (.+)\.go$
text: 'shadow: declaration of "err" shadows declaration at'
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gofmt
- goimports
settings:
goimports:
local-prefixes:
- github.com/golangci/golangci-lint
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$