blocky/.golangci.yml

110 lines
2.3 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
disable:
- noctx
- contextcheck
- scopelint
- structcheck
- deadcode
- varcheck
- forbidigo
- gosmopolitan
disable-all: false
presets:
- bugs
- unused
fast: false
linters-settings:
gomnd:
ignored-numbers:
- "0666"
ginkgolinter:
# Suppress the wrong length assertion warning.
suppress-len-assertion: true
# Suppress the wrong nil assertion warning.
suppress-nil-assertion: true
# Suppress the wrong error assertion warning.
suppress-err-assertion: true
# Suppress the wrong comparison assertion warning.
suppress-compare-assertion: true
# Suppress the function all in async assertion warning.
suppress-async-assertion: true
# Suppress warning for comparing values from different types, like int32 and uint32
suppress-type-compare-assertion: true
# Trigger warning for ginkgo focus containers like FDescribe, FContext, FWhen or FIt
forbid-focus-container: true
# Don't trigger warnings for HaveLen(0)
allow-havelen-zero: true
stylecheck:
# Whietlist dot imports for test packages.
dot-import-whitelist:
- "github.com/onsi/ginkgo"
- "github.com/onsi/gomega"
- "github.com/0xERR0R/blocky/helpertest"
issues:
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- dupl
- funlen
- gochecknoglobals
- gosec