加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
.golangci.yml 1.78 KB
一键复制 编辑 原始数据 按行查看 历史
meilier 提交于 2022-02-02 18:12 . config golangci-lint to lint unit test
run:
deadline: 10m
issues-exit-code: 1
tests: true
skip-dirs:
- vendor
skip-files:
- ".*\\.pb\\.go$"
- ".*\\.dbx\\.go$"
linters:
enable:
- gomnd
- govet
- golint
- staticcheck
- errcheck
- ineffassign
- varcheck
- structcheck
- deadcode
- bodyclose
- nakedret
- gofmt
- misspell
- unconvert
- scopelint
- gocritic
- dogsled
- gosec
- goimports
- gocyclo
- godox
- maligned
- misspell
- goconst
disable:
- unused
fast: false
output:
format: colored-line-number
print-issued-lines: true
print-linter-name: true
uniq-by-line: true
linters-settings:
dogsled:
errcheck:
check-type-assertions: false
check-blank: false
ignore: fmt:.*,io/ioutil:^Read.*
govet:
check-shadowing: true
use-installed-packages: false
gomnd:
settings:
mnd:
checks: argument, case, condition, operation, return, assign
ignored-numbers: 2
gocritic:
disabled-checks:
- ifElseChain
goimports:
local-prefixes: isula.org/isula-build
golint:
min-confidence: 0.8
gofmt:
simplify: true
gocyclo:
min-complexity: 20
maligned:
suggest-new: true
dupl:
threshold: 150
goconst:
min-len: 3
min-occurrences: 3
misspell:
locale: US
lll:
line-length: 140
tab-width: 1
unparam:
algo: cha
check-exported: false
nakedret:
max-func-lines: 30
prealloc:
simple: true
range-loops: true
for-loops: false
issues:
exclude-rules:
path: _test\.go
linters:
- scopelint
- errcheck
- gosec
- goconst
- maligned
- ineffassign
max-issues-per-linter: 0
max-same-issues: 0
new: true
new-from-rev: "HEAD~"
exclude-use-default: false
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化