From 25222cb812a3eae1848b79eeaa0f280fefb3809d Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Tue, 1 Oct 2024 08:36:50 +0200 Subject: [PATCH] fix: apply usestdlibvars linter with golangci strict and hints Signed-off-by: Matthieu MOREL --- hack/golangci-hints.yaml | 1 + hack/golangci-strict.yaml | 1 + hack/golangci.yaml.in | 3 +++ 3 files changed, 5 insertions(+) diff --git a/hack/golangci-hints.yaml b/hack/golangci-hints.yaml index 58b382f0b2c..691128e704b 100644 --- a/hack/golangci-hints.yaml +++ b/hack/golangci-hints.yaml @@ -92,6 +92,7 @@ linters: - stylecheck - testifylint - unused + - usestdlibvars linters-settings: # please keep this alphabetized custom: diff --git a/hack/golangci-strict.yaml b/hack/golangci-strict.yaml index a079e8c449a..487be9eae42 100644 --- a/hack/golangci-strict.yaml +++ b/hack/golangci-strict.yaml @@ -135,6 +135,7 @@ linters: - stylecheck - testifylint - unused + - usestdlibvars disable: # https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1507008359 - errcheck diff --git a/hack/golangci.yaml.in b/hack/golangci.yaml.in index 2501fdf0831..ca96e955e2b 100644 --- a/hack/golangci.yaml.in +++ b/hack/golangci.yaml.in @@ -150,6 +150,9 @@ linters: - stylecheck - testifylint - unused + {{- if not .Base }} + - usestdlibvars + {{- end}} {{- if .Strict}} disable: # https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1507008359