-
Notifications
You must be signed in to change notification settings - Fork 130
deps: bump x/tools to 0.30.0 to support Go 1.24 #1454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deps: bump x/tools to 0.30.0 to support Go 1.24 #1454
Conversation
Hi @cristaloleg, Could you please review this PR at your earliest convenience? If everything looks good, would you mind making a new release after merging? Thank you! |
I assume that you've tested this locally and compiling |
Yep, I tested on the newest golangci-lint codebase. Before (error): ❯ git switch master
Already on 'master'
Your branch is up to date with 'origin/master'.
❯ go version
go version go1.24.0 darwin/arm64
❯ make build-release
mkdir -p bin
go build -o bin/gocritic -ldflags "-X 'main.Version='" ./cmd/gocritic
❯ cd ~/src/github.com/golangci/golangci-lint
❯ ~/src/github.com/go-critic/go-critic/bin/gocritic check ./...
internal error: package "errors" without types was imported from "github.com/golangci/golangci-lint/internal/go/robustio" After (warnings, as expected): ...
❯ git switch bump-x-tools-0.30.0
Switched to branch 'bump-x-tools-0.30.0'
Your branch is up to date with 'fork/bump-x-tools-0.30.0'.
❯ ~/src/github.com/go-critic/go-critic/bin/gocritic check ./...
./internal/x/tools/diff/unified.go:132:4: commentFormatting: put a space between `//` and comment text
./internal/x/tools/diff/unified.go:134:4: commentFormatting: put a space between `//` and comment text
./internal/x/tools/diff/unified.go:137:4: commentFormatting: put a space between `//` and comment text
./internal/x/tools/diff/unified.go:219:3: ifElseChain: rewrite if-else to switch statement
./internal/x/tools/diff/unified.go:227:3: ifElseChain: rewrite if-else to switch statement
./internal/x/tools/diff/lcs/labels.go:22:14: captLocal: `D' should not be capitalized
./internal/x/tools/diff/lcs/labels.go:29:21: captLocal: `D' should not be capitalized
./internal/x/tools/diff/lcs/old.go:91:27: captLocal: `D' should not be capitalized
./internal/x/tools/diff/lcs/old.go:147:32: captLocal: `D' should not be capitalized
./internal/x/tools/diff/lcs/old.go:191:27: captLocal: `D' should not be capitalized
./internal/x/tools/diff/lcs/old.go:251:33: captLocal: `D' should not be capitalized
./pkg/golinters/internal/staticcheck_common.go:106:12: elseif: can replace 'else {if cond {}}' with 'else if cond {}'
./pkg/golinters/internal/staticcheck_common.go:88:3: ifElseChain: rewrite if-else to switch statement
./pkg/golinters/internal/staticcheck_common.go:96:39: unlambda: replace `func(r rune) bool { return unicode.IsNumber(r) }` with `unicode.IsNumber`
./pkg/golinters/internal/staticcheck_common.go:99:33: unlambda: replace `func(r rune) bool { return unicode.IsNumber(r) }` with `unicode.IsNumber` |
Thanks @alexandear v0.12.0 landed |
@cristaloleg, thank you for the prompt response and for reviewing the PR. |
confirmed: it works again :-) |
This PR fixes the problem with building go-critic on Homebrew/homebrew-core#201070 with Go 1.24. Also, it fixes failing tests.
This update is done by hand because @dependabot can't update the Go version in
go.mod
.Diff: golang/tools@v0.23.0...v0.30.0
Closes #1436