Skip to content

feat(forge fmt): Adds tab support as indent char in fmt #10979

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

mathewmeconry
Copy link

Motivation

I want to start to contribute and the issue #10754 was marked as a good first issue.

Solution

Adds support for different styles in fmt config. This allows the user to configure whether tabs or spaces should be used (I don't want to start the age-old discussion here).
tab_width will be ignored by fmt if the style is set to tab.
If no style is given in foundry.toml space will be used as default.

Coverting block comments from space to tab results in issues where the previous spaces will not be ignored. I couldn't figure out a way to solve this properly but I believe it is a non-issue because most teams won't switch from spaces to tabs that often and fixing some comments is fine from my point of view.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@grandizzy
Copy link
Collaborator

thank you! looks like it breaks tests for win

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants