-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Add a pre-commit hook that automatically runs clang-format on the files changed in a commit, ensuring consistent C/C++ code formatting before code is pushed.
Proposed solution
Introduce pre-commit configuration (e.g., .pre-commit-config.yaml) in the repository.
- Add a hook that runs
clang-formatonly on staged/changed files (C/C++ sources and headers, e.g. *.c, *.cc, *.cpp, *.cxx, *.h, *.hpp, *.hxx). - Ensure the hook uses the project’s .clang-format file.
- Document setup in README.md (e.g.,
pip install pre-commit && pre-commit install) and how to run manually (e.g.,pre-commit run -a).
Additional context
We could also consider extending pre-commit with flake8 and Python formatter.
mfaferek93mfaferek93
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request