Skip to content

Commit

Permalink
sort.py: Always show the fix in a diff like format
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty-snake committed Feb 14, 2021
1 parent a203caa commit e9ec31a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions contrib/sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

# Requirements:
# python >= 3.6
from os import getenv
from sys import argv


Expand Down Expand Up @@ -96,8 +95,10 @@ def fix_profile(filename):
fixed_line = line
if fixed_line != line:
was_fixed = True
if getenv("CI"):
print(f"{filename}:{lineno + 1}:{fixed_line}")
print(
f"{filename}:{lineno + 1}:-{line}\n"
f"{filename}:{lineno + 1}:+{fixed_line}"
)
fixed_profile.append(fixed_line)
if was_fixed:
profile.seek(0)
Expand Down

0 comments on commit e9ec31a

Please sign in to comment.