Skip to content

Commit

Permalink
fix absolute paths not considered for ignore-path-errors option (#148)
Browse files Browse the repository at this point in the history
fix absolute paths not considered for ignore-path-errors option (fixes #147)
  • Loading branch information
fmigneault committed Feb 15, 2024
1 parent e252be0 commit 84dc642
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
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
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

0 comments on commit 84dc642

Please sign in to comment.