2022-06-11 05:16:42 +08:00
|
|
|
# Minimum golangci-lint version required: v1.46.0
|
2021-01-12 14:39:43 +08:00
|
|
|
run:
|
|
|
|
timeout: 3m
|
|
|
|
|
2021-12-23 01:29:43 +08:00
|
|
|
skip-dirs:
|
|
|
|
- report # megalinter results+fixes
|
|
|
|
|
2019-01-16 09:41:02 +08:00
|
|
|
linters-settings:
|
|
|
|
gocyclo:
|
|
|
|
# minimal code complexity to report, 30 by default (but we recommend 10-20)
|
2021-05-06 21:30:12 +08:00
|
|
|
min-complexity: 15
|
2019-01-16 09:41:02 +08:00
|
|
|
gocritic:
|
2021-05-04 00:52:03 +08:00
|
|
|
disabled-checks:
|
2019-01-16 09:41:02 +08:00
|
|
|
- ifElseChain
|
2021-05-18 14:14:49 +08:00
|
|
|
importas:
|
|
|
|
aliases:
|
|
|
|
- pkg: 'github.com/sirupsen/logrus'
|
|
|
|
alias: log
|
|
|
|
- pkg: 'github.com/stretchr/testify/assert'
|
|
|
|
alias: assert
|
|
|
|
depguard:
|
2023-07-11 08:12:12 +08:00
|
|
|
rules:
|
|
|
|
main:
|
|
|
|
deny:
|
|
|
|
- pkg: github.com/pkg/errors
|
|
|
|
desc: Please use "errors" package from standard library
|
|
|
|
- pkg: gotest.tools/v3
|
|
|
|
desc: Please keep tests unified using only github.com/stretchr/testify
|
|
|
|
- pkg: log
|
|
|
|
desc: Please keep logging unified using only github.com/sirupsen/logrus
|
2019-01-16 09:41:02 +08:00
|
|
|
linters:
|
|
|
|
enable:
|
2021-05-04 00:52:03 +08:00
|
|
|
- megacheck
|
|
|
|
- govet
|
2021-11-13 04:48:10 +08:00
|
|
|
- revive
|
2021-05-04 00:52:03 +08:00
|
|
|
- gocyclo
|
|
|
|
- gosec
|
|
|
|
- unconvert
|
|
|
|
- dupl
|
|
|
|
- nakedret
|
|
|
|
- prealloc
|
|
|
|
- exportloopref
|
|
|
|
- gocritic
|
|
|
|
- goimports
|
|
|
|
- whitespace
|
|
|
|
- misspell
|
2021-05-18 14:14:49 +08:00
|
|
|
- depguard
|
|
|
|
- importas
|
2021-12-23 01:29:43 +08:00
|
|
|
- contextcheck
|
|
|
|
- nolintlint
|
|
|
|
- revive
|