fix(make): unblock make ecctl on Go 1.25+#750
Merged
Conversation
`make ecctl` installs helper tools and formats sources as part of the build. On Go 1.25, the pinned goreleaser (v2.3.2) fails to compile due to an incompatible golang.org/x/tools dependency, and the pinned golangci-lint (v1.61.0) mis-typechecks on newer Go versions. Bump both tool pins to current versions and migrate the golangci-lint config to v2. Also switch the `format` target to `golangci-lint fmt` so formatting can run without turning the build into a full lint gate. Co-authored-by: Cursor <cursoragent@cursor.com>
After upgrading to golangci-lint v2 to support newer Go versions, `make lint` started failing on unchecked errors (errcheck), embedded-field selector suggestions, and generated bindata warnings. Explicitly discard non-actionable write/close/flush errors in CLI/output paths, apply safe selector simplifications, and exclude the generated bindata file from lint/format checks. Also suppress ST1005 for the one user-facing error string to avoid changing output text. Co-authored-by: Cursor <cursoragent@cursor.com>
dimuon
reviewed
Feb 10, 2026
| @ echo "-> Formatting Go files..." | ||
| @ $(GOBIN)/go-licenser -license ASL2 | ||
| @ $(GOBIN)/golangci-lint run --fix --timeout 5m | ||
| @ $(GOBIN)/golangci-lint fmt |
Contributor
There was a problem hiding this comment.
IIUC, thre is no --fix argument anymore.
Contributor
Author
There was a problem hiding this comment.
There still is actually. I'll have cursor change it back :)
Contributor
Author
There was a problem hiding this comment.
Turns out it's subtly different. The old command used to fix linter issues but not formatting issues. The new command fixes formatting issues but not linter issues. So the new command fits this "make format" task better.
To restore the old behavior as well, I've added --fix to the linter command in the "make lint" task.
The lint config had a file-specific staticcheck exclusion for `cmd/deployment/search.go`. Drop the exemption and adjust the user-facing error string to satisfy ST1005, updating the corresponding test assertion. Co-authored-by: Cursor <cursoragent@cursor.com>
…t, which now fixes formatter issues instead of linter issues)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make ecctlinstalls helper tools and formats sources as part of the build.On Go 1.25, the pinned goreleaser (v2.3.2) fails to compile due to an
incompatible golang.org/x/tools dependency, and the pinned golangci-lint
(v1.61.0) mis-typechecks on newer Go versions.
Bump both tool pins to current versions and migrate the golangci-lint config
to v2. Also switch the
formattarget togolangci-lint fmtso formatting canrun without turning the build into a full lint gate.
Original prompt
make ecctlfails with an error. Find a solution and commit it to a new git branch with a helpful commit message explaining why the change is needed.Made with Cursor