diff --git a/sphinx_lint.py b/sphinx_lint.py index 167cec1b4..76d1bc242 100644 --- a/sphinx_lint.py +++ b/sphinx_lint.py @@ -7,8 +7,12 @@ def store_and_count_failures(clones_dir: str, repo: str, language_code: str) -> int: failed_checks = list(chain.from_iterable(yield_failures(clones_dir, repo))) - filepath = Path(f'warnings-lint-{language_code}.txt') - filepath.write_text('\n'.join([str(c) for c in failed_checks])) + prefix = f'{Path(clones_dir, "rebased_translations", repo)}/' + log = '\n'.join( + map(lambda check: check.removeprefix(prefix), map(str, failed_checks)) + ) + filepath = Path(f'build/warnings-lint-{language_code}.txt') + filepath.write_text(log) return len(failed_checks)