-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Adds a new lint that checks if there is a semicolon on the last block statement if it returns nothing #6681
Conversation
r? @phansch (rust-highfive has picked a reviewer for you, use r? to override) |
The |
It can happen that a new lint triggers on Clippy code. The lint implementer usually just updates the code to conform with the new lint. It's basically a self improving machine where each lint also improves Clippy itself. Your observation with I suggest that you first try his suggestion with checking the snippet's last character for an
Afterwards there should only be a few reports left. Examples like this following one are exactly what the lint is made for and can be fixed by adding a
One more side note: This new lint should be included in the Change log currently you have changelog: Added a new lint: `SEMICOLON_IF_NOTHING_RETURNED` This makes it easier for the one writing the change log for the next release 🙃 |
bcc1762
to
2b3ddd2
Compare
2b3ddd2
to
6626295
Compare
Oke, so the lint is now working. In an earlier version the lint was (falsely) triggered on those lines, but after resolving the snippet in another way, this did not come while testing. Thanks again to @xFrednet and @flip1995 for the great support! |
LGTM, thanks! @bors r=xFrednet,flip1995,phansch |
📌 Commit 6b4789d has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
changelog: Added a new lint:
SEMICOLON_IF_NOTHING_RETURNED
fixes #6467
Adds the
SEMICOLON_IF_NOTHING_RETURNED
lint and therefore closes #6467.