Skip to content
Merged
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
8 changes: 6 additions & 2 deletions sphinx_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
Loading