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

Fix absolute paths not considered for ignore-path-errors option #148

Merged
merged 3 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,7 @@ coverage.xml
# Sphinx documentation
doc/build/
src/doc8/_version.py

# IDE caches
.idea/
.vscode/
4 changes: 4 additions & 0 deletions src/doc8/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ def validate(cfg, files, result=None):
error_counts = {}
ignoreables = frozenset(cfg.get("ignore", []))
ignore_targeted = cfg.get("ignore_path_errors", {})
ignore_targeted = {
os.path.abspath(file_path): ignore_codes
for file_path, ignore_codes in ignore_targeted.items()
}
while files:
f = files.popleft()
if cfg.get("verbose"):
Expand Down
Loading