-
Notifications
You must be signed in to change notification settings - Fork 158
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
Create a rustfmt.toml definition #456
Comments
If we will be defining out own rustfmt rules, maybe we could also consider setting the following parameters:
|
I think this is a good idea. I'm fine with all of the parameters suggested by @bobbinth, since the style of the codebase was set by his initial work anyway. I guess the main downside with straying from the defaults is that people will get more failures when opening PRs, including new contributors We could also consider turning on doc comment formatting.
This would also enforce the max width of 100 that we use. It's currently unstable, but that's because it panics on empty code blocks in comments (rust-lang/rustfmt#5234) |
My suggestions are max_width condense_wildcard_suffixes enum_discrim_align_threshold fn_single_line format_code_in_doc_comments format_macro_matchers format_strings hex_literal_case imports_granularity newline_style normalize_doc_attributes reorder_impl_items group_imports tab_spaces use_field_init_shorthand use_try_shorthand wrap_comments |
Thank you! Agree with pretty much everything. The only two exceptions it that I would keep the following settings as follows:
|
@bobbinth sounds good! The change is simple in nature but will break all ongoing PRs since it will cause merge conflicts everywhere. Should we do it now or wait for the conclusion of 0.4? |
Closed by #594 |
Consider standardizing the rustfmt definitions so we have a consistent style across the project
This will also halt the CI when there is something out of style so we automatize this review
Originally posted by @bobbinth in #450 (comment)
The text was updated successfully, but these errors were encountered: