Bump to Go 1.24, golangci-lint v2.2#6584
Conversation
Signed-off-by: Nic Cope <nicc@rk0n.org>
Signed-off-by: Nic Cope <nicc@rk0n.org>
Signed-off-by: Nic Cope <nicc@rk0n.org>
I like the idea personally, but way too much churn to enable it. Signed-off-by: Nic Cope <nicc@rk0n.org>
Seems like a good idea, but we do want reason to come before args etc in test files. Signed-off-by: Nic Cope <nicc@rk0n.org>
1d00c9e to
3a7be80
Compare
99% of the code changes in this PR are auto-generated. Signed-off-by: Nic Cope <nicc@rk0n.org>
3a7be80 to
54e0ba1
Compare
| @@ -1,16 +1,12 @@ | |||
| run: | |||
| timeout: 10m | |||
| version: "2" | |||
There was a problem hiding this comment.
This file is pretty much entirely formatting changes.
I did disable 1-2 new linters.
|
|
||
| package utils | ||
| // Package certificate contains utilities for working with test certificates. | ||
| package certificate |
There was a problem hiding this comment.
I renamed this one package and its one function to avoid util as a package name, which is an anti-pattern that now gets caught by a linter.
| var decodedPayload []byte | ||
| if val, ok := payloadData["payload"]; ok { | ||
| decodedPayload, err = base64.StdEncoding.DecodeString(val.(string)) | ||
| decodedPayload, err = base64.StdEncoding.DecodeString(val.(string)) //nolint:forcetypeassert // TODO(negz): Will this always be a string? |
There was a problem hiding this comment.
I added this ignore comment.
jbw976
left a comment
There was a problem hiding this comment.
these updated linters are very particular in their preference of new lines 🤓 - i suspect folks will run into that in a lot of upcoming PRs, but I'm not particularly concerned since we'll have consistency.
Seems reasonable to me! Any contributor advice to add, e.g. about updating their environments or anything?
I think it's pretty IDE dependent. There's some info about v2 support at https://golangci-lint.run/welcome/integrations/ - notably it looks like you need to update to a pre-release version of the VS Code plugin for it to work. |
Description of your changes
I've been avoiding this due to the breaking golangci-lint change.
This is a huge diff, but most of it is from
golangci-lint run --fmt. I did touch a few files by hand and unfortunately they're in the same commit as the generated code. It's hard to avoid this, becausegolangci-lint run --fmtformats everything as soon as it runs (e.g. to check that my updates worked). I'll add comments on the things I touched manually.Edit: I skimmed the diff, and it's 99% whitespace being added around blocks. I think this is all happening due to the
gofumptformatter. We had that enabled already, but it seems like perhaps it wasn't actually working until now?I have:
earthly +reviewableto ensure this PR is ready for review.Added or updated unit tests.Added or updated e2e tests.Linked a PR or a docs tracking issue to document this change.Addedbackport release-x.ylabels to auto-backport this PR.Followed the API promotion workflow if this PR introduces, removes, or promotes an API.Need help with this checklist? See the cheat sheet.