Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the Go version to 1.26.2 and the testify dependency to v1.11.1. It also replaces the modernize tool with go fix in the Makefile. A critical issue was identified in the Makefile change: the go fix command does not support the -diff flag, and the current check logic is ineffective for detecting changes. It is recommended to use go fix followed by git diff --exit-code to properly verify that no migrations are pending.
| go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@v0.20.0 ./... | ||
| # non-zero exit status on issues found | ||
| # nb: modernize is not part of golangci-lint yet - https://github.com/golangci/golangci-lint/issues/686 | ||
| test -z $$(go fix -diff ./... | tee /dev/stderr) |
There was a problem hiding this comment.
The go fix command does not support a -diff flag. Additionally, go fix modifies files in-place and is silent on success, so test -z will not detect changes. This check is also fragile: if go fix fails (e.g., due to the invalid flag), the error usually goes to stderr, making test -z pass incorrectly.
Note that go fix is not a direct replacement for the modernize tool. modernize checks for new language features (like any, min/max), while go fix is for legacy API migrations. If you want to verify no changes are needed, use the git diff pattern:
go fix ./...
git diff --exit-code
also bumps testify and go patch version