From 0ed92f0696329495d87f8acdc42687c30b31d431 Mon Sep 17 00:00:00 2001 From: Terry Howe Date: Thu, 28 May 2026 05:22:07 -0600 Subject: [PATCH] ci: bump golangci-lint to v2.11.3 for go 1.26 golangci-lint v2.5.0 is built with go1.25 and refuses to lint a module targeting go 1.26.0. Bump to v2.11.3 (matching main) and apply the new staticcheck QF1012 fixes it surfaces in jsonschema.go. Signed-off-by: Terry Howe --- .github/env | 2 +- pkg/chartutil/jsonschema.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/env b/.github/env index 04b4c2723..43ebdd36e 100644 --- a/.github/env +++ b/.github/env @@ -1,2 +1,2 @@ GOLANG_VERSION=1.26 -GOLANGCI_LINT_VERSION=v2.5.0 +GOLANGCI_LINT_VERSION=v2.11.3 diff --git a/pkg/chartutil/jsonschema.go b/pkg/chartutil/jsonschema.go index 632e6dfd1..3718cf37a 100644 --- a/pkg/chartutil/jsonschema.go +++ b/pkg/chartutil/jsonschema.go @@ -78,7 +78,7 @@ func ValidateAgainstSchema(chrt *chart.Chart, values map[string]interface{}) err err := ValidateAgainstSingleSchema(values, chrt.Schema) if err != nil { - sb.WriteString(fmt.Sprintf("%s:\n", chrt.Name())) + fmt.Fprintf(&sb, "%s:\n", chrt.Name()) sb.WriteString(err.Error()) } } @@ -92,10 +92,10 @@ func ValidateAgainstSchema(chrt *chart.Chart, values map[string]interface{}) err subchartValues, ok := raw.(map[string]any) if !ok { - sb.WriteString(fmt.Sprintf( + fmt.Fprintf(&sb, "%s:\ninvalid type for values: expected object (map), got %T\n", subchart.Name(), raw, - )) + ) continue } if err := ValidateAgainstSchema(subchart, subchartValues); err != nil {