Skip to content

Commit

Permalink
remove duplicated file name in tidy comment (#64)
Browse files Browse the repository at this point in the history
* remove duplicated file name in tidy comment
  resolves #63
  Technically, this fixes an undesired behavior introduced in #49.
* use MD bold syntax when not using raw HTML syntax
  • Loading branch information
2bndy5 committed Feb 10, 2024
1 parent 788596b commit 134c898
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions cpp_linter/rest_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,10 @@ def make_comment(
for file_obj, concern in zip(files, tidy_advice):
for note in concern.notes:
if file_obj.name == note.filename:
tidy_comment += f"- {file_obj.name}\n\n"
tidy_comment += (
" <strong>{filename}:{line}:{cols}:</strong> ".format(
filename=file_obj.name,
line=note.line,
cols=note.cols,
)
tidy_comment += "- **{filename}:{line}:{cols}:** ".format(
filename=file_obj.name,
line=note.line,
cols=note.cols,
)
tidy_comment += (
"{severity}: [{diagnostic}]\n > {rationale}\n".format(
Expand Down

0 comments on commit 134c898

Please sign in to comment.