fix Ruff(E501)
This commit is contained in:
parent
c0e175ba23
commit
844c135fc9
1 changed files with 4 additions and 2 deletions
6
main.py
6
main.py
|
@ -18,7 +18,8 @@ def clang_format(file_path):
|
|||
|
||||
|
||||
def parse_clang_format_output(output):
|
||||
error_pattern = r"(?P<filename>.+):(?P<line_number>\d+):(?P<column_number>\d+): warning: code should be clang-formatted \[(?P<warning_message>.+)\]"
|
||||
error_pattern = r"(?P<filename>.+):(?P<line_number>\d+):(?P<column_number>\d+):" + \
|
||||
r" warning: code should be clang-formatted \[(?P<warning_message>.+)\]"
|
||||
error_matches = re.finditer(error_pattern, output)
|
||||
|
||||
if error_matches:
|
||||
|
@ -48,6 +49,7 @@ if __name__ == "__main__":
|
|||
if parsed_output:
|
||||
for error in parsed_output:
|
||||
print(
|
||||
f"Warning dans {error['filename']} à la ligne {error['line_number']}, caractère {error['column_number']} : {error['warning_message']}")
|
||||
f"Warning dans {error['filename']} à la ligne {error['line_number']}," +
|
||||
f" caractère {error['column_number']} : {error['warning_message']}")
|
||||
else:
|
||||
print("No warnings found.")
|
||||
|
|
Reference in a new issue