加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
golangci.yml 1.65 KB
一键复制 编辑 原始数据 按行查看 历史
#
# Copyright SecureKey Technologies Inc. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
run:
concurrency: 4
deadline: 5m
issues-exit-code: 1
tests: true
build-tags: []
skip-dirs: []
skip-files:
- ^(.*_test.go.*$)$
output:
format: colored-line-number
print-issued-lines: true
print-linter-name: true
linters-settings:
errcheck:
check-type-assertions: false
check-blank: false
ignore: fmt:.*,io/ioutil:^Read.*
govet:
check-shadowing: true
settings:
printf:
funcs:
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
golint:
min-confidence: 0.8
gofmt:
simplify: true
goimports:
local-prefixes:
gocyclo:
min-complexity: 10
maligned:
suggest-new: true
dupl:
threshold: 100
goconst:
min-len: 3
min-occurrences: 3
misspell:
locale:
ignore-words: []
lll:
line-length: 120
tab-width: 1
unused:
check-exported: false
unparam:
check-exported: false
nakedret:
max-func-lines: 30
linters:
disable-all: true
enable:
- deadcode
- gocyclo
- gofmt
- goimports
- golint
- gosimple
- ineffassign
- misspell
- unconvert
- unused
- vet
- varcheck
- maligned
- errcheck
- megacheck
- goconst
- gas
- structcheck
enable-all: false
disable: []
presets:
- bugs
- unused
fast: false
issues:
exclude-use-default: false
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化