Skip to content

Commit d37492a

Browse files
AI Assistantclaude
andcommitted
fix(golangci-lint): use /v2 module path for go install per Go conventions
The previous fix prioritized GitHub binary downloads, but the go install fallback was still using the v1 module path which only has versions up to v1.64.8. Go modules v2+ require a /v2 suffix in the module path per semantic import versioning conventions. golangci-lint v2.5.0 is available in the Go module proxy at: github.com/golangci/golangci-lint/v2 Changes: - Updated go install command to use /v2 module path - Added comment explaining the v2+ Go module convention - Verified v2.5.0 is available: https://proxy.golang.org/github.com/golangci/golangci-lint/v2/@latest Result: Both GitHub binary (primary) and go install (fallback) now correctly install v2.5.0 instead of v1.64.8. Credit: User pointed out the v2 module path requirement for Go v2+ versions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 189ef5f commit d37492a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/install_core.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,9 @@ install_golangci_lint() {
741741
fi
742742
fi
743743
# Fallback to go install (requires go 1.17+)
744+
# Note: v2+ uses /v2 module path per Go module conventions
744745
if command -v go >/dev/null 2>&1; then
745-
GO111MODULE=on go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest && $INSTALL "$(go_bin_path)/golangci-lint" "$BIN_DIR/golangci-lint" && return
746+
GO111MODULE=on go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest && $INSTALL "$(go_bin_path)/golangci-lint" "$BIN_DIR/golangci-lint" && return
746747
fi
747748
}
748749

0 commit comments

Comments
 (0)