From e9ec31ac922f07ae4ced23fc11c4097509959889 Mon Sep 17 00:00:00 2001 From: rusty-snake <41237666+rusty-snake@users.noreply.github.com> Date: Sun, 14 Feb 2021 09:02:06 +0100 Subject: sort.py: Always show the fix in a diff like format --- contrib/sort.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'contrib/sort.py') diff --git a/contrib/sort.py b/contrib/sort.py index b1f8d350c..babc0ba55 100755 --- a/contrib/sort.py +++ b/contrib/sort.py @@ -24,7 +24,6 @@ Exit-Codes: # Requirements: # python >= 3.6 -from os import getenv from sys import argv @@ -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) -- cgit v1.2.3-54-g00ecf