CI: Bump `clang-format` and `clang-tidy` versions

• clang-format: 20.1.0 → 21.1.7
• clang-tidy: 20.1.0 → 21.1.6
• `.clang-format`: 17.0.6 → 18.1.8 (keep 3 versions behind latest for compatibility)
This commit is contained in:
Thaddeus Crews 2025-09-27 10:28:44 -05:00
parent 08e6cd181f
commit ef0dd99a37
No known key found for this signature in database
GPG Key ID: 8C6E5FEB5FC03CCC
5 changed files with 30 additions and 20 deletions

View File

@ -1,6 +1,6 @@
# Commented out parameters are those with the same value as base LLVM style.
# We can uncomment them if we want to change their value, or enforce the
# chosen value in case the base style changes (last sync: Clang 17.0.6).
# chosen value in case the base style changes (last sync: Clang 18.1.8).
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
@ -10,24 +10,28 @@ AlignAfterOpenBracket: DontAlign
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: true
# AlignConsecutiveBitFields:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveDeclarations:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveMacros:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveShortCaseStatements:
# Enabled: false
@ -41,8 +45,10 @@ AlignTrailingComments:
OverEmptyLines: 0
# AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
# AllowBreakBeforeNoexceptSpecifier: Never
# AllowShortBlocksOnASingleLine: Never
# AllowShortCaseLabelsOnASingleLine: false
# AllowShortCompoundRequirementOnASingleLine: true
# AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Inline
# AllowShortIfStatementsOnASingleLine: Never
@ -78,7 +84,8 @@ AttributeMacros:
# SplitEmptyFunction: true
# SplitEmptyRecord: true
# SplitEmptyNamespace: true
# BreakAfterAttributes: Never
# BreakAdjacentStringLiterals: true
# BreakAfterAttributes: Leave
# BreakAfterJavaFieldAnnotations: false
# BreakArrays: true
# BreakBeforeBinaryOperators: None
@ -167,6 +174,7 @@ PackConstructorInitializers: NextLine
# PenaltyBreakComment: 300
# PenaltyBreakFirstLessLess: 120
# PenaltyBreakOpenParenthesis: 0
# PenaltyBreakScopeResolution: 500
# PenaltyBreakString: 1000
# PenaltyBreakTemplateDeclaration: 10
# PenaltyExcessCharacter: 1000000
@ -183,6 +191,7 @@ RemoveSemicolon: true
# RequiresExpressionIndentation: OuterScope
# SeparateDefinitionBlocks: Leave
# ShortNamespaceLines: 1
# SkipMacroDefinitionBody: false
# SortIncludes: CaseSensitive
# SortJavaStaticImport: Before
# SortUsingDeclarations: LexicographicNumeric
@ -204,6 +213,7 @@ RemoveSemicolon: true
# AfterFunctionDefinitionName: false
# AfterIfMacros: true
# AfterOverloadedOperator: false
# AfterPlacementOperator: true
# AfterRequiresInClause: false
# AfterRequiresInExpression: false
# BeforeNonEmptyParentheses: false

View File

@ -11,7 +11,7 @@ exclude: |
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v20.1.0
rev: v21.1.7
hooks:
- id: clang-format
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java)$
@ -29,7 +29,7 @@ repos:
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java|glsl)$
args: [--fix, --quiet, --use-color]
types_or: [text]
additional_dependencies: [clang-tidy==20.1.0]
additional_dependencies: [clang-tidy==21.1.6]
require_serial: true
stages: [manual] # Not automatically triggered, invoked via `pre-commit run --hook-stage manual clang-tidy`

View File

@ -102,7 +102,7 @@ void DebugEffects::_create_frustum_arrays() {
2, 6, 4, // FRT, NRT, NLT
// Bottom
5, 7, 1, // NLB, NRB, FLB,
7, 3, 1, // NRB, FRB, FLB
7, 3, 1 // NRB, FRB, FLB
};
// Create our index_array
@ -136,7 +136,7 @@ void DebugEffects::_create_frustum_arrays() {
0, 4, // FLT - NLT
1, 5, // FLB - NLB
2, 6, // FRT - NRT
3, 7, // FRB - NRB
3, 7 // FRB - NRB
};
// Create our lines_array

View File

@ -932,11 +932,11 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
// LSM_FP_NEAR
{
// LSM_FP_NEAR
PT_NEAR_LEFT_TOP, PT_NEAR_RIGHT_TOP, // Invalid combination.
PT_NEAR_LEFT_TOP, PT_NEAR_RIGHT_TOP // Invalid combination.
},
{
// LSM_FP_FAR
PT_FAR_RIGHT_TOP, PT_FAR_LEFT_TOP, // Invalid combination.
PT_FAR_RIGHT_TOP, PT_FAR_LEFT_TOP // Invalid combination.
},
{
// LSM_FP_LEFT
@ -964,11 +964,11 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
// LSM_FP_FAR
{
// LSM_FP_NEAR
PT_FAR_LEFT_TOP, PT_FAR_RIGHT_TOP, // Invalid combination.
PT_FAR_LEFT_TOP, PT_FAR_RIGHT_TOP // Invalid combination.
},
{
// LSM_FP_FAR
PT_FAR_RIGHT_TOP, PT_FAR_LEFT_TOP, // Invalid combination.
PT_FAR_RIGHT_TOP, PT_FAR_LEFT_TOP // Invalid combination.
},
{
// LSM_FP_LEFT
@ -1006,7 +1006,7 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
},
{
// LSM_FP_LEFT
PT_FAR_LEFT_BOTTOM, PT_FAR_LEFT_BOTTOM, // Invalid combination.
PT_FAR_LEFT_BOTTOM, PT_FAR_LEFT_BOTTOM // Invalid combination.
},
{
// LSM_FP_TOP
@ -1015,7 +1015,7 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
},
{
// LSM_FP_RIGHT
PT_FAR_LEFT_BOTTOM, PT_FAR_LEFT_BOTTOM, // Invalid combination.
PT_FAR_LEFT_BOTTOM, PT_FAR_LEFT_BOTTOM // Invalid combination.
},
{
// LSM_FP_BOTTOM
@ -1043,7 +1043,7 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
},
{
// LSM_FP_TOP
PT_NEAR_LEFT_TOP, PT_FAR_LEFT_TOP, // Invalid combination.
PT_NEAR_LEFT_TOP, PT_FAR_LEFT_TOP // Invalid combination.
},
{
// LSM_FP_RIGHT
@ -1052,7 +1052,7 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
},
{
// LSM_FP_BOTTOM
PT_FAR_LEFT_BOTTOM, PT_NEAR_LEFT_BOTTOM, // Invalid combination.
PT_FAR_LEFT_BOTTOM, PT_NEAR_LEFT_BOTTOM // Invalid combination.
},
},
@ -1070,7 +1070,7 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
},
{
// LSM_FP_LEFT
PT_FAR_RIGHT_BOTTOM, PT_FAR_RIGHT_BOTTOM, // Invalid combination.
PT_FAR_RIGHT_BOTTOM, PT_FAR_RIGHT_BOTTOM // Invalid combination.
},
{
// LSM_FP_TOP
@ -1079,7 +1079,7 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
},
{
// LSM_FP_RIGHT
PT_FAR_RIGHT_BOTTOM, PT_FAR_RIGHT_BOTTOM, // Invalid combination.
PT_FAR_RIGHT_BOTTOM, PT_FAR_RIGHT_BOTTOM // Invalid combination.
},
{
// LSM_FP_BOTTOM
@ -1116,7 +1116,7 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
},
{
// LSM_FP_TOP
PT_NEAR_LEFT_BOTTOM, PT_FAR_LEFT_BOTTOM, // Invalid combination.
PT_NEAR_LEFT_BOTTOM, PT_FAR_LEFT_BOTTOM // Invalid combination.
},
{
// LSM_FP_RIGHT
@ -1125,7 +1125,7 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
},
{
// LSM_FP_BOTTOM
PT_FAR_LEFT_BOTTOM, PT_NEAR_LEFT_BOTTOM, // Invalid combination.
PT_FAR_LEFT_BOTTOM, PT_NEAR_LEFT_BOTTOM // Invalid combination.
},
},

View File

@ -394,7 +394,7 @@ TEST_CASE("[Marshalls] Typed array decoding") {
0x02, 0x00, 0x00, 0x00, // Array type (Variant::INT).
0x01, 0x00, 0x00, 0x00, // Array size.
0x02, 0x00, 0x01, 0x00, // Element type (Variant::INT, HEADER_DATA_FLAG_64).
0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0xf1, // Element value.
0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0xf1 // Element value.
};
CHECK(decode_variant(variant, buffer, 24, &r_len) == OK);
@ -475,7 +475,7 @@ TEST_CASE("[Marshalls] Typed dictionary decoding") {
0x02, 0x00, 0x01, 0x00, // Key type (Variant::INT, HEADER_DATA_FLAG_64).
0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0xf1, // Key value.
0x02, 0x00, 0x01, 0x00, // Value type (Variant::INT, HEADER_DATA_FLAG_64).
0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0xf1, // Value value.
0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0xf1 // Value value.
};
CHECK(decode_variant(variant, buffer, 40, &r_len) == OK);