Skip to content
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

cli: Restore ignoration of files passed as command-line arguments #658

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

adrienverge
Copy link
Owner

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:

find -name '*\.yaml' | xargs yamllint

The present commit adds unit tests for yamllint [FILES]... and yamllint --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

  1. https://github.com/adrienverge/yamllint/issues/657#issuecomment-1948009315

  2. https://github.com/adrienverge/yamllint/issues/657#issuecomment-1948093680

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]:

    find -name '*\.yaml' | xargs yamllint

The present commit adds unit tests for `yamllint [FILES]...` and
`yamllint --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)`.

[^1]: #657 (comment)
[^2]: #657 (comment)
@coveralls
Copy link

Coverage Status

coverage: 99.825% (+0.001%) from 99.824%
when pulling 4a399f6 on fix/ignore-on-explicit-file
into 3a13803 on master.

@adrienverge adrienverge merged commit 9235c68 into master Feb 16, 2024
11 of 14 checks passed
@adrienverge adrienverge deleted the fix/ignore-on-explicit-file branch February 16, 2024 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants