cli: Restore ignoration of files passed as command-line arguments #658
+41
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Commit 2344380 "Cleanly skip broken symlinks that are ignored" fixed a problem on symbolic links but also introduced a change on how ignored files should be treated, depending on whether they're explicitely passed as command-line arguments or not 1.
This change is annoying for users that dynamically build the list of files to pass as arguments, e.g. 2:
The present commit adds unit tests for
yamllint [FILES]...
andyamllint --list-files [FILES]...
, that passed with previous version 1.34.0, and restore the behavior of this version.As a result it also reverts the API change of commit 2344380 on
yamllint.linter.run(stream, config)
.Footnotes
https://github.com/adrienverge/yamllint/issues/657#issuecomment-1948009315 ↩
https://github.com/adrienverge/yamllint/issues/657#issuecomment-1948093680 ↩