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

ensure diff paths are the same on all platforms #130

Merged
merged 1 commit into from
Jul 4, 2024
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
4 changes: 2 additions & 2 deletions post/clang_tidy_review/clang_tidy_review/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ def format_diff_line(diagnostic, offset_lookup, source_line, line_offset, line_n
new_line = whitespace.join([f"+ {line}" for line in new_line.splitlines()])
old_line = whitespace.join([f"- {line}" for line in old_line.splitlines()])

rel_path = try_relative(replacement_set[0]["FilePath"])
rel_path = try_relative(replacement_set[0]["FilePath"]).as_posix()
code_blocks += textwrap.dedent(
f"""\

Expand Down Expand Up @@ -692,7 +692,7 @@ def format_notes(notes, offset_lookup):
)

path = try_relative(resolved_path)
message = f"**{path}:{line_num}:** {note['Message']}"
message = f"**{path.as_posix()}:{line_num}:** {note['Message']}"
code = format_ordinary_line(source_line, line_offset)
code_blocks += f"{message}\n{code}"

Expand Down
Loading