diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2413a487..44df5152 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,6 +20,11 @@ Please run the following command in order to use git hooks that are helpful for git config --local core.hooksPath .githooks ``` +## Git hooks dependencies +The pre-commit hook requires `clang-format >= 17.0.0` and `cmake-format` to be installed on your machine. +`clang-format` can be installed using `brew` on macOS and default package manager on Linux. +`cmake-format` can be installed using `pip`. + ## Git commands This sections offers a detailed look at the git commands you will need to use to get your PR submitted. Please note that there are more than one way to do this and these commands are provided for your convenience. @@ -63,8 +68,8 @@ git push --force ``` ## Use ccache (optional) -Clio uses ccache to speed up compilation. If you want to use it, please make sure it is installed on your machine. -CMake will automatically detect it and use it if it's available. +Clio uses `ccache` to speed up compilation. If you want to use it, please make sure it is installed on your machine. +CMake will automatically detect it and use it if it is available. ## Fixing issues found during code review @@ -97,7 +102,8 @@ This is a non-exhaustive list of recommended style guidelines. These are not alw ## Formatting Code must conform to `clang-format` version 17, unless the result would be unreasonably difficult to read or maintain. -To change your code to conform use `clang-format -i `. +In most cases the pre-commit hook will take care of formatting and will fix any issues automatically. +To manually format your code, use `clang-format -i ` for C++ files and `cmake-format -i ` for CMake files. ## Avoid * Proliferation of nearly identical code.