-
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
Added a lint-fraction-readability flag to the configuration #6421
Added a lint-fraction-readability flag to the configuration #6421
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Manishearth (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
i would have
yes and yes
not sure what you mean 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.
overall looks good
The configuration was renamed to The 4th question was about the automatic suggestion if the lint gets violated for the integer part. I haven't changed the suggestion generation. This means that a number that violated the integer readability like |
Oh. Yeah that seems fine, that's what I would expect. |
@bors r+ thanks! |
📌 Commit 898b7c5 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
This adds an option to disable the
unreadable_literal
lint for floats with a longer fraction. This allows users to write0.100200300
without getting a warning. Fixes #4176I have some open questions about this PR:
lint-fraction-readability
is this a good name or should I rename it to something else?true
as this was also the previous default.unreadable_literal
lint it would otherwise also trigger theinconsistent_digit_grouping
lint. Is this also okay?1.100200300
will be unaffected by the fix function100200300.100200300
will be effected and fixed to100_200_300.100_200_300
The project needed some getting used to but I'm happy with the result. A big thank you to @flip1995 for giving me some pointers for this implementation and to everyone for the great introduction documentation!
changelog: Added the
unreadable-literal-lint-fractions
configuration to disable theunreadable_literal
lint for fractions