Skip to content

Commit

Permalink
check-style: Add notes on how to use the script to fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
edalm committed Jul 1, 2024
1 parent 1d03ba7 commit 70eda40
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions utils/check-style-clang-format.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,14 @@ def check_tabs_line(

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)

0 comments on commit 70eda40

Please sign in to comment.