-
Notifications
You must be signed in to change notification settings - Fork 76
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
chore: add pre-commit formatters for toml and yaml #1002
Conversation
…-commit-format-yaml * origin/pre-commit-format-yaml: style: pre-commit fixes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, we can format the YAML and the TOML. It's a big diff now, but future diffs will be smaller as a result.
Since this looks very straightforward, I'll just merge it as-is.
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks | ||
rev: v2.11.0 | ||
hooks: | ||
- id: pretty-format-toml | ||
args: [--autofix] | ||
- id: pretty-format-yaml | ||
args: [--autofix, --indent, '2', --offset, '2'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand it, this was the only change you put in by hand, and all of the YAML got formatted as a result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct.
Added pretty formatters for yaml and toml after accidentaly formatting a file in another PR. The configuration should roughly follow our conventions and it can be further tuned.
I did not run the formatter in all files in order not to pollute the contribution history, I think the pre-commit bot should do it if possible.