-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Issue #16110: similar_names not triggered by example #16300
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
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
|
No changes for 65c8e18 |
|
Given the fallout from this change it's probably better to change the example instead. cc @rust-lang/clippy |
|
@Jarcho If we do follow this route, the documentation would have to change to specify that the similar_names lint only considers variables with same length and similar characters. Note that the change is bigger than just the similar_names lint file because of the dogfood tests. If it wasn't for that, the change is minor: see my first commit. |
|
It just doesn't handle insertions at the start or end of the name. Single character insertions in the middle still trigger the lint.
That's exactly what I mean by the fallout. A large number of the new lint emissions are quite questionable. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
756c081 to
ef6d4c1
Compare
This comment has been minimized.
This comment has been minimized.
|
Hey @Jarcho , I've reverted the fix. I added some unit tests and changed the docs. Let me know if that's OK with you |
1900269 to
4faf0ad
Compare
This comment has been minimized.
This comment has been minimized.
4faf0ad to
65c8e18
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Please write a short comment explaining your change (or "none" for internal only changes)
Fixes #16110
changelog: [
similar_names] : Changed the lint docs to reflect its actual behavior