From 5a9968522169d6285b2478ff9723e0dd7a63b48b Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Mon, 18 Aug 2025 10:58:15 -0300 Subject: [PATCH] chore: fix `golangci-lint` locally (#815) For some reason, golangci-lint is not behaving too well after we upgraded to Go 1.25 and enabled GreenTea GC. After some debugging, I found out that we need to compile with Go 1.25 toolchain and run with the GreenTeaGC experiment _disabled_. The build from Nix was built with Go 1.24, so that one doesn't work as expected. --- Taskfile.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Taskfile.yaml b/Taskfile.yaml index 2d174f07bb9397741a5112fe6f532a3f0572f3ee..eb73dbed124a1a09be612d88d70588c2532a7df4 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -7,15 +7,26 @@ env: GOEXPERIMENT: greenteagc tasks: + lint:install: + desc: Install golangci-lint + cmds: + - go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest + env: + GOTOOLCHAIN: go1.25.0 + lint: desc: Run base linters cmds: - golangci-lint run --path-mode=abs --config=".golangci.yml" --timeout=5m + env: + GOEXPERIMENT: null lint-fix: desc: Run base linters and fix issues cmds: - golangci-lint run --path-mode=abs --config=".golangci.yml" --timeout=5m --fix + env: + GOEXPERIMENT: null test: desc: Run tests