From d0571d8ac78f536098addac4288e5dce28f93da1 Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Thu, 17 Nov 2022 02:26:03 +0100 Subject: [PATCH] Fixes #1781 (#1782) --- CONTRIBUTING.md | 6 ++++++ tools/format.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 92815ba556..95b4e226f8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/tools/format.sh b/tools/format.sh index 6f5ae40d56..48714e9a74 100755 --- a/tools/format.sh +++ b/tools/format.sh @@ -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