From 424631b93a7f09b4b342b0435ccaa8e7e8bd3fdb Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Sun, 23 Aug 2026 14:39:57 +0200 Subject: [PATCH] build(lint): point golangci-lint install at the v2 module path go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest silently resolves to the latest v1.x release (v1.64.8) -- Go's semantic import versioning treats v2+ as a completely separate module path (.../v2/cmd/golangci-lint), so the unsuffixed path's @latest can never see v2 releases. That mismatched v1 binary can't even load this repo's v2-format .golangci.yml, and separately doesn't understand the go1.27.0 toolchain declared in go.mod. Fix the install hint in `make lint`'s not-found message to use the /v2 path, and refresh the now-current version noted in .golangci.yml's header comment (installed locally as v2.13.1, built with go1.27.0). Co-Authored-By: Claude Sonnet 5 --- .golangci.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 056173fb..a81e9b9e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,5 @@ # golangci-lint configuration for Bose SoundTouch Go Library -# Compatible with golangci-lint v2.8.0 +# Compatible with golangci-lint v2.13.1 # See: https://golangci-lint.run/usage/configuration/ version: "2" diff --git a/Makefile b/Makefile index 7cce66fd..80ed7e05 100644 --- a/Makefile +++ b/Makefile @@ -243,7 +243,7 @@ vet: lint: @echo "Running golangci-lint..." - @which golangci-lint > /dev/null || (echo "golangci-lint not found. Install with: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest" && exit 1) + @which golangci-lint > /dev/null || (echo "golangci-lint not found. Install with: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest" && exit 1) golangci-lint run tidy: