2020-11-25 17:17:03 +01:00
|
|
|
run:
|
2025-01-22 11:26:51 +08:00
|
|
|
timeout: 10m
|
2020-11-25 17:17:03 +01:00
|
|
|
|
|
|
|
linters:
|
|
|
|
enable:
|
2021-06-09 15:32:23 +04:00
|
|
|
- revive
|
2023-06-13 17:01:43 +02:00
|
|
|
- gci
|
2023-09-30 13:22:03 +02:00
|
|
|
- depguard
|
2024-01-08 12:07:39 -03:00
|
|
|
- godot
|
2024-01-08 14:06:49 -03:00
|
|
|
- testifylint
|
2024-01-08 17:11:27 -03:00
|
|
|
- unconvert
|
2024-11-13 22:48:14 +08:00
|
|
|
- recvcheck
|
|
|
|
- iface
|
2025-01-09 18:21:33 +08:00
|
|
|
- exptostd
|
|
|
|
- nilnesserr
|
2025-01-06 19:14:18 +08:00
|
|
|
- sloglint
|
2021-03-15 00:21:14 +01:00
|
|
|
|
|
|
|
issues:
|
|
|
|
exclude-rules:
|
2023-12-08 10:14:57 +01:00
|
|
|
# Disable errcheck linter for test files.
|
2021-03-15 00:21:14 +01:00
|
|
|
- path: _test.go
|
|
|
|
linters:
|
|
|
|
- errcheck
|
2024-11-13 22:48:14 +08:00
|
|
|
# We *frequently* use the term 'new' in the context of properties
|
|
|
|
# (new and old properties),
|
|
|
|
# and we rarely use the 'new' built-in function.
|
|
|
|
# It's fine to ignore these cases.
|
|
|
|
- linters:
|
|
|
|
- revive
|
|
|
|
text: 'redefines-builtin-id: redefinition of the built-in function new'
|
2021-03-15 00:21:14 +01:00
|
|
|
|
|
|
|
linters-settings:
|
|
|
|
errcheck:
|
2024-05-13 14:55:49 +02:00
|
|
|
exclude-functions:
|
|
|
|
# Any error in HTTP handlers is handled by the server itself.
|
|
|
|
- (net/http.ResponseWriter).Write
|
2023-06-13 17:01:43 +02:00
|
|
|
gci:
|
|
|
|
sections:
|
|
|
|
- standard
|
|
|
|
- default
|
|
|
|
- prefix(github.com/prometheus-operator/prometheus-operator)
|
2023-09-30 13:22:03 +02:00
|
|
|
depguard:
|
|
|
|
rules:
|
|
|
|
forbid-pkg-errors:
|
|
|
|
deny:
|
|
|
|
- pkg: "github.com/pkg/errors"
|
2025-02-18 18:55:09 +08:00
|
|
|
desc: Should be replaced with standard lib errors or fmt.Errorf
|