Closed adrienverge closed 5 months ago
Hello @andrewimeson, this change is related to https://github.com/adrienverge/yamllint/pull/524#discussion_r1061698032 and https://github.com/adrienverge/yamllint/pull/524#discussion_r1052261762. After reading the code, I think it's a good change, i.e. yamllint.linter.run(stream, config)
should lint the YAML input it is given (independently of the filename), and the filter for ignored files should be done upstream. But if you think differently don't hesitate to say so :)
Before this commit, yamllint would output "[Errno 2] No such file or directory" when running on a directory which contained a broken symbolic link, even if the file is set to be ignored in yamllint configuration.
This commit fixes that, and adds corresponding tests.
As a side effect this changes
yamllint.linter.run(stream, config)
, so tools that would use this API need to filter ignored files beforehand.Fixes https://github.com/adrienverge/yamllint/issues/399