summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2021-10-22 20:39:50 +0200
committerRémi Verschelde <rverschelde@gmail.com>2021-10-22 21:51:02 +0200
commit63544c3a9d4a11efde8d214a4936ae3e24e1c6c8 (patch)
tree5341d1465266d1c5ed023d027854026cc955917c /misc
parent3bebbcacdbe7922af97fd8b26ef30c19eee94ba0 (diff)
clang-format: Sync config with LLVM 13
Disable minimum amount of spaces in comment prefix for now, as it otherwise modifies the whole codebase. That's something we probably want to use as it matches our convention, but we should look into fully converting these comments to our style guide at the same time.
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/hooks/pre-commit-clang-format6
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/hooks/pre-commit-clang-format b/misc/hooks/pre-commit-clang-format
index 81bc412944..3112f1af5f 100755
--- a/misc/hooks/pre-commit-clang-format
+++ b/misc/hooks/pre-commit-clang-format
@@ -77,10 +77,10 @@ fi
# To get consistent formatting, we recommend contributors to use the same
# clang-format version as CI.
RECOMMENDED_CLANG_FORMAT_MAJOR_MIN="11"
-RECOMMENDED_CLANG_FORMAT_MAJOR_MAX="12"
+RECOMMENDED_CLANG_FORMAT_MAJOR_MAX="13"
if [ ! -x "$CLANG_FORMAT" ] ; then
- message="Error: clang-format executable not found. Please install clang-format $RECOMMENDED_CLANG_FORMAT_MAJOR.x.x."
+ message="Error: clang-format executable not found. Please install clang-format $RECOMMENDED_CLANG_FORMAT_MAJOR_MAX."
if [ ! -t 1 ] ; then
if [ -x "$ZENITY" ] ; then
@@ -108,7 +108,7 @@ CLANG_FORMAT_VERSION="$(clang-format --version | sed "s/[^0-9\.]*\([0-9\.]*\).*/
CLANG_FORMAT_MAJOR="$(echo "$CLANG_FORMAT_VERSION" | cut -d. -f1)"
if [[ "$CLANG_FORMAT_MAJOR" -lt "$RECOMMENDED_CLANG_FORMAT_MAJOR_MIN" || "$CLANG_FORMAT_MAJOR" -gt "$RECOMMENDED_CLANG_FORMAT_MAJOR_MAX" ]]; then
- echo "Warning: Your clang-format binary is the wrong version ($CLANG_FORMAT_VERSION, expected between $RECOMMENDED_CLANG_FORMAT_MAJOR_MIN.x.x and $RECOMMENDED_CLANG_FORMAT_MAJOR_MAX.x.x)."
+ echo "Warning: Your clang-format binary is the wrong version ($CLANG_FORMAT_VERSION, expected between $RECOMMENDED_CLANG_FORMAT_MAJOR_MIN and $RECOMMENDED_CLANG_FORMAT_MAJOR_MAX)."
echo " Consider upgrading or downgrading clang-format as formatting may not be applied correctly."
fi