To test:
- Install
pre-commitviapip install pre-commit(note that you may need to add the pip scripts folder to your PATH). - Run
pre-commit installin the source directory. This will install the clang-format git hook. - Now you can stage and commit files.
The commits should fail if the code isn't formatted properly. The formatting will be applied to fix the problem, and you will have to stage and commit those files again.