From 989d8d43569bde1d7d572b95b1f0646279ce9f7c Mon Sep 17 00:00:00 2001 From: Keith Gaughan Date: Sun, 14 Sep 2025 16:28:25 +0100 Subject: [PATCH] Update golang-lint CI to final v1 release: v1.64.8 Additionally, fix up a few minor issues caught by it. --- .github/workflows/golangci.yaml | 2 +- Makefile | 2 +- outputs/outputs.go | 2 +- outputs/prometheus_test.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/golangci.yaml b/.github/workflows/golangci.yaml index b6ddfd13b..8b1a2dd9e 100644 --- a/.github/workflows/golangci.yaml +++ b/.github/workflows/golangci.yaml @@ -26,7 +26,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: - version: v1.59 + version: v1.64.8 coverage: needs: [lint] diff --git a/Makefile b/Makefile index ee89dabcb..37ce74258 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ htmlcov: lint: $(info INFO: Starting build $@) - go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59 + go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8 golangci-lint run --timeout 5m $(pkgs) || true vet: diff --git a/outputs/outputs.go b/outputs/outputs.go index dca4a8ac5..8268912ad 100644 --- a/outputs/outputs.go +++ b/outputs/outputs.go @@ -231,7 +231,7 @@ func IsValidFormat(f string) bool { func GetOutputer(name string) (Outputer, error) { if _, ok := outputers[name]; !ok { - return nil, fmt.Errorf("bad output format: " + name) + return nil, fmt.Errorf("bad output format: %v", name) } return outputers[name], nil } diff --git a/outputs/prometheus_test.go b/outputs/prometheus_test.go index 18a692033..ca18aa909 100644 --- a/outputs/prometheus_test.go +++ b/outputs/prometheus_test.go @@ -512,7 +512,7 @@ func TestPrometheusOutput(t *testing.T) { assert.Equal(t, 0, exitCode) output := buf.String() - t.Logf(output) + t.Logf("%v", output) for _, metric := range testCase.expectedMetrics { assert.Contains(t, output, metric) }