2021-02-17 15:42:08 +08:00
|
|
|
run:
|
2023-12-15 05:26:38 +08:00
|
|
|
timeout: 30m
|
2021-02-17 15:42:08 +08:00
|
|
|
skip-files:
|
|
|
|
- ".*\\.pb\\.go$"
|
|
|
|
|
|
|
|
modules-download-mode: vendor
|
|
|
|
|
|
|
|
build-tags:
|
|
|
|
|
|
|
|
linters:
|
|
|
|
enable:
|
|
|
|
- gofmt
|
|
|
|
- govet
|
2022-03-10 08:47:41 +08:00
|
|
|
- depguard
|
2021-02-17 15:42:08 +08:00
|
|
|
- goimports
|
|
|
|
- ineffassign
|
|
|
|
- misspell
|
|
|
|
- unused
|
2022-05-23 23:54:46 +08:00
|
|
|
- revive
|
2021-02-17 15:42:08 +08:00
|
|
|
- staticcheck
|
|
|
|
- typecheck
|
2022-10-19 22:11:23 +08:00
|
|
|
- nolintlint
|
2023-02-01 18:11:56 +08:00
|
|
|
- gosec
|
2023-02-01 18:23:47 +08:00
|
|
|
- forbidigo
|
2021-02-17 15:42:08 +08:00
|
|
|
disable-all: true
|
|
|
|
|
2022-03-10 08:47:41 +08:00
|
|
|
linters-settings:
|
2024-04-25 08:20:27 +08:00
|
|
|
govet:
|
|
|
|
enable:
|
|
|
|
- nilness
|
|
|
|
- unusedwrite
|
|
|
|
# enable-all: true
|
|
|
|
# disable:
|
|
|
|
# - fieldalignment
|
|
|
|
# - shadow
|
2022-03-10 08:47:41 +08:00
|
|
|
depguard:
|
2023-10-19 18:24:07 +08:00
|
|
|
rules:
|
|
|
|
main:
|
|
|
|
deny:
|
2024-06-12 07:07:51 +08:00
|
|
|
- pkg: "github.com/containerd/containerd/errdefs"
|
|
|
|
desc: The containerd errdefs package was migrated to a separate module. Use github.com/containerd/errdefs instead.
|
|
|
|
- pkg: "github.com/containerd/containerd/log"
|
|
|
|
desc: The containerd log package was migrated to a separate module. Use github.com/containerd/log instead.
|
2023-10-19 18:24:07 +08:00
|
|
|
- pkg: "io/ioutil"
|
|
|
|
desc: The io/ioutil package has been deprecated.
|
2023-02-01 18:23:47 +08:00
|
|
|
forbidigo:
|
|
|
|
forbid:
|
|
|
|
- '^fmt\.Errorf(# use errors\.Errorf instead)?$'
|
2023-02-01 18:11:56 +08:00
|
|
|
gosec:
|
|
|
|
excludes:
|
|
|
|
- G204 # Audit use of command execution
|
|
|
|
- G402 # TLS MinVersion too low
|
|
|
|
config:
|
|
|
|
G306: "0644"
|
2022-03-10 08:47:41 +08:00
|
|
|
|
2021-02-17 15:42:08 +08:00
|
|
|
issues:
|
|
|
|
exclude-rules:
|
|
|
|
- linters:
|
2022-05-23 23:54:46 +08:00
|
|
|
- revive
|
2021-02-17 15:42:08 +08:00
|
|
|
text: "stutters"
|
2023-10-19 18:24:07 +08:00
|
|
|
- linters:
|
|
|
|
- revive
|
|
|
|
text: "empty-block"
|
|
|
|
- linters:
|
|
|
|
- revive
|
|
|
|
text: "superfluous-else"
|
|
|
|
- linters:
|
|
|
|
- revive
|
|
|
|
text: "unused-parameter"
|
|
|
|
- linters:
|
|
|
|
- revive
|
|
|
|
text: "redefines-builtin-id"
|
|
|
|
- linters:
|
|
|
|
- revive
|
|
|
|
text: "if-return"
|
|
|
|
|
|
|
|
# show all
|
|
|
|
max-issues-per-linter: 0
|
|
|
|
max-same-issues: 0
|