Hey there, I love Clippy and the wisdom of improving my old code that clippy gives me. Shows me better and more idiomatic ways to do things.
That being said I am not following Clippys lints pedanticly, because sometimes I think the motivation on the Clippy Lint site is a bit to weak, and sometimes, it just doesn't fit into the specific code that I wrote, and following Clippy would result in a larger rewrite that I am willing to do.
The first one is something that actually bugs me a bit though, that there is no real feedback on how the Clippy lints are received by the community, at least not to my knowledge, so someone can correct me here.
Would it be possible that in some way collect feedback on specific Clippy lints. Ideally on the All the Clippy Lints site. Maybe not comments or anything that advanced, but more a thumbs up/down ability for registred github users.
That way one could, when encountering a clippy lint, get a feeling for what the general conses around that specific lint really is before choosing to fix or ignore it.
I'm more inclined to say that it doesn't matter what other people think about a specific code pattern in the Rust world at large. Instead, it matters much more whether or not it's a good idea for your code base.
That said, it still might not be a bad idea to have some kind of community feedback on lints.
Yeah ofcourse my code needs to do what my code needs to do, but sometimes I disagree with a lint, and when I do, I would like to know if I am the only one, or if everyone else agrees. Then its more likely that I am not understanding the positive effects of that lint, then the lint being a bit pedantic in the case that I am alone in disliking it.
And to further my Rust knowledge, I would probably do good in maybe checking that specific issue a bit more closely.
You could share some examples so that the community can see if the clippy rule should be polished or removed.
Imho, it's almost a case-by-case rather than an absolute rejection of a rule. I agree with clippy 99.9999% of the time, and when I don't it's as simple as putting a comment to override the lint for that particular line of code.
I read a while back that someone grepped through all the crates on crates.io and looked for commonly disabled lints, and then there was a discussion about disabling (by default) the most common ones on the list. (The reasoning being that if many developers disable them, then it's a hint that most don't agree with the lint).
Here's a weird thought: On an annual basis, generate and publish this list automatically. Within the context of the results people can have a discussion/vote on default lints.
(I'm conveniently ignoring complicated things like methodology..).
I do like that idea somehow, just collecting the feedback in some way is interesting. Do you have further knowledge on the crates.io collecting methodology or where I can read more about that?
I was wrong about the data source. You can read more in the github issue Most commonly ignored lints #5418.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.