| name | format |
| description | Auto-format all C++ files with clang-format and report what changed |
format
Run clang-format across all C++ sources and report which files were modified.
Steps:
-
Record the current git status of C++ files:
git diff --name-only -- '*.cpp' '*.h' '*.hpp'
-
Run:
make format
-
Record the git status again and compute the diff to find which files were changed by
the formatter.
-
Report:
- Files reformatted (if any), one per line
- "All C++ files already formatted." if nothing changed
-
If files were reformatted, remind the user to review and stage the changes before
committing. The pre-commit hook will re-run clang-format on staged files automatically.
Do not stage or commit — leave that to the user.