2025-03-31 15:51:44 +08:00
|
|
|
version: "2"
|
2020-11-25 17:17:03 +01:00
|
|
|
run:
|
2025-05-15 21:34:17 +08:00
|
|
|
go: "1.24"
|
2025-01-22 11:26:51 +08:00
|
|
|
timeout: 10m
|
2025-05-15 21:34:17 +08:00
|
|
|
modules-download-mode: readonly
|
|
|
|
|
allow-parallel-runners: true
|
2020-11-25 17:17:03 +01:00
|
|
|
linters:
|
|
|
|
|
enable:
|
2025-03-31 15:51:44 +08:00
|
|
|
- depguard
|
|
|
|
|
- exptostd
|
|
|
|
|
- godot
|
2025-09-25 20:11:04 +08:00
|
|
|
- godoclint
|
2025-03-31 15:51:44 +08:00
|
|
|
- iface
|
2025-09-25 20:11:04 +08:00
|
|
|
- iotamixing
|
2025-03-31 15:51:44 +08:00
|
|
|
- nilnesserr
|
|
|
|
|
- recvcheck
|
2024-11-13 22:48:14 +08:00
|
|
|
- revive
|
2025-03-31 15:51:44 +08:00
|
|
|
- sloglint
|
|
|
|
|
- testifylint
|
|
|
|
|
- unconvert
|
|
|
|
|
settings:
|
|
|
|
|
depguard:
|
|
|
|
|
rules:
|
|
|
|
|
forbid-pkg-errors:
|
|
|
|
|
deny:
|
|
|
|
|
- pkg: github.com/pkg/errors
|
|
|
|
|
desc: Should be replaced with standard lib errors or fmt.Errorf
|
2025-11-04 16:28:38 +08:00
|
|
|
- pkg: sort
|
|
|
|
|
desc: Should be replaced with slices package
|
2025-03-31 15:51:44 +08:00
|
|
|
errcheck:
|
|
|
|
|
exclude-functions:
|
|
|
|
|
# Any error in HTTP handlers is handled by the server itself.
|
|
|
|
|
- (net/http.ResponseWriter).Write
|
|
|
|
|
exclusions:
|
2025-05-15 21:34:17 +08:00
|
|
|
generated: strict
|
2025-03-31 15:51:44 +08:00
|
|
|
presets:
|
|
|
|
|
- comments
|
|
|
|
|
- common-false-positives
|
|
|
|
|
- legacy
|
|
|
|
|
- std-error-handling
|
2023-09-30 13:22:03 +02:00
|
|
|
rules:
|
2025-03-31 15:51:44 +08:00
|
|
|
# Disable errcheck linter for test files.
|
|
|
|
|
- linters:
|
|
|
|
|
- errcheck
|
|
|
|
|
- staticcheck
|
|
|
|
|
- testifylint
|
2025-07-10 20:13:00 +08:00
|
|
|
- revive
|
2025-03-31 15:51:44 +08:00
|
|
|
path: _test.go
|
|
|
|
|
paths:
|
2025-05-15 21:34:17 +08:00
|
|
|
- zz_generated.*\.go$
|
2025-03-31 15:51:44 +08:00
|
|
|
- examples$
|
|
|
|
|
formatters:
|
|
|
|
|
enable:
|
|
|
|
|
- gci
|
|
|
|
|
settings:
|
|
|
|
|
gci:
|
|
|
|
|
sections:
|
|
|
|
|
- standard
|
|
|
|
|
- default
|
|
|
|
|
- prefix(github.com/prometheus-operator/prometheus-operator)
|
|
|
|
|
exclusions:
|
2025-05-15 21:34:17 +08:00
|
|
|
generated: strict
|
2025-03-31 15:51:44 +08:00
|
|
|
paths:
|
2025-05-15 21:34:17 +08:00
|
|
|
- zz_generated.*\.go$
|
2025-03-31 15:51:44 +08:00
|
|
|
- examples$
|