From 9b907a343b6497b26970dd9120c611f8ce21e774 Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Fri, 14 Apr 2023 19:00:52 +0100 Subject: [PATCH] utils: Improve output of check-style-clang-format.py --- utils/check-style-clang-format.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/utils/check-style-clang-format.py b/utils/check-style-clang-format.py index 773ec0bad..8f6c18de1 100755 --- a/utils/check-style-clang-format.py +++ b/utils/check-style-clang-format.py @@ -396,19 +396,19 @@ def check_formatting(filenames: List[str], # Output results if not files_not_formatted: - print('All files are well formatted') + print('- All files are well formatted') return True else: n_non_formatted_files = len(files_not_formatted) if fix: - print(f'Fixed formatting of the files ({n_non_formatted_files}):') + print(f'- Fixed formatting of the files ({n_non_formatted_files}):') else: - print(f'Detected bad formatting in the files ({n_non_formatted_files}):') + print(f'- Detected bad formatting in the files ({n_non_formatted_files}):') for f in files_not_formatted: - print(f'- {f}') + print(f' - {f}') # Return True if all files were fixed return fix @@ -497,7 +497,7 @@ def check_trailing_whitespace(filenames: List[str], # Output results if not files_with_whitespace: - print('No files detected with trailing whitespace') + print('- No files detected with trailing whitespace') return True else: @@ -505,13 +505,13 @@ def check_trailing_whitespace(filenames: List[str], if fix: print( - f'Fixed trailing whitespace in the files ({n_files_with_whitespace}):') + f'- Fixed trailing whitespace in the files ({n_files_with_whitespace}):') else: print( - f'Detected trailing whitespace in the files ({n_files_with_whitespace}):') + f'- Detected trailing whitespace in the files ({n_files_with_whitespace}):') for f in files_with_whitespace: - print(f'- {f}') + print(f' - {f}') # If all files were fixed, there are no more trailing whitespace return fix @@ -588,7 +588,7 @@ def check_tabs(filenames: List[str], # Output results if not files_with_tabs: - print('No files detected with tabs') + print('- No files detected with tabs') return True else: @@ -596,13 +596,13 @@ def check_tabs(filenames: List[str], if fix: print( - f'Fixed tabs in the files ({n_files_with_tabs}):') + f'- Fixed tabs in the files ({n_files_with_tabs}):') else: print( - f'Detected tabs in the files ({n_files_with_tabs}):') + f'- Detected tabs in the files ({n_files_with_tabs}):') for f in files_with_tabs: - print(f'- {f}') + print(f' - {f}') # If all files were fixed, there are no more trailing whitespace return fix