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

FR: Add a pre-commit hook for YAML formatting #448

Open
IndrajeetPatil opened this issue Nov 10, 2022 · 2 comments
Open

FR: Add a pre-commit hook for YAML formatting #448

IndrajeetPatil opened this issue Nov 10, 2022 · 2 comments

Comments

@IndrajeetPatil
Copy link
Contributor

Creating an issue to track this, just so that we don't forget about it.

I was wondering if we should add a pre-commit hook for YAML formatting (and I remembered there weren’t any popularones at the time I checked last time) and I found the there is one by Google now and I might use it in the future (google/yamlfmt#58).

Originally posted by @lorenzwalthert in r-lib/styler#1042 (comment)

@lorenzwalthert
Copy link
Owner

Strictly speaking I would not add the hook here, because it would be hosted, but we would add it to our template file.

@lorenzwalthert
Copy link
Owner

https://github.com/google/yamlfmt requires go. I am not sure we want to add this requirement for our project. It would not affect anyone beyond the developers of {precommit} if we use it in our .pre-commit-config.yaml, only once we put it in the template that gets populared when precommit::use_precommit(), our users would have this requiremet too unless they remove it from their config file again.

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

No branches or pull requests

2 participants