ignore-path-errors does not like relative paths
Howdy, I have a lot of project repos using pre-commit which usually means using doc8 for readme files, etc. Normally it works fine, however, using it with a more complex document structure using include files, it fails to selectively ignore specific errors.
Currently I'm using global ignore for D000 but that's not what I want, and I can't seem to make ignore-path-errors work at all, with either relative or absolute paths. Things I tried:
- moved config from pyproject.toml to tox.ini file
- made sure pre-commit config only uses --config arg
- set pre-commit version to latest doc8 hash on master
In this case, the doc repo belongs to a customer so I can't share it, but the doc tree was derived from this template which probably doesn't help much beyond "this is the basic project workflow".
AFAICT there is not any explicit support for link checking across document files? (that is a question) So the alternative for me is a working ignore-path-errors feature. Thanks!
I pushed this update fixing ignore-path-errors some time ago
- https://github.com/PyCQA/doc8/pull/148
I'm also using many cross-file reference in my projects, and doc8 does not complain in my case.
However, I'm using setup.cfg.
I think the error must be caused by pyproject.toml parsing.
There are similar issues about it failing to parse #145.
I have issues using ignore-path-errors with relative path too, which appear to be caused by https://github.com/PyCQA/doc8/pull/148.
Inside the validate() function, doc8 fails to match the file because ignore_targeted is an absolute path and f.filename is a relative path.
Related to #188 and #168
should be fixed by #176