Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[WIP] Add getter prefix name lint #3616
Add a lint to detect getter methods prefixed with
The basic lint is implemented in this pull request, but there are still a couple things I'd like to add/finalize before I feel this is ready to merge. I wanted to open a pull request as soon as possible to collect and start incorporating feedback though, so this is currently a WIP.
Since this is my first contribution to Clippy, I would really appreciate your feedback! I found the
I also have a few specific items I would appreciate some guidance on:
The current WIP looks good, so I'll just answer your questions.
With 5+6 answered, this lint won't trigger on
Hey @flip1995 thanks for the ping, I lost track of this with the start of the new year. I should have more time to revisit this at the end of the week.
As for 1/5/6 that's interesting! I was just running through on the basis of the function names (
Maybe I've misunderstood, but aren't associated functions the ones in the
I probably haven't implemented it to look at Trait
I'll need to verify if it lints Trait definitions, and add some more test cases to document that behaviour along with updating the doc comment.
@oli-obk any opinions on that, as you created the original issue?
Sure! With Trait impls I mean thinks like
The author of the crate which includes the Trait has influence on the names of the function names. So the Trait definition (
TL;DR: Lint on