From 561a6cd503bc540a0e906b342cf74bd4ae7ef584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 6 Dec 2023 13:12:18 +0100 Subject: [PATCH] Style: Mark clang-format 16 as supported for pre-commit hook It only introduced a difference in a .glsl file, which I've worked around by removing an empty line. This keeps formatting consistent between clang-format 15 and 16. Also added a change in the 3-to-4 project converter to fix bogus formatting in clang-format < 17. (cherry picked from commit 49f4860ce3e4122e17c869229701f7d86aa6956c) --- misc/hooks/README.md | 2 +- misc/hooks/pre-commit-clang-format | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/hooks/README.md b/misc/hooks/README.md index ea94b3f5f3a..5941c435844 100644 --- a/misc/hooks/README.md +++ b/misc/hooks/README.md @@ -29,7 +29,7 @@ so they should work out of the box on Linux/macOS. ##### clang-format - Download LLVM for Windows (version 13 or later) from - + - Make sure LLVM is added to the `PATH` during installation ##### black diff --git a/misc/hooks/pre-commit-clang-format b/misc/hooks/pre-commit-clang-format index 9570d5120b6..7a1fba9d90f 100755 --- a/misc/hooks/pre-commit-clang-format +++ b/misc/hooks/pre-commit-clang-format @@ -77,7 +77,7 @@ fi # To get consistent formatting, we recommend contributors to use the same # clang-format version as CI. RECOMMENDED_CLANG_FORMAT_MAJOR_MIN="13" -RECOMMENDED_CLANG_FORMAT_MAJOR_MAX="15" +RECOMMENDED_CLANG_FORMAT_MAJOR_MAX="16" if [ ! -x "$CLANG_FORMAT" ] ; then message="Error: clang-format executable not found. Please install clang-format $RECOMMENDED_CLANG_FORMAT_MAJOR_MAX."