-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.clang-format
More file actions
271 lines (266 loc) · 12.4 KB
/
.clang-format
File metadata and controls
271 lines (266 loc) · 12.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# Last Revision: Clang.19
---
Language : Cpp
#BasedOnStyle: Chromium # Heavily modified chromium style
DisableFormat : false
UseTab : Never
TabWidth : 2
IndentWidth : 2
PPIndentWidth : 0 # -1 = default
ColumnLimit : 160
# SeparateDefinitionBlocks: Leave
SortIncludes : Never
AccessModifierOffset : -1
AlignAfterOpenBracket : BlockIndent
AlignArrayOfStructures : Right
AlignConsecutiveAssignments :
Enabled : true
AcrossEmptyLines : false
AcrossComments : false
AlignConsecutiveBitFields :
Enabled : true
AcrossEmptyLines : false
AcrossComments : false
AlignConsecutiveDeclarations :
Enabled : true
AcrossEmptyLines : false
AcrossComments : false
AlignFunctionPointers : false
AlignConsecutiveMacros :
Enabled : true
AcrossEmptyLines : true
AcrossComments : true
AlignCompound : true
PadOperators : true
AlignConsecutiveShortCaseStatements :
Enabled : true
AcrossEmptyLines : true
AcrossComments : true
AlignCaseArrows : true
AlignCaseColons : true
AlignEscapedNewlines : Left
AlignOperands : AlignAfterOperator
AlignTrailingComments :
Kind : Always
OverEmptyLines : 2
# AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine : false
AllowBreakBeforeNoexceptSpecifier : Always
AllowShortBlocksOnASingleLine : Always
AllowShortCaseExpressionOnASingleLine : true
AllowShortCaseLabelsOnASingleLine : true
AllowShortCompoundRequirementOnASingleLine : true
AllowShortEnumsOnASingleLine : true
AllowShortFunctionsOnASingleLine : All
AllowShortIfStatementsOnASingleLine : AllIfsAndElse
AllowShortLambdasOnASingleLine : All
AllowShortLoopsOnASingleLine : true
AlwaysBreakBeforeMultilineStrings : true
AttributeMacros : ['__capability', '__output', '__unused']
BinPackArguments : false
BinPackParameters : false
BitFieldColonSpacing : Both
BreakBeforeBraces : Custom
BraceWrapping :
AfterCaseLabel : false
AfterClass : false
AfterControlStatement : Never
AfterEnum : false
AfterFunction : false
AfterNamespace : false
AfterObjCDeclaration : false
AfterStruct : false
AfterUnion : false
AfterExternBlock : false
BeforeCatch : false
BeforeElse : false
BeforeLambdaBody : false
BeforeWhile : false
IndentBraces : false
SplitEmptyFunction : false
SplitEmptyRecord : false
SplitEmptyNamespace : false
BracedInitializerIndentWidth : 2
BreakAdjacentStringLiterals : true
BreakAfterAttributes : Leave
BreakAfterJavaFieldAnnotations : false
BreakAfterReturnType : Automatic
BreakArrays : false
BreakBeforeBinaryOperators : NonAssignment
BreakBeforeConceptDeclarations : Never
BreakBeforeInlineASMColon : OnlyMultiline
BreakBeforeTernaryOperators : true
BreakConstructorInitializers : BeforeComma
BreakFunctionDefinitionParameters : true
BreakInheritanceList : BeforeComma
BreakStringLiterals : true
BreakTemplateDeclarations : Leave
CommentPragmas : '^ IWYU pragma:'
CompactNamespaces : true
ConstructorInitializerIndentWidth : 2
ContinuationIndentWidth : 2
Cpp11BracedListStyle : false
DerivePointerAlignment : false
EmptyLineAfterAccessModifier : Never
EmptyLineBeforeAccessModifier : Leave
ExperimentalAutoDetectBinPacking : false
FixNamespaceComments : true
ForEachMacros : ['foreach', 'Q_FOREACH', 'BOOST_FOREACH']
IfMacros : ['KJ_IF_MAYBE']
IncludeBlocks : Preserve
IncludeIsMainRegex : '([-_](test|unittest))?$'
IncludeIsMainSourceRegex : ''
IndentAccessModifiers : false
IndentCaseBlocks : false
IndentCaseLabels : true
IndentExternBlock : NoIndent
IndentGotoLabels : true
IndentPPDirectives : BeforeHash
IndentRequiresClause : false
IndentWrappedFunctionNames : false
# InsertBraces: true # Disabled for safety
InsertNewlineAtEOF : true
InsertTrailingCommas : Wrapped
IntegerLiteralSeparator :
Binary : 4
BinaryMinDigits : 5
Decimal : 3
DecimalMinDigits : 4
Hex : 2
HexMinDigits : 3
JavaImportGroups : ['com.example', 'com', 'org']
JavaScriptQuotes : Leave
JavaScriptWrapImports : true
KeepEmptyLines :
AtEndOfFile : true
AtStartOfBlock : true
AtStartOfFile : true
LambdaBodyIndentation : Signature
LineEnding : LF
MacroBlockBegin : ''
MacroBlockEnd : ''
# Macros: []
MainIncludeChar : Quote
MaxEmptyLinesToKeep : 2
NamespaceIndentation : None
# NamespaceMacros: []
ObjCBinPackProtocolList : Auto
ObjCBlockIndentWidth : 2
ObjCBreakBeforeNestedBlockParam : true
# ObjCPropertyAttributeOrder: []
ObjCSpaceAfterProperty : false
ObjCSpaceBeforeProtocolList : false
PackConstructorInitializers : CurrentLine
#::::::::::::::::::::::::::::::::::::::::::::::::::::
# Excess characters will use these "ignore" rules
PenaltyBreakAssignment : 2
PenaltyBreakBeforeFirstCallParameter : 1
PenaltyBreakComment : 300
PenaltyBreakFirstLessLess : 120
PenaltyBreakString : 1000
PenaltyBreakTemplateDeclaration : 10
PenaltyExcessCharacter : 1000000
PenaltyReturnTypeOnItsOwnLine : 200
PenaltyIndentedWhitespace : 0
#::::::::::::::::::::::::::::::::::::::::::::::::::::
PointerAlignment : Left
QualifierAlignment : Right
# QualifierOrder : [static, inline, friend, type, constexpr, const, volatile, restrict]
RawStringFormats :
- Language: Cpp
Delimiters:
- cc
- CC
- cpp
- Cpp
- CPP
- 'c++'
- 'C++'
CanonicalDelimiter: ''
BasedOnStyle: Chromium
- Language: TextProto
Delimiters:
- pb
- PB
- proto
- PROTO
EnclosingFunctions:
- EqualsProto
- EquivToProto
- PARSE_PARTIAL_TEXT_PROTO
- PARSE_TEST_PROTO
- PARSE_TEXT_PROTO
- ParseTextOrDie
- ParseTextProtoOrDie
- ParseTestProto
- ParsePartialTestProto
CanonicalDelimiter: pb
BasedOnStyle: Chromium
ReferenceAlignment : Pointer
ReflowComments : false
# RemoveBracesLLVM: false
RemoveParentheses : Leave
RemoveSemicolon : false # Dangerous, and the compiler already warns about it
RequiresClausePosition : WithPreceding
RequiresExpressionIndentation : OuterScope
SeparateDefinitionBlocks : Leave
ShortNamespaceLines : 0
SkipMacroDefinitionBody : false # TODO: Might need to be true
SortJavaStaticImport : Before
SortUsingDeclarations : Never
#::::::::::::::::::::::::::::::::::::::::::::::::::::
SpaceAfterCStyleCast : false
SpaceAfterLogicalNot : false
SpaceAfterTemplateKeyword : false
SpaceAroundPointerQualifiers : Default
SpaceBeforeAssignmentOperators : true
SpaceBeforeCaseColon : true
SpaceBeforeCpp11BracedList : false
SpaceBeforeCtorInitializerColon : false
SpaceBeforeInheritanceColon : true
SpaceBeforeJsonColon : true
SpaceBeforeParens : Custom
SpaceBeforeParensOptions :
AfterControlStatements : true
AfterForeachMacros : true
AfterFunctionDeclarationName : true
AfterFunctionDefinitionName : true
AfterIfMacros : true
AfterOverloadedOperator : true
AfterPlacementOperator : false
AfterRequiresInClause : false
AfterRequiresInExpression : false
BeforeNonEmptyParentheses : false
SpaceBeforeRangeBasedForLoopColon : true
SpaceBeforeSquareBrackets : false
SpaceInEmptyBlock : false
SpacesBeforeTrailingComments : 2
SpacesInAngles : Never
SpacesInContainerLiterals : false # Might want true for multiline?
SpacesInLineCommentPrefix : # Only for ReflowComments:true
Minimum : 1
Maximum : -1
SpacesInParens : Custom
SpacesInParensOptions :
ExceptDoubleParentheses : false
InConditionalStatements : false
InCStyleCasts : false
InEmptyParentheses : false
Other : false
SpacesInSquareBrackets : false
#::::::::::::::::::::::::::::::::::::::::::::::::::::
Standard : Auto
StatementAttributeLikeMacros : [Q_EMIT, discard]
StatementMacros : [Q_UNUSED, QT_REQUIRE_VERSION]
TableGenBreakInsideDAGArg : BreakAll
TableGenBreakingDAGArgOperators : [ins, outs]
TypeNames : []
TypenameMacros : []
VerilogBreakBetweenInstancePorts : false
WhitespaceSensitiveMacros :
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME
...