Skip to content
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

[DOC] Document that clang-format version 10.0 is used. #1782

Merged
merged 2 commits into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ git submodule init
git submodule update
```

The source code is automatically formatted using clang-format.

The output can vary between versions, so make sure to install `clang-format`
version `10.0`, and have `clang-format-10` in your execution path,
so that the helper script `tools/format.sh` can find it.

Check out a new branch, make modifications and push the branch to your fork:

```sh
Expand Down
2 changes: 1 addition & 1 deletion tools/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fi
# No trailing spaces.
"${SED[@]}" 's/ \+$//' $($FIND -type f -print)

# If not overridden, try to use clang-format-8 or clang-format.
# If not overridden, try to use clang-format-10 or clang-format.
if [[ -z "$CLANG_FORMAT" ]]; then
CLANG_FORMAT=clang-format
if which clang-format-10 >/dev/null; then
Expand Down