-
Notifications
You must be signed in to change notification settings - Fork 28
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
How to exclude certain files from yamlfmt? #34
Comments
+1, I have run into the same issue. I have some templates with HELM blocks inside files with yaml extension
|
Seems it should be done using pre-commit level: - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.1
hooks:
- id: yamlfmt
args: [--mapping, '2', --sequence, '2', --offset, '0']
exclude: ^charts/ |
'exclude' is a regex, so if you want to exclude multiple files, it should be something like this:
|
Is it possible to include a configuration file? - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.1 # or other specific tag
hooks:
- args:
- -c
- .github/linters/.yamlfmt
id: yamlfmt |
houseful-chisel
pushed a commit
to chizmw/gh-action-sandbox
that referenced
this issue
Nov 23, 2022
it's generated, and life's too short to fix their output jumanjihouse/pre-commit-hook-yamlfmt#34 (comment)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My review build runs
pre-commit run --all-files
. I have some jinja templates that end with extension.yaml
. Is there a way to exclude certain files from yamlfmt?I know I can add an
exclude
to.pre-commit-config.yaml
and change the template's extension. Is there a way to configure yamlfmt itself though?The text was updated successfully, but these errors were encountered: