Skip to content

Comments

fix(make): unblock make ecctl on Go 1.25+#750

Merged
jowiho merged 5 commits intomasterfrom
fix/make-ecctl-go125
Feb 11, 2026
Merged

fix(make): unblock make ecctl on Go 1.25+#750
jowiho merged 5 commits intomasterfrom
fix/make-ecctl-go125

Conversation

@jowiho
Copy link
Contributor

@jowiho jowiho commented Feb 10, 2026

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.


Original prompt

make ecctl fails 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

`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>
@jowiho jowiho requested a review from a team as a code owner February 10, 2026 17:33
@jowiho jowiho self-assigned this Feb 10, 2026
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>
@ echo "-> Formatting Go files..."
@ $(GOBIN)/go-licenser -license ASL2
@ $(GOBIN)/golangci-lint run --fix --timeout 5m
@ $(GOBIN)/golangci-lint fmt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, thre is no --fix argument anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There still is actually. I'll have cursor change it back :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

@dimuon dimuon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

jowiho and others added 3 commits February 10, 2026 19:23
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)
@jowiho jowiho merged commit 4b62a7d into master Feb 11, 2026
9 checks passed
@jowiho jowiho deleted the fix/make-ecctl-go125 branch February 11, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants