1+ # If you change this file, please format all files of the codebase as part of your PR:
2+ # prek run clang-format --all
3+
14# Commented out parameters are those with the same value as base LLVM style.
25# We can uncomment them if we want to change their value, or enforce the
3- # chosen value in case the base style changes (last sync: Clang 17.0.6 ).
6+ # chosen value in case the base style changes (last sync: Clang 18.1.8 ).
47BasedOnStyle : LLVM
58AccessModifierOffset : -4
69AlignAfterOpenBracket : DontAlign
@@ -10,39 +13,45 @@ AlignAfterOpenBracket: DontAlign
1013# AcrossEmptyLines: false
1114# AcrossComments: false
1215# AlignCompound: false
16+ # AlignFunctionPointers: false
1317# PadOperators: true
1418# AlignConsecutiveBitFields:
1519# Enabled: false
1620# AcrossEmptyLines: false
1721# AcrossComments: false
1822# AlignCompound: false
23+ # AlignFunctionPointers: false
1924# PadOperators: false
2025# AlignConsecutiveDeclarations:
2126# Enabled: false
2227# AcrossEmptyLines: false
2328# AcrossComments: false
2429# AlignCompound: false
30+ # AlignFunctionPointers: false
2531# PadOperators: false
2632# AlignConsecutiveMacros:
2733# Enabled: false
2834# AcrossEmptyLines: false
2935# AcrossComments: false
3036# AlignCompound: false
37+ # AlignFunctionPointers: false
3138# PadOperators: false
3239# AlignConsecutiveShortCaseStatements:
3340# Enabled: false
3441# AcrossEmptyLines: false
3542# AcrossComments: false
3643# AlignCaseColons: false
37- # AlignEscapedNewlines: Right
44+ AlignEscapedNewlines : DontAlign # Aligning leads to long diffs
3845AlignOperands : DontAlign
3946AlignTrailingComments :
4047 Kind : Never
4148 OverEmptyLines : 0
4249# AllowAllArgumentsOnNextLine: true
4350AllowAllParametersOfDeclarationOnNextLine : false
51+ # AllowBreakBeforeNoexceptSpecifier: Never
4452# AllowShortBlocksOnASingleLine: Never
4553# AllowShortCaseLabelsOnASingleLine: false
54+ # AllowShortCompoundRequirementOnASingleLine: true
4655# AllowShortEnumsOnASingleLine: true
4756AllowShortFunctionsOnASingleLine : Inline
4857# AllowShortIfStatementsOnASingleLine: Never
@@ -52,8 +61,10 @@ AllowShortFunctionsOnASingleLine: Inline
5261# AlwaysBreakAfterReturnType: None
5362# AlwaysBreakBeforeMultilineStrings: false
5463# AlwaysBreakTemplateDeclarations: MultiLine
55- # AttributeMacros:
56- # - __capability
64+ AttributeMacros :
65+ - _ALWAYS_INLINE_
66+ - _FORCE_INLINE_
67+ - _NO_INLINE_
5768# BinPackArguments: true
5869# BinPackParameters: true
5970# BitFieldColonSpacing: Both
@@ -76,7 +87,8 @@ AllowShortFunctionsOnASingleLine: Inline
7687# SplitEmptyFunction: true
7788# SplitEmptyRecord: true
7889# SplitEmptyNamespace: true
79- # BreakAfterAttributes: Never
90+ # BreakAdjacentStringLiterals: true
91+ # BreakAfterAttributes: Leave
8092# BreakAfterJavaFieldAnnotations: false
8193# BreakArrays: true
8294# BreakBeforeBinaryOperators: None
@@ -105,14 +117,25 @@ Cpp11BracedListStyle: false
105117# - BOOST_FOREACH
106118# IfMacros:
107119# - KJ_IF_MAYBE
108- # IncludeBlocks: Preserve
120+ IncludeBlocks : Regroup
109121IncludeCategories :
110- - Regex : ^".*"$
111- Priority : 1
112- - Regex : ^<.*\.h>$
113- Priority : 2
122+ - Regex : ^"(core|drivers|editor|main|scene|servers|tests)/.*"$
123+ Priority : 20
124+ - Regex : ^"(modules|platform)/.*"$
125+ Priority : 30
126+ - Regex : ^<thirdparty/.*>$
127+ Priority : 40
128+ - Regex : ^<(windows|Jolt/Jolt|platform_gl)\.h>$
129+ Priority : 50
130+ - Regex : ^<.*\.(h|hpp)>$
131+ Priority : 60
114132 - Regex : ^<.*>$
115- Priority : 3
133+ Priority : 70
134+ - Regex : ^".*\.compat\.inc"$
135+ Priority : 0
136+ SortPriority : 1
137+ - Regex : ^".*"$
138+ Priority : 10
116139# IncludeIsMainRegex: (Test)?$
117140# IncludeIsMainSourceRegex: ""
118141# IndentAccessModifiers: false
@@ -165,6 +188,7 @@ PackConstructorInitializers: NextLine
165188# PenaltyBreakComment: 300
166189# PenaltyBreakFirstLessLess: 120
167190# PenaltyBreakOpenParenthesis: 0
191+ # PenaltyBreakScopeResolution: 500
168192# PenaltyBreakString: 1000
169193# PenaltyBreakTemplateDeclaration: 10
170194# PenaltyExcessCharacter: 1000000
@@ -181,6 +205,7 @@ RemoveSemicolon: true
181205# RequiresExpressionIndentation: OuterScope
182206# SeparateDefinitionBlocks: Leave
183207# ShortNamespaceLines: 1
208+ # SkipMacroDefinitionBody: false
184209# SortIncludes: CaseSensitive
185210# SortJavaStaticImport: Before
186211# SortUsingDeclarations: LexicographicNumeric
@@ -202,6 +227,7 @@ RemoveSemicolon: true
202227# AfterFunctionDefinitionName: false
203228# AfterIfMacros: true
204229# AfterOverloadedOperator: false
230+ # AfterPlacementOperator: true
205231# AfterRequiresInClause: false
206232# AfterRequiresInExpression: false
207233# BeforeNonEmptyParentheses: false
0 commit comments