Skip to content
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

rustfmt.toml proposal #265

Merged
merged 2 commits into from
Sep 24, 2021
Merged

rustfmt.toml proposal #265

merged 2 commits into from
Sep 24, 2021

Conversation

emilyaherbert
Copy link
Contributor

@emilyaherbert emilyaherbert commented Sep 23, 2021

I propose that we start using a rustfmt.toml file to illicit more regulated and more documented formatting requirements.

See: https://rust-lang.github.io/rustfmt/?version=v1.4.36&search=

@emilyaherbert emilyaherbert requested a review from sezna September 23, 2021 19:53
@emilyaherbert emilyaherbert self-assigned this Sep 23, 2021
@emilyaherbert emilyaherbert added the compiler General compiler. Should eventually become more specific as the issue is triaged label Sep 23, 2021
@sezna
Copy link
Contributor

sezna commented Sep 23, 2021

We have not yet had any complaints about the default settings, is there a particular formatting gripe that motivated this? It will be a hard PR to take because it will cause conflicts across the board for all of us currently working in the repository.

@emilyaherbert
Copy link
Contributor Author

Totally fair. I should have explained this more but I more wanted to demonstrate what the rustfmt.toml file does. Introducing a rustfmt.toml file allows us to regulate formatting requirements across repositories, especially if we wanted to include non-default formatting settings.

In the meantime I will revert the changes to default settings. (Although personally I like the more condensed-code settings 😄 )

Copy link
Contributor

@adlerjohn adlerjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally in favor of explicit over implicit. We can change the defaults at a later time if we want. Can you also introduce this formatting requirement (along with the file itself) into https://github.com/FuelLabs/rfcs?

rustfmt.toml Outdated Show resolved Hide resolved
@emilyaherbert
Copy link
Contributor Author

See: FuelLabs/rfcs#8

@sezna
Copy link
Contributor

sezna commented Sep 24, 2021

I agree that explicit is better than implicit, and we should start with the defaults for now for ease of adoption. If we have any gripes with the settings as they are, we can open subsequent bikeshedding issues for that.

I just checked out this branch and verified that no diffs are generated by this toml, which is confirmed by the formatting check in actions. LGTM!

@emilyaherbert emilyaherbert merged commit 0b395c7 into master Sep 24, 2021
@emilyaherbert emilyaherbert deleted the emilyaherbert/rustfmt branch September 24, 2021 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler General compiler. Should eventually become more specific as the issue is triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants