-
-
Notifications
You must be signed in to change notification settings - Fork 38
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 files or file sections? #243
Comments
Hi @kinderlars thanks for taking the time to open the issue. As far as I remember there is not yet such a functionality built into the tool, but it would be awesome to have it! |
Thanks for getting back.
Any chance that might work for multiple files as well? |
You can probably use |
Thanks to @GLeurquin you can now use |
Hey @lyz-code thanks for yamlfix! I'm also looking at using options from a config file In particular to exclude and/or include, i.e.: [tool.yamlfix]
exclude = ["path/to/dir/or/file"] It would be even better if we could pass the files from the [tool.yamlfix]
exclude_from_file = ".gitignore" Let me know if this is something that could be implemented. Thanks |
Hi @MenSeb both suggestions look good to me to be implemented. I won't have time thought to do it, but I'll review any PR in this regard :) |
How to exclude files or file sections?
Hey,
I have taken a look at the documentation for yamlfix and was not able to find anything regarding excluding files or file sections like you can do with most linting tools.
Therefore, how can I exclude an entire file via
pyproject.toml
?This sadly does not work.
[tool.yamlfix] line_length = 240 sequence_style = "keep_style" exclude = dir1/subdir/example.yml
Also is it possible to disable linting for sections of the code like you can do with yamllint?
# yamllint disable
and# yamllint enable
Thanks.
The text was updated successfully, but these errors were encountered: