gofimports/.golangci.yml

86 lines
1.3 KiB
YAML

run:
timeout: 2m
tests: false
skip-dirs:
- ".*test.*"
- ".*mock.*"
- ".*generated.*"
- ".*example.*"
- ".*utils.*"
skip-files:
- ".*Mock.*"
- ".*_mock.*"
- ".*_generated.*"
output:
sort-results: true
linters:
disable-all: true
enable:
# Default
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
# Custom
- errchkjson
- errname
- errorlint
- execinquery
- forcetypeassert
- gocritic
- goerr113
- gofumpt
- gomodguard
- gosec
- importas
- makezero
- nilnil
- prealloc
- reassign
# - rowserrcheck
- sqlclosecheck
- unconvert
# - wastedassign
fast: true
linters-settings:
# Default
govet:
check-shadowing: false
disable-all: true
enable:
- assign
- atomic
- bools
- buildtag
- composites
- copylocks
- fieldalignment
- httpresponse
- loopclosure
- lostcancel
- nilfunc
- printf
- unmarshal
- unreachable
- unusedresult
# Custom
gocritic:
disabled-checks:
- ifElseChain
- singleCaseSwitch
enabled-tags:
- diagnostic
- style
- performance
gosec:
exclude-generated: true
reassign:
patterns:
- ".*"