-
Notifications
You must be signed in to change notification settings - Fork 1.2k
🌱chore: Update golangci-lint version to v2.4.0 #3318
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
🌱chore: Update golangci-lint version to v2.4.0 #3318
Conversation
Hi @dongjiang1989. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/ok-to-test |
/lgtm |
LGTM label has been added. Git tree hash: 0ec93d816d87b78632ecee777c8b553293138d41
|
.golangci.yml
Outdated
@@ -180,6 +181,9 @@ linters: | |||
- staticcheck | |||
path: (.+)\.go$ | |||
text: (ST1000|QF1008) | |||
- text: "Line contains TODO/BUG/FIXME" |
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.
Same question as on the controller-tools PR
Why are we adding a linter and then disabling it? (or is there some part of the linter still active?)
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 @sbueringer
This is some part of the linter still active. Others keywords like NOTE, OPTIMIZE, HACK
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.
Based on the docs I would have thought TODO / BUG / FIXME is default: https://golangci-lint.run/docs/linters/configuration/#godox. Is that not correct?
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.
Sorry. I miss it
Added it done.
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.
Hm, I'm not sure if we should block Note/Optimize/Hack. I think notes are actually beneficial and I don't have a problem with optimize/hack (although we have 0 occurences of these)
Also not sure what our opinion is on TODO/BUG/FIXME.
I personally use FIXME only locally and remove them before PR reviews. TODOs are generally kept and merged (apparently). We have no occurences of BUG
.
So I personally would only block FIXME. But I'm also fine with keeping it all as is on main and not block anything
@JoelSpeed @alvaroaleman Opinions?
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 @sbueringer @JoelSpeed
Change it by codereview
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.
Let's wait for Alvaro's take. In general I would prefer if we would configure the linter to only alert on the cases we want to block. Not configure it for 6 cases and then exclude 4 :)
(I would also not block BUG, I've never sawn anyone adding a "BUG" comment somewhere, so it doesn't seem to make much sense to block it)
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.
I don't think any of Note/Hack/Bug/Todo/Fixme are a reason to just block in CI. There may be cases where that is indicative of something left, but I don't think its safe to assume that is always the case and this will likely just make this linter a nuissance.
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 @alvaroaleman @sbueringer
Remove godox as default?
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.
Yes
43a90c5
to
36a7035
Compare
Signed-off-by: dongjiang <[email protected]>
6f3c20a
to
5e2c9ce
Compare
/test pull-controller-runtime-test |
1 similar comment
/test pull-controller-runtime-test |
Thx! /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dongjiang1989, sbueringer The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM label has been added. Git tree hash: 6032c34f8f357235d2d3a73cea06264f56852531
|
No description provided.