-
Notifications
You must be signed in to change notification settings - Fork 290
Enable some non-default clippy lints #520
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
mind elaborating a bit more on the need for this? in particular I would like to know:
I generally trust, that default clippy-lints are pretty well tested, but non-defaults might have more false-positives, like that very first I'd really like to avoid (lastly, there seem to be a bunch of unrelated appservice-changes in here...) |
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.
Looks good, I'm not familiar with the specific lints, once you and @gnunicorn agree to a set of lints and CI is fixed feel free to merge.
That file is for configuring what lints do (e.g. which types
I just took Ruma's list and filtered out ones that clearly didn't make sense here.
Happy to remove that one again, but unless we actually see issues, why not? A few of these are also in the
So did you just review the whole-PR diff? I generally go commit-by-commit if there are meaningfully separate commits. I can move these into a separate PR though, if you prefer.
I'll remove a few again since they now seem to be active by default or have problematic false-positives, here's an overview of the rest: cloned_instead_of_copied Checks for usages of More obvious that it's a cheap copy. dbg_macro / todo Checks for leftover inefficient_to_string Checks for usage of (bypasses specialized impls from macro_use_imports Checks for mut_mut Checks for nonstandard_macro_braces Checks for uncommon brace style for well-known macro invocations (e.g. str_to_string Checks for |
04f67b6
to
997a42c
Compare
gotcha. But I wonder if the more common (and expected) way to enable them isn't over a
yes ... How would a reviewer know there are meaningful separate commits? And why would they be bundled in a single PR under an unrelated name ... I mean, they will be merged as whole, so they have to be reviewed at their last full state either way. So, yes, please, atomic commits about a single thing at a time.
Thanks for clarifying. That list sounds fine by me. I wonder how we keep that information available for the future, maybe just link this PR in the config as a comment? |
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.
please reduce the changes to the ones related to the topic and remove changes unrelated to it. Then merge at will.
Yes, this is very much a hack but it's a somewhat well-known one that you will find referenced in various issues asking about a first-class lints configuration thing to be added to cargo. I consider the alternative of manually keeping enabled lints in sync across various crate roots to be worse.
I guess you meant to say PRs? Because the commits are already atomic. |
yes, atomic PRs, of course. |
Do you want me to move the (now) first commit into its own PR too? I found it while working on the clippy stuff but it's not strictly related. |
nah, that's fine. thanks heaps. |
No description provided.