1
0
mirror of https://github.com/coreos/prometheus-operator.git synced 2026-02-05 06:45:27 +01:00

chore: add modernize lint (#8094)

* add modernize lint
* fix github action
Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
This commit is contained in:
dongjiang
2025-11-13 14:32:09 +08:00
committed by GitHub
parent 8eb290c396
commit 9ab0ffd0d7
3 changed files with 7 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
version: v2.5.0
version: v2.6.0
name: golangci-kube-api-linter
destination: ./tmp/bin/
plugins:
- module: 'sigs.k8s.io/kube-api-linter'
version: v0.0.0-20250902135116-ef33eac3b92b
version: v0.0.0-20251112164541-d94382a24f06

View File

@@ -12,6 +12,7 @@ linters:
- godoclint
- iface
- iotamixing
- modernize
- nilnesserr
- recvcheck
- revive
@@ -31,6 +32,9 @@ linters:
exclude-functions:
# Any error in HTTP handlers is handled by the server itself.
- (net/http.ResponseWriter).Write
modernize:
disable:
- omitzero
exclusions:
generated: strict
presets:

View File

@@ -326,7 +326,7 @@ func NewFakeRecorder(bufferSize int, related runtime.Object) *EventRecorder {
}
// Eventf records a Kubernetes event.
func (er *EventRecorder) Eventf(regarding runtime.Object, eventtype, reason, action, note string, args ...interface{}) {
func (er *EventRecorder) Eventf(regarding runtime.Object, eventtype, reason, action, note string, args ...any) {
er.er.Eventf(
regarding,
er.related,