Skip to content

Update docs for using formatting targets to make it more obvious about helper format-check and format-apply targets #723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,11 @@ $ cmake --build build --target format-apply
# Remember to review introduced changes
```

If you wish to use only `clang-format`, or `cmake-format`, or `black`, you can execute the corresponding
`clang-format-check` and `clang-format-apply` for C/C++ source files, or `cmake-format-check` and
`cmake-format-apply` for CMake files, or `black-format-check` and `black-format-apply` for Python
source files, respectively.
**NOTE**: The `format-check` and `format-apply` targets are only available if all of `clang-format`,
`cmake-format` and `black` are installed. Otherwise you can use them separately with:
- `clang-format-check` and `clang-format-apply` for C/C++ source files
- `cmake-format-check` and `cmake-format-apply` for CMake files
- `black-format-check` and `black-format-apply` for Python source files

**NOTE**: We use specific versions of formatting tools to ensure consistency across the project. The required versions are:
- clang-format version **15.0**, which can be installed with the command: `python -m pip install clang-format==15.0.7`.
Expand Down Expand Up @@ -220,4 +221,4 @@ $ ctest
$ apt install lcov
$ lcov --capture --directory . --output-file coverage.info
$ genhtml -o html_report coverage.info
```
```
Loading