blocky/.golangci.yml

106 lines
1.8 KiB
YAML
Raw Permalink Normal View History

2020-01-12 18:23:35 +01:00
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
2022-11-03 23:47:31 +01:00
- nosprintfhostport
- prealloc
- predeclared
- revive
- sqlclosecheck
- staticcheck
- stylecheck
- tenv
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
- wastedassign
- whitespace
- wsl
- ginkgolinter
- noctx
- containedctx
- contextcheck
disable:
2021-09-18 22:41:01 +02:00
- scopelint
- structcheck
- deadcode
- varcheck
- forbidigo
- gosmopolitan
disable-all: false
presets:
- bugs
- unused
fast: false
2020-01-12 18:23:35 +01:00
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
2020-01-12 18:23:35 +01:00
issues:
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- dupl
2023-04-17 18:21:56 +02:00
- funlen
- gochecknoinits
2023-04-17 18:21:56 +02:00
- gochecknoglobals
- gosec
Refactoring Redis (#1271) * RedisConfig -> Redis * moved redis config to seperate file * bugfix in config test during parallel processing * implement config.Configurable in Redis config * use Context in GetRedisCache * use Context in New * caching resolver test fix * use Context in PublishEnabled * use Context in getResponse * remove ctx field * bugfix in api interface test * propperly close channels * set ruler for go files from 80 to 111 * line break because function length is to long * only execute redis.New if it is enabled in config * stabilized flaky tests * Update config/redis.go Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com> * Update config/redis_test.go Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com> * Update config/redis_test.go Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com> * Update config/redis_test.go Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com> * Update config/redis.go Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com> * Update config/redis_test.go Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com> * fix ruler * redis test refactoring * vscode setting cleanup * removed else if chain * Update redis_test.go * context race fix * test fail on missing seintinel servers * cleanup context usage * cleanup2 * context fixes * added context util * disabled nil context rule for tests * copy paste error ctxSend -> CtxSend * use util.CtxSend * fixed comment * fixed flaky test * failsafe and tests --------- Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
2023-11-27 18:08:31 +01:00
- path: _test\.go
linters:
- staticcheck
text: "SA1012:"