Skip to content

Commit 84dc642

Browse files
authored
fix absolute paths not considered for ignore-path-errors option (#148)
fix absolute paths not considered for ignore-path-errors option (fixes #147)
1 parent e252be0 commit 84dc642

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,7 @@ coverage.xml
5252
# Sphinx documentation
5353
doc/build/
5454
src/doc8/_version.py
55+
56+
# IDE caches
57+
.idea/
58+
.vscode/

src/doc8/main.py

+4
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ def validate(cfg, files, result=None):
230230
error_counts = {}
231231
ignoreables = frozenset(cfg.get("ignore", []))
232232
ignore_targeted = cfg.get("ignore_path_errors", {})
233+
ignore_targeted = {
234+
os.path.abspath(file_path): ignore_codes
235+
for file_path, ignore_codes in ignore_targeted.items()
236+
}
233237
while files:
234238
f = files.popleft()
235239
if cfg.get("verbose"):

0 commit comments

Comments
 (0)