-
Notifications
You must be signed in to change notification settings - Fork 280
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
Can ignore-from-file
not error if file not found?
#611
Comments
If I understood correctly, I assume you meant This use-case is interesting, but I guess most users prefer yamllint to warn them if something from their conf file is wrong or missing. If possible, I suggest dynamically adding |
Yep, sorry that was a typo, I do mean
Completely understand why most users wouldn't want this, but I think of it akin to a missing
Hmm... Good idea. Although not sure how I'd do it in practice. |
I also think that in case of
and the only thing which would differ for individual repos would be the files we want to ignore. By default linking .yamllint would just work, even if .yamlignore doesn't exist. |
That's interesting, thanks for the feedback 👍 I'm curious about what more users think about this. |
We currently facing the same "issue" when using a dynamic lint across multiples repositories how don't have The only workaround actually are to dynamically provide a config-data with a check of file exist before as @adrienverge say before. For us ignore this error are the good practice, but we can think about a warn log when the file are not found to alert the user (or create a flag to toggle between error and no-error. Not a big fan for me but that is a personal opinion) |
In my case, I use a generic config for yamllint, it fails for some repositories which don't have those files (e.g. .gitignore) |
I'm aware this might sound like a rogue request, but I have a set of "master" pre-commit hooks where I have something like this as my
args
https://github.com/paddyroddy/.github/blob/2134df78ef3834b8af751fadc172a72ad3992d17/precommit/general/general-hooks.yml#L2-L16. However, when I use this in a repo without the.yamlignore
file, I getFileNotFoundError: [Errno 2] No such file or directory: '.yamlignore'
. Makes perfect sense, but what if I don't mind?The text was updated successfully, but these errors were encountered: