blocky/.golangci.yml

106 lines
1.8 KiB
YAML

linters:
enable:
- asciicheck
- bidichk
- bodyclose
- dogsled
- dupl
- durationcheck
- errcheck
- errchkjson
- errorlint
- exhaustive
- exportloopref
- funlen
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godox
- gofmt
- goimports
- gomnd
- gomodguard
- gosec
- gosimple
- govet
- grouper
- importas
- ineffassign
- lll
- makezero
- misspell
- nakedret
- nestif
- nilerr
- nilnil
- nlreturn
- nolintlint
- nosprintfhostport
- prealloc
- predeclared
- revive
- sqlclosecheck
- staticcheck
- stylecheck
- tenv
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
- wastedassign
- whitespace
- wsl
- ginkgolinter
- noctx
- containedctx
- contextcheck
disable:
- scopelint
- structcheck
- deadcode
- varcheck
- forbidigo
- gosmopolitan
disable-all: false
presets:
- bugs
- unused
fast: false
linters-settings:
gomnd:
ignored-numbers:
- "0666"
ginkgolinter:
forbid-focus-container: true
stylecheck:
# Whietlist dot imports for test packages.
dot-import-whitelist:
- "github.com/onsi/ginkgo/v2"
- "github.com/onsi/gomega"
- "github.com/0xERR0R/blocky/config/migration"
- "github.com/0xERR0R/blocky/helpertest"
revive:
rules:
- name: dot-imports
disabled: true # prefer stylecheck since it's more configurable
issues:
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- dupl
- funlen
- gochecknoinits
- gochecknoglobals
- gosec
- path: _test\.go
linters:
- staticcheck
text: "SA1012:"