2 Star 0 Fork 0

mirrors_sourcegraph/src-cli

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.golangci.yml 1.74 KB
一键复制 编辑 原始数据 按行查看 历史
William Bezuidenhout 提交于 2025-11-11 17:32 +08:00 . fix: go linting issues (#1194)
version: "2"
linters:
default: none
enable:
- bodyclose
- depguard
- gocritic
- govet
- ineffassign
- nolintlint
- staticcheck
- unconvert
- unused
settings:
depguard:
rules:
main:
deny:
- pkg: errors
desc: Use github.com/sourcegraph/sourcegraph/lib/errors instead
- pkg: github.com/pkg/errors
desc: Use github.com/sourcegraph/sourcegraph/lib/errors instead
- pkg: github.com/cockroachdb/errors
desc: Use github.com/sourcegraph/sourcegraph/lib/errors instead
- pkg: github.com/hashicorp/go-multierror
desc: Use github.com/sourcegraph/sourcegraph/lib/errors instead
- pkg: io/ioutil
desc: The ioutil package has been deprecated
forbidigo:
forbid:
- pattern: fmt\.Errorf
gocritic:
disabled-checks:
- appendAssign
- assignOp
- commentFormatting
- deprecatedComment
- exitAfterDefer
- ifElseChain
- singleCaseSwitch
govet:
disable:
- composites
staticcheck:
checks:
- all
- -QF1001 # De Morgan's law simplifications
- -QF1008 # Embedded field selector simplifications
- -ST1003 # Naming conventions (ID vs Id, URL vs Url, etc.)
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- bodyclose
path: _test\.go
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_sourcegraph/src-cli.git
git@gitee.com:mirrors_sourcegraph/src-cli.git
mirrors_sourcegraph
src-cli
src-cli
main

搜索帮助