2021-08-24 17:35:03 +00:00
|
|
|
linters:
|
|
|
|
disable-all: true
|
|
|
|
enable:
|
|
|
|
- deadcode
|
2021-11-15 14:11:38 +00:00
|
|
|
- depguard
|
2021-11-24 20:56:54 +00:00
|
|
|
- gocritic
|
2021-08-24 17:35:03 +00:00
|
|
|
- gofmt
|
|
|
|
- govet
|
|
|
|
- ineffassign
|
|
|
|
- revive
|
|
|
|
- rowserrcheck
|
|
|
|
- sqlclosecheck
|
|
|
|
- structcheck
|
|
|
|
- typecheck
|
|
|
|
- unconvert
|
|
|
|
- unused
|
|
|
|
|
|
|
|
linters-settings:
|
2021-11-15 14:11:38 +00:00
|
|
|
depguard:
|
|
|
|
list-type: blacklist
|
|
|
|
include-go-root: false
|
|
|
|
packages-with-error-message:
|
|
|
|
- github.com/rotisserie/eris: "use ctxerr.New or ctxerr.Wrap[f] instead"
|
2021-11-22 14:13:26 +00:00
|
|
|
- github.com/pkg/errors: "use ctxerr if a context.Context is available or stdlib errors.New / fmt.Errorf with the %w verb"
|
2021-11-15 14:11:38 +00:00
|
|
|
|
2021-11-24 20:56:54 +00:00
|
|
|
gocritic:
|
|
|
|
enabled-checks:
|
|
|
|
- ruleguard
|
|
|
|
settings:
|
|
|
|
ruleguard:
|
|
|
|
rules: "tools/ci/rules.go"
|
|
|
|
|
2021-08-24 17:35:03 +00:00
|
|
|
gofmt:
|
|
|
|
# simplify code: gofmt with `-s` option, true by default
|
|
|
|
simplify: false
|
|
|
|
|
|
|
|
revive:
|
|
|
|
ignoreGeneratedHeader: false
|
|
|
|
severity: "warning"
|
|
|
|
confidence: 0.8
|
|
|
|
errorCode: 0
|
|
|
|
warningCode: 0
|
|
|
|
|
|
|
|
rules:
|
|
|
|
- name: dot-imports
|
|
|
|
- name: error-return
|
|
|
|
- name: var-declaration
|
|
|
|
- name: package-comments
|
|
|
|
- name: range
|
|
|
|
- name: receiver-naming
|
|
|
|
- name: time-naming
|
|
|
|
- name: indent-error-flow
|
|
|
|
- name: errorf
|
|
|
|
- name: empty-block
|
|
|
|
- name: superfluous-else
|
|
|
|
- name: unreachable-code
|
|
|
|
- name: redefines-builtin-id
|
2021-11-15 14:11:38 +00:00
|
|
|
|
|
|
|
issues:
|
|
|
|
exclude-rules:
|
2021-11-22 14:13:26 +00:00
|
|
|
- path: server/datastore/mysql/migrations/[^/]+/[^/]+\.go
|
2021-11-15 14:11:38 +00:00
|
|
|
linters:
|
|
|
|
- depguard
|