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

ignore-path-errors does not like relative paths #162

Open
sarnold opened this issue Aug 30, 2024 · 2 comments
Open

ignore-path-errors does not like relative paths #162

sarnold opened this issue Aug 30, 2024 · 2 comments

Comments

@sarnold
Copy link

sarnold commented Aug 30, 2024

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!

@fmigneault
Copy link
Contributor

I pushed this update fixing ignore-path-errors some time ago

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.

@priteau
Copy link

priteau commented Nov 18, 2024

I have issues using ignore-path-errors with relative path too, which appear to be caused by #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.

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

No branches or pull requests

3 participants