From a3338de10b77545546e088b2f33e2297209684e9 Mon Sep 17 00:00:00 2001 From: ccoVeille <3875889+ccoVeille@users.noreply.github.com> Date: Tue, 27 May 2025 07:41:11 +0200 Subject: [PATCH] chore: enable thelper linter in golangci-lint (#1386) It allows us to report errors at the right place in the tests. There was only one function that was not using the helper. It has been fixed to use it. --- .golangci.yml | 1 + cli/main_test.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 30993c5..8be2a8e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -12,6 +12,7 @@ linters: - misspell - nolintlint - revive + - thelper - staticcheck - unused diff --git a/cli/main_test.go b/cli/main_test.go index 7e9c404..8fe1e85 100644 --- a/cli/main_test.go +++ b/cli/main_test.go @@ -59,6 +59,8 @@ func TestHomeConfigDir(t *testing.T) { } func setHome(t *testing.T, dir string) { + t.Helper() + homeEnv := "HOME" if runtime.GOOS == "windows" { homeEnv = "USERPROFILE"