From 578d9f2293e5a6093b8d550e7f6a906468098436 Mon Sep 17 00:00:00 2001 From: Patrick Dillon Date: Mon, 9 Mar 2026 16:41:34 -0400 Subject: [PATCH 1/2] golangci: drop prealloc Prealloc's docs state that using it is an overoptimization. It was causing some failures in ci rehearsal testing, so let's drop it. --- .golangci-lint-v2.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.golangci-lint-v2.yaml b/.golangci-lint-v2.yaml index 7b4879a32dc..6225a21865c 100644 --- a/.golangci-lint-v2.yaml +++ b/.golangci-lint-v2.yaml @@ -19,7 +19,6 @@ linters: - importas - misspell - nakedret - - prealloc - predeclared - revive - staticcheck From 4aeaa1467d0927c5d4688f54e128484edb25821f Mon Sep 17 00:00:00 2001 From: Patrick Dillon Date: Mon, 9 Mar 2026 16:44:20 -0400 Subject: [PATCH 2/2] golangci: avoid var-naming flake We are frequently seeing a flake for package types: pkg/types/utils_test.go:1:9: var-naming: avoid meaningless package names (revive) package types ^ Disable this specific linter to avoid these flakes. --- .golangci-lint-v2.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.golangci-lint-v2.yaml b/.golangci-lint-v2.yaml index 6225a21865c..27a334eaf6a 100644 --- a/.golangci-lint-v2.yaml +++ b/.golangci-lint-v2.yaml @@ -87,6 +87,9 @@ linters: - linters: - goconst path: _test\.go + - linters: + - revive + text: "var-naming: avoid meaningless package names" paths: - ^bin - ^cluster-api