-
-
Notifications
You must be signed in to change notification settings - Fork 152
Expand file tree
/
Copy path.golangci.yaml
More file actions
34 lines (32 loc) · 1.05 KB
/
Copy path.golangci.yaml
File metadata and controls
34 lines (32 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Defines the configuration version.
# The only possible value is "2".
version: "2"
linters:
# Default set of linters.
# The value can be:
# - `standard`: https://golangci-lint.run/docs/linters/#enabled-by-default
# - `all`: enables all linters by default.
# - `none`: disables all linters by default.
# - `fast`: enables only linters considered as "fast" (`golangci-lint help linters --json | jq '[ .[] | select(.fast==true) ] | map(.name)'`).
# Default: standard
default: standard
exclusions:
rules:
# pkg/virefs 内化自上游 VireFS,沿用其原有的 errcheck 习惯(defer Close() 等惯用法)。
- path: ^pkg/virefs/
linters:
- errcheck
# pkg/log/tint 是 verbatim vendored 的第三方库(lmittmann/tint, MIT),不按本仓 lint 习惯改。
- path: ^pkg/log/tint/
linters:
- errcheck
- staticcheck
formatters:
# Enable specific formatter.
# Default: [] (uses standard Go formatting)
enable:
- gci
- gofmt
- gofumpt
- goimports
- swaggo