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

fmt: all #3398

Merged
merged 3 commits into from
Sep 28, 2022
Merged

fmt: all #3398

merged 3 commits into from
Sep 28, 2022

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Sep 28, 2022

Motivation

Format all files except test / big files and foundryup/install scripts.

Solution

Using same fmt settings as rustfmt.toml + rustfmt defaults (4 space indentation, 100 line length, trailing commas)

  • add a new line character at the end of all files

  • fix some schema issues with Github templates

  • capitalize all commands in dockerfile

  • fmt licenses and remove template boilerplate appendix from Apache license

Formatters used (VSC extensions):

{
    "arrowParens": "avoid",
    "bracketSameLine": true,
    "bracketSpacing": true,
    "endOfLine": "auto",
    "printWidth": 100,
    "semi": true,
    "singleQuote": false,
    "tabWidth": 4,
    "trailingComma": "es5",
    "useTabs": false
}

Missing:

  • single/double quotes fmt

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

I think this is fine.

which formatter did you use for yml?

are these tabs or whitespace?

@DaniPopes
Copy link
Member Author

which formatter did you use for yml?

redhat.vscode-yaml

are these tabs or whitespace?

4 spaces

@mattsse mattsse merged commit 860d083 into foundry-rs:master Sep 28, 2022
This was referenced Sep 28, 2022
@sambacha
Copy link
Contributor

sambacha commented Oct 5, 2022

for future reference, you can use dprint, which has support for toml even, https://dprint.dev/plugins/toml/

why use trailing commas for rustfmt but not everywhere else?

@DaniPopes
Copy link
Member Author

for future reference, you can use dprint, which has support for toml even, https://dprint.dev/plugins/toml/

I'll look into it, thanks

why use trailing commas for rustfmt but not everywhere else?

Where are they missing? JSON doesn't allow it

iFrostizz pushed a commit to iFrostizz/foundry that referenced this pull request Nov 9, 2022
* fmt: all

* fmt: rest

* fmt: missing
@DaniPopes DaniPopes deleted the fmt/all branch January 30, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants