- Add .golangci.yml with sensible defaults for the project - Add lint and lint:fix tasks to Taskfile - Remove unused findGitRoot function - Apply gofumpt formatting fixes
65 lines
943 B
YAML
65 lines
943 B
YAML
version: "2"
|
|
|
|
linters:
|
|
default: standard
|
|
enable:
|
|
- errcheck
|
|
- govet
|
|
- staticcheck
|
|
- unused
|
|
- ineffassign
|
|
- misspell
|
|
- unconvert
|
|
- unparam
|
|
- gosec
|
|
- prealloc
|
|
- revive
|
|
- gocritic
|
|
- errname
|
|
- errorlint
|
|
- nilerr
|
|
- bodyclose
|
|
- durationcheck
|
|
- exhaustive
|
|
- copyloopvar
|
|
- perfsprint
|
|
- usestdlibvars
|
|
disable:
|
|
- depguard
|
|
- funlen
|
|
- gochecknoglobals
|
|
- gochecknoinits
|
|
- lll
|
|
- wsl
|
|
- nlreturn
|
|
- varnamelen
|
|
- exhaustruct
|
|
- ireturn
|
|
- nonamedreturns
|
|
|
|
exclusions:
|
|
generated: lax
|
|
presets:
|
|
- comments
|
|
- std-error-handling
|
|
- common-false-positives
|
|
rules:
|
|
- path: _test\.go
|
|
linters:
|
|
- errcheck
|
|
- gosec
|
|
- dupl
|
|
|
|
formatters:
|
|
enable:
|
|
- gofumpt
|
|
- goimports
|
|
|
|
issues:
|
|
max-issues-per-linter: 50
|
|
max-same-issues: 3
|
|
|
|
run:
|
|
timeout: 5m
|
|
tests: true
|