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

Add a .editorconfig #198

Closed
wants to merge 1 commit into from
Closed

Add a .editorconfig #198

wants to merge 1 commit into from

Conversation

multun
Copy link
Contributor

@multun multun commented Aug 16, 2020

I noticed some of the files had weird quirks:

  • white spaces at the end of lines
  • missing newline at the end of files

editorconfig is a unified config format for editors to stop fighting over tiny details like that. This configuration is pretty conservative:

  • 4 spaces because that's mostly the default for rust
  • spaces instead of tabs because editors still can't agree on how wide a tab is
  • insert a final newline because some editors will do it anyway
  • remove trailing white spaces because these serve no purpose anyway

It applies to all text files in the repository, which should bring a bit more consistency overall (these settings also don't conflict with rustfmt)

@cart
Copy link
Member

cart commented Aug 16, 2020

I think I would prefer rustfmt to be the "one true way" to format code. Adding more things to the mix just complicates the system and makes it harder to reason about. What we really need is rustfmt checks to be enabled in CI so we're always clean.

@multun
Copy link
Contributor Author

multun commented Aug 16, 2020

Good point, superseded by #201

@multun multun closed this Aug 16, 2020
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.

2 participants