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.
This commit is contained in:
Rémi Verschelde 2023-12-06 13:12:18 +01:00
parent 2f73a059ce
commit 49f4860ce3
No known key found for this signature in database
GPG key ID: C3336907360768E1
4 changed files with 100 additions and 100 deletions

View file

@ -605,7 +605,6 @@ layout(std140) uniform GlobalShaderUniformData { //ubo:1
}; };
/* Material Uniforms */ /* Material Uniforms */
#ifdef MATERIAL_UNIFORMS_USED #ifdef MATERIAL_UNIFORMS_USED
/* clang-format off */ /* clang-format off */

View file

@ -1044,7 +1044,7 @@ bool ProjectConverter3To4::test_conversion(RegExContainer &reg_container) {
// get_object_of_execution // get_object_of_execution
{ {
{ String base = "var roman = kieliszek."; String base = "var roman = kieliszek.";
String expected = "kieliszek."; String expected = "kieliszek.";
String got = get_object_of_execution(base); String got = get_object_of_execution(base);
if (got != expected) { if (got != expected) {
@ -1079,7 +1079,7 @@ bool ProjectConverter3To4::test_conversion(RegExContainer &reg_container) {
} }
valid = valid && (got == expected); valid = valid && (got == expected);
} }
}
// get_starting_space // get_starting_space
{ {
String base = "\t\t\t var roman = kieliszek."; String base = "\t\t\t var roman = kieliszek.";
@ -1090,6 +1090,7 @@ bool ProjectConverter3To4::test_conversion(RegExContainer &reg_container) {
} }
valid = valid && (got == expected); valid = valid && (got == expected);
} }
// Parse Arguments // Parse Arguments
{ {
String line = "( )"; String line = "( )";

View file

@ -29,7 +29,7 @@ so they should work out of the box on Linux/macOS.
##### clang-format ##### clang-format
- Download LLVM for Windows (version 13 or later) from - Download LLVM for Windows (version 13 or later) from
<https://releases.llvm.org/download.html> <https://github.com/llvm/llvm-project/releases>
- Make sure LLVM is added to the `PATH` during installation - Make sure LLVM is added to the `PATH` during installation
##### black ##### black

View file

@ -80,7 +80,7 @@ fi
# To get consistent formatting, we recommend contributors to use the same # To get consistent formatting, we recommend contributors to use the same
# clang-format version as CI. # clang-format version as CI.
RECOMMENDED_CLANG_FORMAT_MAJOR_MIN="13" RECOMMENDED_CLANG_FORMAT_MAJOR_MIN="13"
RECOMMENDED_CLANG_FORMAT_MAJOR_MAX="15" RECOMMENDED_CLANG_FORMAT_MAJOR_MAX="16"
if [ ! -x "$CLANG_FORMAT" ] ; then if [ ! -x "$CLANG_FORMAT" ] ; then
message="Error: clang-format executable not found. Please install clang-format $RECOMMENDED_CLANG_FORMAT_MAJOR_MAX." message="Error: clang-format executable not found. Please install clang-format $RECOMMENDED_CLANG_FORMAT_MAJOR_MAX."