-
Notifications
You must be signed in to change notification settings - Fork 594
chore(ci): upgrade to golangci-lint v2.5.0 #4931
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
Conversation
0babb1f to
c0ecafb
Compare
c0ecafb to
f4ad33f
Compare
|
can we keep wsl_v5 but override its config to be the same as the old one? |
|
btw, we'll first cut v0.22 release and then merge this change along with upgrading to golang 1.25. |
|
Possibly @jkowalski, I didn't spend too much time on |
f982896 to
704cb36
Compare
|
OK, |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4931 +/- ##
==========================================
+ Coverage 75.86% 78.03% +2.17%
==========================================
Files 470 548 +78
Lines 37301 31429 -5872
==========================================
- Hits 28299 24527 -3772
+ Misses 7071 4850 -2221
- Partials 1931 2052 +121 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
julio-lopez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇Thanks for doing this.
See inline comments.
internal/apiclient/apiclient.go
Outdated
| tp, _ = transport.(*http.Transport) | ||
| tp.DialContext = func(_ context.Context, _, _ string) (net.Conn, error) { | ||
| dial, err := net.Dial("unix", u.Path) | ||
| tp.DialContext = func(ctx context.Context, _, _ string) (net.Conn, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not completely clear (to me) what the side effect of the ctx changes might be w.r.t context cancellation.
Can you put the ctx changes in a separate PR please? maybe by disabling the noctx linter in the config for now.
That way, all the other changes in this PR, including the linter upgrade. Then the ctx changes can be merged after the release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Julio Lopez <1953782+julio-lopez@users.noreply.github.com>
Co-authored-by: Julio Lopez <1953782+julio-lopez@users.noreply.github.com>
This reverts commit 86ccd4d.
|
Thanks! |
I recently tried linting this project to check something I was working on and golangci-lint v2.1.2 paniced because I'm using Go 1.25 and apparently they don't play nice together. So I figured I'd upgrade to v2.5.0 (latest).
I've pushed fixes for each linter in separate commits since they're generally quite opinionated and each will likely need to be reviewed in isolation.
Notes:
wsl_v5(successor towsl) - disabled - created a lot of churn.embeddedstructfieldcheck- disabled - not against this but it created false positives related to comments I think.noinlineerr- disabled - personal preference, feel free to overrule.gofumpt- removed naked returns, somewhat controversial in the community.noctx- usedcontext.Background()in a couple of places, maybe should becontext.TODO().godot- some packages have adoc.go, most don't. I went with a light touch where possible.