mirror of https://github.com/godotengine/godot
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:
parent
08e6cd181f
commit
ef0dd99a37
|
|
@ -1,6 +1,6 @@
|
||||||
# Commented out parameters are those with the same value as base LLVM style.
|
# 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
|
# 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
|
BasedOnStyle: LLVM
|
||||||
AccessModifierOffset: -4
|
AccessModifierOffset: -4
|
||||||
AlignAfterOpenBracket: DontAlign
|
AlignAfterOpenBracket: DontAlign
|
||||||
|
|
@ -10,24 +10,28 @@ AlignAfterOpenBracket: DontAlign
|
||||||
# AcrossEmptyLines: false
|
# AcrossEmptyLines: false
|
||||||
# AcrossComments: false
|
# AcrossComments: false
|
||||||
# AlignCompound: false
|
# AlignCompound: false
|
||||||
|
# AlignFunctionPointers: false
|
||||||
# PadOperators: true
|
# PadOperators: true
|
||||||
# AlignConsecutiveBitFields:
|
# AlignConsecutiveBitFields:
|
||||||
# Enabled: false
|
# Enabled: false
|
||||||
# AcrossEmptyLines: false
|
# AcrossEmptyLines: false
|
||||||
# AcrossComments: false
|
# AcrossComments: false
|
||||||
# AlignCompound: false
|
# AlignCompound: false
|
||||||
|
# AlignFunctionPointers: false
|
||||||
# PadOperators: false
|
# PadOperators: false
|
||||||
# AlignConsecutiveDeclarations:
|
# AlignConsecutiveDeclarations:
|
||||||
# Enabled: false
|
# Enabled: false
|
||||||
# AcrossEmptyLines: false
|
# AcrossEmptyLines: false
|
||||||
# AcrossComments: false
|
# AcrossComments: false
|
||||||
# AlignCompound: false
|
# AlignCompound: false
|
||||||
|
# AlignFunctionPointers: false
|
||||||
# PadOperators: false
|
# PadOperators: false
|
||||||
# AlignConsecutiveMacros:
|
# AlignConsecutiveMacros:
|
||||||
# Enabled: false
|
# Enabled: false
|
||||||
# AcrossEmptyLines: false
|
# AcrossEmptyLines: false
|
||||||
# AcrossComments: false
|
# AcrossComments: false
|
||||||
# AlignCompound: false
|
# AlignCompound: false
|
||||||
|
# AlignFunctionPointers: false
|
||||||
# PadOperators: false
|
# PadOperators: false
|
||||||
# AlignConsecutiveShortCaseStatements:
|
# AlignConsecutiveShortCaseStatements:
|
||||||
# Enabled: false
|
# Enabled: false
|
||||||
|
|
@ -41,8 +45,10 @@ AlignTrailingComments:
|
||||||
OverEmptyLines: 0
|
OverEmptyLines: 0
|
||||||
# AllowAllArgumentsOnNextLine: true
|
# AllowAllArgumentsOnNextLine: true
|
||||||
AllowAllParametersOfDeclarationOnNextLine: false
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
|
# AllowBreakBeforeNoexceptSpecifier: Never
|
||||||
# AllowShortBlocksOnASingleLine: Never
|
# AllowShortBlocksOnASingleLine: Never
|
||||||
# AllowShortCaseLabelsOnASingleLine: false
|
# AllowShortCaseLabelsOnASingleLine: false
|
||||||
|
# AllowShortCompoundRequirementOnASingleLine: true
|
||||||
# AllowShortEnumsOnASingleLine: true
|
# AllowShortEnumsOnASingleLine: true
|
||||||
AllowShortFunctionsOnASingleLine: Inline
|
AllowShortFunctionsOnASingleLine: Inline
|
||||||
# AllowShortIfStatementsOnASingleLine: Never
|
# AllowShortIfStatementsOnASingleLine: Never
|
||||||
|
|
@ -78,7 +84,8 @@ AttributeMacros:
|
||||||
# SplitEmptyFunction: true
|
# SplitEmptyFunction: true
|
||||||
# SplitEmptyRecord: true
|
# SplitEmptyRecord: true
|
||||||
# SplitEmptyNamespace: true
|
# SplitEmptyNamespace: true
|
||||||
# BreakAfterAttributes: Never
|
# BreakAdjacentStringLiterals: true
|
||||||
|
# BreakAfterAttributes: Leave
|
||||||
# BreakAfterJavaFieldAnnotations: false
|
# BreakAfterJavaFieldAnnotations: false
|
||||||
# BreakArrays: true
|
# BreakArrays: true
|
||||||
# BreakBeforeBinaryOperators: None
|
# BreakBeforeBinaryOperators: None
|
||||||
|
|
@ -167,6 +174,7 @@ PackConstructorInitializers: NextLine
|
||||||
# PenaltyBreakComment: 300
|
# PenaltyBreakComment: 300
|
||||||
# PenaltyBreakFirstLessLess: 120
|
# PenaltyBreakFirstLessLess: 120
|
||||||
# PenaltyBreakOpenParenthesis: 0
|
# PenaltyBreakOpenParenthesis: 0
|
||||||
|
# PenaltyBreakScopeResolution: 500
|
||||||
# PenaltyBreakString: 1000
|
# PenaltyBreakString: 1000
|
||||||
# PenaltyBreakTemplateDeclaration: 10
|
# PenaltyBreakTemplateDeclaration: 10
|
||||||
# PenaltyExcessCharacter: 1000000
|
# PenaltyExcessCharacter: 1000000
|
||||||
|
|
@ -183,6 +191,7 @@ RemoveSemicolon: true
|
||||||
# RequiresExpressionIndentation: OuterScope
|
# RequiresExpressionIndentation: OuterScope
|
||||||
# SeparateDefinitionBlocks: Leave
|
# SeparateDefinitionBlocks: Leave
|
||||||
# ShortNamespaceLines: 1
|
# ShortNamespaceLines: 1
|
||||||
|
# SkipMacroDefinitionBody: false
|
||||||
# SortIncludes: CaseSensitive
|
# SortIncludes: CaseSensitive
|
||||||
# SortJavaStaticImport: Before
|
# SortJavaStaticImport: Before
|
||||||
# SortUsingDeclarations: LexicographicNumeric
|
# SortUsingDeclarations: LexicographicNumeric
|
||||||
|
|
@ -204,6 +213,7 @@ RemoveSemicolon: true
|
||||||
# AfterFunctionDefinitionName: false
|
# AfterFunctionDefinitionName: false
|
||||||
# AfterIfMacros: true
|
# AfterIfMacros: true
|
||||||
# AfterOverloadedOperator: false
|
# AfterOverloadedOperator: false
|
||||||
|
# AfterPlacementOperator: true
|
||||||
# AfterRequiresInClause: false
|
# AfterRequiresInClause: false
|
||||||
# AfterRequiresInExpression: false
|
# AfterRequiresInExpression: false
|
||||||
# BeforeNonEmptyParentheses: false
|
# BeforeNonEmptyParentheses: false
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ exclude: |
|
||||||
|
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||||
rev: v20.1.0
|
rev: v21.1.7
|
||||||
hooks:
|
hooks:
|
||||||
- id: clang-format
|
- id: clang-format
|
||||||
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java)$
|
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)$
|
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java|glsl)$
|
||||||
args: [--fix, --quiet, --use-color]
|
args: [--fix, --quiet, --use-color]
|
||||||
types_or: [text]
|
types_or: [text]
|
||||||
additional_dependencies: [clang-tidy==20.1.0]
|
additional_dependencies: [clang-tidy==21.1.6]
|
||||||
require_serial: true
|
require_serial: true
|
||||||
stages: [manual] # Not automatically triggered, invoked via `pre-commit run --hook-stage manual clang-tidy`
|
stages: [manual] # Not automatically triggered, invoked via `pre-commit run --hook-stage manual clang-tidy`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ void DebugEffects::_create_frustum_arrays() {
|
||||||
2, 6, 4, // FRT, NRT, NLT
|
2, 6, 4, // FRT, NRT, NLT
|
||||||
// Bottom
|
// Bottom
|
||||||
5, 7, 1, // NLB, NRB, FLB,
|
5, 7, 1, // NLB, NRB, FLB,
|
||||||
7, 3, 1, // NRB, FRB, FLB
|
7, 3, 1 // NRB, FRB, FLB
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create our index_array
|
// Create our index_array
|
||||||
|
|
@ -136,7 +136,7 @@ void DebugEffects::_create_frustum_arrays() {
|
||||||
0, 4, // FLT - NLT
|
0, 4, // FLT - NLT
|
||||||
1, 5, // FLB - NLB
|
1, 5, // FLB - NLB
|
||||||
2, 6, // FRT - NRT
|
2, 6, // FRT - NRT
|
||||||
3, 7, // FRB - NRB
|
3, 7 // FRB - NRB
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create our lines_array
|
// Create our lines_array
|
||||||
|
|
|
||||||
|
|
@ -932,11 +932,11 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
|
||||||
// LSM_FP_NEAR
|
// LSM_FP_NEAR
|
||||||
{
|
{
|
||||||
// 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
|
// 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
|
// LSM_FP_LEFT
|
||||||
|
|
@ -964,11 +964,11 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
|
||||||
// LSM_FP_FAR
|
// LSM_FP_FAR
|
||||||
{
|
{
|
||||||
// LSM_FP_NEAR
|
// 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
|
// 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
|
// LSM_FP_LEFT
|
||||||
|
|
@ -1006,7 +1006,7 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// LSM_FP_LEFT
|
// 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
|
// LSM_FP_TOP
|
||||||
|
|
@ -1015,7 +1015,7 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// LSM_FP_RIGHT
|
// 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
|
// LSM_FP_BOTTOM
|
||||||
|
|
@ -1043,7 +1043,7 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// LSM_FP_TOP
|
// 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
|
// LSM_FP_RIGHT
|
||||||
|
|
@ -1052,7 +1052,7 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// LSM_FP_BOTTOM
|
// 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
|
// 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
|
// LSM_FP_TOP
|
||||||
|
|
@ -1079,7 +1079,7 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// LSM_FP_RIGHT
|
// 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
|
// LSM_FP_BOTTOM
|
||||||
|
|
@ -1116,7 +1116,7 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// LSM_FP_TOP
|
// 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
|
// LSM_FP_RIGHT
|
||||||
|
|
@ -1125,7 +1125,7 @@ void RenderingLightCuller::get_corners_of_planes(PlaneOrder p_plane_a, PlaneOrde
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// LSM_FP_BOTTOM
|
// LSM_FP_BOTTOM
|
||||||
PT_FAR_LEFT_BOTTOM, PT_NEAR_LEFT_BOTTOM, // Invalid combination.
|
PT_FAR_LEFT_BOTTOM, PT_NEAR_LEFT_BOTTOM // Invalid combination.
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -394,7 +394,7 @@ TEST_CASE("[Marshalls] Typed array decoding") {
|
||||||
0x02, 0x00, 0x00, 0x00, // Array type (Variant::INT).
|
0x02, 0x00, 0x00, 0x00, // Array type (Variant::INT).
|
||||||
0x01, 0x00, 0x00, 0x00, // Array size.
|
0x01, 0x00, 0x00, 0x00, // Array size.
|
||||||
0x02, 0x00, 0x01, 0x00, // Element type (Variant::INT, HEADER_DATA_FLAG_64).
|
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);
|
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).
|
0x02, 0x00, 0x01, 0x00, // Key type (Variant::INT, HEADER_DATA_FLAG_64).
|
||||||
0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0xf1, // Key value.
|
0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0xf1, // Key value.
|
||||||
0x02, 0x00, 0x01, 0x00, // Value type (Variant::INT, HEADER_DATA_FLAG_64).
|
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);
|
CHECK(decode_variant(variant, buffer, 40, &r_len) == OK);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue