Skip to content
0.2.0-dev Download ZIP
264 lines ·7.5 KB Raw
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
4# Commented out parameters are those with the same value as base LLVM style.
5# We can uncomment them if we want to change their value, or enforce the
6# chosen value in case the base style changes (last sync: Clang 18.1.8).
7BasedOnStyle: LLVM
8AccessModifierOffset: -4
9AlignAfterOpenBracket: DontAlign
10# AlignArrayOfStructures: None
11# AlignConsecutiveAssignments:
12# Enabled: false
13# AcrossEmptyLines: false
14# AcrossComments: false
15# AlignCompound: false
16# AlignFunctionPointers: false
17# PadOperators: true
18# AlignConsecutiveBitFields:
19# Enabled: false
20# AcrossEmptyLines: false
21# AcrossComments: false
22# AlignCompound: false
23# AlignFunctionPointers: false
24# PadOperators: false
25# AlignConsecutiveDeclarations:
26# Enabled: false
27# AcrossEmptyLines: false
28# AcrossComments: false
29# AlignCompound: false
30# AlignFunctionPointers: false
31# PadOperators: false
32# AlignConsecutiveMacros:
33# Enabled: false
34# AcrossEmptyLines: false
35# AcrossComments: false
36# AlignCompound: false
37# AlignFunctionPointers: false
38# PadOperators: false
39# AlignConsecutiveShortCaseStatements:
40# Enabled: false
41# AcrossEmptyLines: false
42# AcrossComments: false
43# AlignCaseColons: false
44AlignEscapedNewlines: DontAlign # Aligning leads to long diffs
45AlignOperands: DontAlign
46AlignTrailingComments:
47 Kind: Never
48 OverEmptyLines: 0
49# AllowAllArgumentsOnNextLine: true
50AllowAllParametersOfDeclarationOnNextLine: false
51# AllowBreakBeforeNoexceptSpecifier: Never
52# AllowShortBlocksOnASingleLine: Never
53# AllowShortCaseLabelsOnASingleLine: false
54# AllowShortCompoundRequirementOnASingleLine: true
55# AllowShortEnumsOnASingleLine: true
56AllowShortFunctionsOnASingleLine: Inline
57# AllowShortIfStatementsOnASingleLine: Never
58# AllowShortLambdasOnASingleLine: All
59# AllowShortLoopsOnASingleLine: false
60# AlwaysBreakAfterDefinitionReturnType: None
61# AlwaysBreakAfterReturnType: None
62# AlwaysBreakBeforeMultilineStrings: false
63# AlwaysBreakTemplateDeclarations: MultiLine
64AttributeMacros:
65 - _ALWAYS_INLINE_
66 - _FORCE_INLINE_
67 - _NO_INLINE_
68# BinPackArguments: true
69# BinPackParameters: true
70# BitFieldColonSpacing: Both
71# BraceWrapping:
72# AfterCaseLabel: false
73# AfterClass: false
74# AfterControlStatement: Never
75# AfterEnum: false
76# AfterFunction: false
77# AfterNamespace: false
78# AfterObjCDeclaration: false
79# AfterStruct: false
80# AfterUnion: false
81# AfterExternBlock: false
82# BeforeCatch: false
83# BeforeElse: false
84# BeforeLambdaBody: false
85# BeforeWhile: false
86# IndentBraces: false
87# SplitEmptyFunction: true
88# SplitEmptyRecord: true
89# SplitEmptyNamespace: true
90# BreakAdjacentStringLiterals: true
91# BreakAfterAttributes: Leave
92# BreakAfterJavaFieldAnnotations: false
93# BreakArrays: true
94# BreakBeforeBinaryOperators: None
95# BreakBeforeBraces: Attach
96# BreakBeforeConceptDeclarations: Always
97# BreakBeforeInlineASMColon: OnlyMultiline
98# BreakBeforeTernaryOperators: true
99BreakConstructorInitializers: AfterColon
100# BreakInheritanceList: BeforeColon
101# BreakStringLiterals: true
102ColumnLimit: 0
103# CommentPragmas: "^ IWYU pragma:"
104# CompactNamespaces: false
105ConstructorInitializerIndentWidth: 8
106ContinuationIndentWidth: 8
107Cpp11BracedListStyle: false
108# DerivePointerAlignment: false
109# DisableFormat: false
110# EmptyLineAfterAccessModifier: Never
111# EmptyLineBeforeAccessModifier: LogicalBlock
112# ExperimentalAutoDetectBinPacking: false
113# FixNamespaceComments: true
114# ForEachMacros:
115# - foreach
116# - Q_FOREACH
117# - BOOST_FOREACH
118# IfMacros:
119# - KJ_IF_MAYBE
120IncludeBlocks: Regroup
121IncludeCategories:
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
132 - Regex: ^<.*>$
133 Priority: 70
134 - Regex: ^".*\.compat\.inc"$
135 Priority: 0
136 SortPriority: 1
137 - Regex: ^".*"$
138 Priority: 10
139# IncludeIsMainRegex: (Test)?$
140# IncludeIsMainSourceRegex: ""
141# IndentAccessModifiers: false
142# IndentCaseBlocks: false
143IndentCaseLabels: true
144# IndentExternBlock: AfterExternBlock
145# IndentGotoLabels: true
146# IndentPPDirectives: None
147# IndentRequiresClause: true
148IndentWidth: 4
149# IndentWrappedFunctionNames: false
150InsertBraces: true
151# InsertNewlineAtEOF: false
152# InsertTrailingCommas: None
153# IntegerLiteralSeparator:
154# Binary: 0
155# BinaryMinDigits: 0
156# Decimal: 0
157# DecimalMinDigits: 0
158# Hex: 0
159# HexMinDigits: 0
160JavaImportGroups:
161 - org.godotengine
162 - android
163 - androidx
164 - com.android
165 - com.google
166 - java
167 - javax
168# JavaScriptQuotes: Leave
169# JavaScriptWrapImports: true
170# KeepEmptyLinesAtEOF: false
171KeepEmptyLinesAtTheStartOfBlocks: false
172# LambdaBodyIndentation: Signature
173# Language: Cpp
174# LineEnding: DeriveLF
175# MacroBlockBegin: ""
176# MacroBlockEnd: ""
177# MaxEmptyLinesToKeep: 1
178# NamespaceIndentation: None
179# ObjCBinPackProtocolList: Auto
180ObjCBlockIndentWidth: 4
181# ObjCBreakBeforeNestedBlockParam: true
182# ObjCSpaceAfterProperty: false
183# ObjCSpaceBeforeProtocolList: true
184# PPIndentWidth: -1
185PackConstructorInitializers: NextLine
186# PenaltyBreakAssignment: 2
187# PenaltyBreakBeforeFirstCallParameter: 19
188# PenaltyBreakComment: 300
189# PenaltyBreakFirstLessLess: 120
190# PenaltyBreakOpenParenthesis: 0
191# PenaltyBreakScopeResolution: 500
192# PenaltyBreakString: 1000
193# PenaltyBreakTemplateDeclaration: 10
194# PenaltyExcessCharacter: 1000000
195# PenaltyIndentedWhitespace: 0
196# PenaltyReturnTypeOnItsOwnLine: 60
197# PointerAlignment: Right
198QualifierAlignment: Left
199# ReferenceAlignment: Pointer
200# ReflowComments: true
201# RemoveBracesLLVM: false
202# RemoveParentheses: Leave
203RemoveSemicolon: true
204# RequiresClausePosition: OwnLine
205# RequiresExpressionIndentation: OuterScope
206# SeparateDefinitionBlocks: Leave
207# ShortNamespaceLines: 1
208# SkipMacroDefinitionBody: false
209# SortIncludes: CaseSensitive
210# SortJavaStaticImport: Before
211# SortUsingDeclarations: LexicographicNumeric
212# SpaceAfterCStyleCast: false
213# SpaceAfterLogicalNot: false
214# SpaceAfterTemplateKeyword: true
215# SpaceAroundPointerQualifiers: Default
216# SpaceBeforeAssignmentOperators: true
217# SpaceBeforeCaseColon: false
218# SpaceBeforeCpp11BracedList: false
219# SpaceBeforeCtorInitializerColon: true
220# SpaceBeforeInheritanceColon: true
221# SpaceBeforeJsonColon: false
222# SpaceBeforeParens: ControlStatements
223# SpaceBeforeParensOptions:
224# AfterControlStatements: true
225# AfterForeachMacros: true
226# AfterFunctionDeclarationName: false
227# AfterFunctionDefinitionName: false
228# AfterIfMacros: true
229# AfterOverloadedOperator: false
230# AfterPlacementOperator: true
231# AfterRequiresInClause: false
232# AfterRequiresInExpression: false
233# BeforeNonEmptyParentheses: false
234# SpaceBeforeRangeBasedForLoopColon: true
235# SpaceBeforeSquareBrackets: false
236# SpaceInEmptyBlock: false
237# SpacesBeforeTrailingComments: 1
238# SpacesInAngles: Never
239# SpacesInContainerLiterals: true
240SpacesInLineCommentPrefix:
241 Minimum: 0 # We want a minimum of 1 for comments, but allow 0 for disabled code.
242 Maximum: -1
243# SpacesInParens: Never
244# SpacesInParensOptions:
245# InConditionalStatements: false
246# InCStyleCasts: false
247# InEmptyParentheses: false
248# Other: false
249# SpacesInSquareBrackets: false
250Standard: c++20
251# StatementAttributeLikeMacros:
252# - Q_EMIT
253# StatementMacros:
254# - Q_UNUSED
255# - QT_REQUIRE_VERSION
256TabWidth: 4
257UseTab: Always
258# VerilogBreakBetweenInstancePorts: true
259# WhitespaceSensitiveMacros:
260# - BOOST_PP_STRINGIZE
261# - CF_SWIFT_NAME
262# - NS_SWIFT_NAME
263# - PP_STRINGIZE
264# - STRINGIZE