mirror of
https://github.com/coreos/prometheus-operator.git
synced 2026-02-05 15:46:31 +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:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user