adrienverge / yamllint

A linter for YAML files.
GNU General Public License v3.0
2.79k stars 265 forks source link

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

Closed adrienverge closed 5 months ago

adrienverge commented 5 months ago

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).

coveralls commented 5 months ago

Coverage Status

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