-
Notifications
You must be signed in to change notification settings - Fork 18.8k
fix errorlint linter #50158
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
fix errorlint linter #50158
Conversation
37680b9
to
266e00f
Compare
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.
LGTM, thanks!
All reactions
CI looks happy, so it's probably fine to bring this in; my only concern is that changing @robmry @vvoland any thoughts / concerns? (such cases of course should've been caught in CI, but not sure if there's always cases to check for "unknown" situations) |
I don't know of anywhere the underlying error is deliberately masked ... but that just means I don't know, I wouldn't bet on CI catching that sort of thing. We don't know of any issues caused by the masking. There's also a lot of change, too much to review in any detail. So, yes - the The |
To reduce risk (for now), could you move the second commit (for |
@thaJeztah , |
# Check for plain type assertions and type switches. | ||
asserts: false |
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.
This one looks enabled by default, and I think this PR should fix these, or are there more remaining that are not yet fixed? If all of them are fixed, we can remove these lines.
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.
As I said initially in the description of the PR, I did not treated asserts because this needs a lot of change.
I believe it is better to have a dedicated one for that purpose.
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.
oh! I mis-interpreted assert
as the ones that were fixed in this PR (use errors.Is
/ errors.As
) 🙈
f54f7d2
to
ac8ee2d
Compare
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.
LGTM - thank you
313c4d9
to
ed30ee4
Compare
Probably unrelated, but in case it isn't;
|
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! LGTM after the //nolint
comments are addressed to prevent the extra code-churn
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
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.
LGTM, thanks!
- What I did
Enables errorlint linter with
comparison
rule and fixes issues. Theerrorf
,errorf-multi
andassert
rules are disabled because it requires a number of changes that deserves a dedicated PR- How I did it
- How to verify it
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)