-
Notifications
You must be signed in to change notification settings - Fork 124
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 auto-format yaml pre-commit hook #71
Conversation
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.
lgtm. 👍 anything you'd like to add?
rev: v0.13.0 | ||
hooks: | ||
- id: yamlfmt | ||
args: [-formatter, retain_line_breaks=true] |
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.
lgtm. 👍 anything you'd like to add?
I guess not, I was trying to find an arg to retain the line breaks, glad you foundknew it!
Let me try to push a "bad" commit and see if it works.
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.
you don't need to push. after pre-commit install
it will prevent the commit locally already
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.
in case someone don't have pre-commit
installed :)
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.
Ah great, I just found the retain_line_breaks
arg here, I was looking at the wrong docs
authors
tolist[dict['name' | 'url' | ..., str]]
#70 (comment)