From 6e2ab6955b9629a65d825a1a0197db6d14e77942 Mon Sep 17 00:00:00 2001 From: Arnav Nagzirkar <113314200+arnavnagzirkar@users.noreply.github.com> Date: Mon, 22 Jun 2026 23:31:35 -0700 Subject: [PATCH] fix: avoid shadowing builtin 'real' in installer base test Rename the 'real' variable in TestPathSkipsEmptyPluginDirs to 'realDir' so it no longer redefines the built-in 'real' function, which revive's redefines-builtin-id rule flagged in golangci-lint. Signed-off-by: Arnav Nagzirkar <113314200+arnavnagzirkar@users.noreply.github.com> --- internal/plugin/installer/base_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/plugin/installer/base_test.go b/internal/plugin/installer/base_test.go index 9f6ade8fd..3af38790d 100644 --- a/internal/plugin/installer/base_test.go +++ b/internal/plugin/installer/base_test.go @@ -74,13 +74,13 @@ func TestPathEmptyPluginDir(t *testing.T) { func TestPathSkipsEmptyPluginDirs(t *testing.T) { // A leading empty segment (e.g. ":/real/path") must be skipped so the plugin is // installed into the first real directory rather than a relative path. - real := filepath.FromSlash("/helm/data/plugins") - multiPath := string(filepath.ListSeparator) + real + realDir := filepath.FromSlash("/helm/data/plugins") + multiPath := string(filepath.ListSeparator) + realDir t.Setenv("HELM_PLUGINS", multiPath) b := newBase("https://github.com/jkroepke/helm-secrets") got := b.Path() - expected := filepath.Join(real, "helm-secrets") + expected := filepath.Join(realDir, "helm-secrets") if got != expected { t.Errorf("expected path %s, got %s", expected, got) }