From 70eda40b475c5270666675e81e8d71739579a753 Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Mon, 1 Jul 2024 15:21:38 +0100 Subject: [PATCH] check-style: Add notes on how to use the script to fix formatting --- utils/check-style-clang-format.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/utils/check-style-clang-format.py b/utils/check-style-clang-format.py index 6828352ce..602effe22 100755 --- a/utils/check-style-clang-format.py +++ b/utils/check-style-clang-format.py @@ -775,7 +775,14 @@ if __name__ == "__main__": if not all_checks_successful: if args.verbose: - print("") - print('NOTE: To fix the files automatically, run this script with the flag "--fix"') + print( + "", + "Notes to fix the above formatting issues:", + ' - To fix the formatting of specific files, run this script with the flag "--fix":', + " $ ./utils/check-style-clang-format.py --fix path [path ...]", + " - To fix the formatting of all files modified by this branch, run this script in the following way:", + " $ git diff --name-only master | xargs ./utils/check-style-clang-format.py --fix", + sep="\n", + ) sys.exit(1)