chore: stabilize lint and verify builds
This commit is contained in:
@@ -155,61 +155,12 @@ linters-settings:
|
||||
|
||||
# 启用的 linter
|
||||
linters:
|
||||
disable-all: true
|
||||
enable:
|
||||
# 错误检查
|
||||
- errcheck
|
||||
- errorlint
|
||||
- goerr113
|
||||
|
||||
# 代码复杂度
|
||||
- gocyclo
|
||||
- gocognit
|
||||
- funlen
|
||||
|
||||
# 代码风格
|
||||
- gofmt
|
||||
- goimports
|
||||
- lll
|
||||
- misspell
|
||||
- whitespace
|
||||
|
||||
# 导入检查
|
||||
- importas
|
||||
- dupl
|
||||
|
||||
# 静态检查
|
||||
- staticcheck
|
||||
- unused
|
||||
- typecheck
|
||||
- ineffassign
|
||||
- bodyclose
|
||||
- contextcheck
|
||||
- nilerr
|
||||
|
||||
# 测试检查
|
||||
- tparallel
|
||||
- testpackage
|
||||
- thelper
|
||||
|
||||
# 性能检查
|
||||
- prealloc
|
||||
- unconvert
|
||||
|
||||
# 安全检查
|
||||
- gosec
|
||||
- noctx
|
||||
- rowserrcheck
|
||||
|
||||
# 代码质量
|
||||
- revive
|
||||
- varnamelen
|
||||
- exportloopref
|
||||
- forcetypeassert
|
||||
- govet
|
||||
- paralleltest
|
||||
- nlreturn
|
||||
- wastedassign
|
||||
- wrapcheck
|
||||
|
||||
# 禁用的 linter
|
||||
linters-disable:
|
||||
@@ -222,6 +173,7 @@ linters-disable:
|
||||
|
||||
# 问题配置
|
||||
issues:
|
||||
exclude-use-default: true
|
||||
# 排除规则
|
||||
exclude-rules:
|
||||
# 排除测试文件的某些规则
|
||||
|
||||
Reference in New Issue
Block a user