restic-scheduler/.golangci.yml

113 lines
1.7 KiB
YAML

---
linters:
enable:
- deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- structcheck
- typecheck
- unused
- varcheck
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
- cyclop
- decorder
- depguard
- dupl
- durationcheck
- errchkjson
- errname
- errorlint
- exhaustive
- exhaustivestruct
- exportloopref
- forcetypeassert
- funlen
- gci
- gochecknoinits
- gocognit
- goconst
- gocritic
# - gocyclo # Using cyclop
- godot
# - goerr113 # Using errorlint
- gofmt
- goheader
- goimports
- gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- grouper
- ifshort
- importas
# - ireturn
- lll
- maintidx
- makezero
- misspell
- nakedret
- nestif
- nilerr
- nilnil
- nlreturn
- noctx
- nolintlint
- paralleltest
- prealloc
- predeclared
# - promlinter # Not common enough
- revive
- rowserrcheck
- sqlclosecheck
# - stylecheck # Using revive
- tagliatelle
- tenv
- testpackage
- thelper
- tparallel
- unconvert
- unparam
- varnamelen
- wastedassign
- whitespace
- wrapcheck
- wsl
disable:
- gochecknoglobals
- godox
- forbidigo
# Deprecated
- golint
- interfacer
- maligned
- scopelint
linters-settings:
# gosec:
# excludes:
# - G204
gomnd:
settings:
mnd:
ignored-functions: math.*
issues:
exclude-rules:
- path: _test\.go
linters:
- errcheck
- gosec
- funlen
# Enable autofix
fix: true