registry/.golangci.yml

123 lines
2 KiB
YAML

# GolangCI-Lint configuration
# See: https://golangci-lint.run/usage/configuration/
run:
timeout: 5m
modules-download-mode: readonly
linters:
enable:
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
- cyclop
- dupl
- durationcheck
- errname
- errorlint
- exhaustive
- forbidigo
- funlen
- gci
- gocognit
- goconst
- gocritic
- gocyclo
- godox
- gofmt
- goimports
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- grouper
- importas
- ireturn
- lll
- makezero
- misspell
- nakedret
- nestif
- nilerr
- nilnil
- noctx
- nolintlint
- nosprintfhostport
- predeclared
- promlinter
- reassign
- revive
- rowserrcheck
- sqlclosecheck
- stylecheck
- tenv
- testpackage
- thelper
- tparallel
- unconvert
- unparam
- usestdlibvars
- wastedassign
- whitespace
linters-settings:
revive:
rules:
- name: use-any
disabled: false
severity: error
cyclop:
max-complexity: 50
funlen:
lines: 150
statements: 150
gocognit:
min-complexity: 50
gocyclo:
min-complexity: 25
goconst:
min-len: 3
min-occurrences: 3
mnd:
checks:
- argument
- case
- condition
- operation
- return
lll:
line-length: 150
misspell:
locale: US
nestif:
min-complexity: 8
issues:
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- mnd
- funlen
- gocyclo
- errcheck
- dupl
- gosec
# Ignore long lines in generated code
- path: docs/
linters:
- lll
# Allow local replacement directives in go.mod
- path: go\.mod
linters:
- gomoddirectives