-
Notifications
You must be signed in to change notification settings - Fork 1.8k
don't trigger blocks_in_conditions
when the condition contains a return
#14338
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
r? @Manishearth rustbot has assigned @Manishearth. Use |
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.
Just a small refactoring and this looks ok.
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, I have a nit but it is not blocking. @Manishearth you can queue it if it's ok with you.
} | ||
|
||
// Linting should not be triggered to cases where `return` is included in the condition. | ||
// #9911 |
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.
Nit: I personally dislike using a issue number here (it is already present in the tests which would fail if this was removed), but there are already a few instances of it (but not many) in the sources. This is different from using "TODO see issue #xxx" because in this case there is an action needed.
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 think it's fine to have context like this noted
fixes #9911
changelog: [
blocks_in_conditions
]: don't trigger the lint when the condition contains areturn