-
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
Add lint [bool_to_int_with_if]
#9086
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @dswij (or someone else) soon. Please see the contribution instructions for more information. |
This looks like a fun one, and I've already had a discussion in the issue. I'm claiming the review, I hope that's okay. r? @xFrednet I'll do a full review over the weekend. @jst-r The commits use a different username and email than your account. This is totally fine for us, but I wanted to point that out, in case that was a mistake 🙃 |
@rustbot ready |
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.
The implementation looks good to me! I have some small formatting nits which should be simple to fix. Then the implementation is ready 🎉
Before we can merge it, there are two more things. Rust and Clippy use a No merge commit policy. This basically means that then only merge commits should be added for PRs. Conflicts have to be resolved with rebases. See resolve the merge conflicts. And it would be good if you could squash most commits, so we only have some few meaningful ones left.
To avoid dropping the merge commits first etc. you can squash all commits, including the merge commits, into one. Then you don't have to deal with them separately. You're welcome to reach out, if you need any help with that :)
@rustbot author |
Co-authored-by: Fridtjof Stoldt <[email protected]>
Co-authored-by: Fridtjof Stoldt <[email protected]>
Hey @jst-r, the last version looks good to me. Now all that needs to be done is a rebase and squashing some commits as well as removing the merge commits. I would suggest squashing everything into one, large commit, as that would also remove the merge commits. Let me know if you need any help with that 🙃. |
Hey @jst-r, I would love to get this merged, since the lint is a nice addition to Clippy. Since you haven't replied, would it be alright with you, if I squash the commits and merge it? 🙃 |
Hi, it would be great if you could merge it. Sorry for dissappearing again, deadlines tied to back to school got the best of me. |
New lint `bool_to_int_with_if` This is a rebased version of #9086 I could sadly not push directly push to the PR branch as it's protected. The lint implementation comes from `@jst-r.` Thank you for the work you put into this :) --- Closes: #8131 Closes: #9086 changelog: Add lint [`bool_to_int_with_if`] r? `@ghost`
Alright, I'm closing this in favor of #9412. Sadly I couldn't push to this branch since your master is protected. I hope that everything works out and you get credit for the commit. The rebase actually took some time, but the test are all passing now.
No worries, that also happens to me. I hope that you still enjoyed working on Clippy. Thank you for implementing this lint :) |
If you added a new lint, here's a checklist for things that will be
checked during review or continuous integration.
.stderr
file)cargo test
passes locallycargo dev update_lints
cargo dev fmt
fixes #8131
Please write a short comment explaining your change (or "none" for internal only changes)
changelog: added lint
[`bool_to_int_with_if`]