Skip to content

Commit 256facb

Browse files
committed
fix code formatting
1 parent ce66150 commit 256facb

File tree

11 files changed

+493
-262
lines changed

11 files changed

+493
-262
lines changed

.clang-format

Lines changed: 217 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,238 @@
11
---
22
Language: Cpp
3-
# BasedOnStyle: Mizux
3+
# BasedOnStyle: Google
44
AccessModifierOffset: -1
5-
AlignAfterOpenBracket: AlwaysBreak
6-
AlignConsecutiveMacros: false
7-
AlignConsecutiveAssignments: true
8-
AlignConsecutiveDeclarations: true
5+
AlignAfterOpenBracket: Align
6+
AlignArrayOfStructures: None
7+
AlignConsecutiveAssignments:
8+
Enabled: false
9+
AcrossEmptyLines: false
10+
AcrossComments: false
11+
AlignCompound: false
12+
AlignFunctionDeclarations: false
13+
AlignFunctionPointers: false
14+
PadOperators: true
15+
AlignConsecutiveBitFields:
16+
Enabled: false
17+
AcrossEmptyLines: false
18+
AcrossComments: false
19+
AlignCompound: false
20+
AlignFunctionDeclarations: false
21+
AlignFunctionPointers: false
22+
PadOperators: false
23+
AlignConsecutiveDeclarations:
24+
Enabled: false
25+
AcrossEmptyLines: false
26+
AcrossComments: false
27+
AlignCompound: false
28+
AlignFunctionDeclarations: true
29+
AlignFunctionPointers: false
30+
PadOperators: false
31+
AlignConsecutiveMacros:
32+
Enabled: false
33+
AcrossEmptyLines: false
34+
AcrossComments: false
35+
AlignCompound: false
36+
AlignFunctionDeclarations: false
37+
AlignFunctionPointers: false
38+
PadOperators: false
39+
AlignConsecutiveShortCaseStatements:
40+
Enabled: false
41+
AcrossEmptyLines: false
42+
AcrossComments: false
43+
AlignCaseArrows: false
44+
AlignCaseColons: false
45+
AlignConsecutiveTableGenBreakingDAGArgColons:
46+
Enabled: false
47+
AcrossEmptyLines: false
48+
AcrossComments: false
49+
AlignCompound: false
50+
AlignFunctionDeclarations: false
51+
AlignFunctionPointers: false
52+
PadOperators: false
53+
AlignConsecutiveTableGenCondOperatorColons:
54+
Enabled: false
55+
AcrossEmptyLines: false
56+
AcrossComments: false
57+
AlignCompound: false
58+
AlignFunctionDeclarations: false
59+
AlignFunctionPointers: false
60+
PadOperators: false
61+
AlignConsecutiveTableGenDefinitionColons:
62+
Enabled: false
63+
AcrossEmptyLines: false
64+
AcrossComments: false
65+
AlignCompound: false
66+
AlignFunctionDeclarations: false
67+
AlignFunctionPointers: false
68+
PadOperators: false
969
AlignEscapedNewlines: Left
10-
AlignOperands: true
11-
AlignTrailingComments: true
70+
AlignOperands: Align
71+
AlignTrailingComments:
72+
Kind: Always
73+
OverEmptyLines: 0
1274
AllowAllArgumentsOnNextLine: true
13-
AllowAllConstructorInitializersOnNextLine: true
14-
AllowAllParametersOfDeclarationOnNextLine: false
75+
AllowAllParametersOfDeclarationOnNextLine: true
76+
AllowBreakBeforeNoexceptSpecifier: Never
77+
AllowBreakBeforeQtProperty: false
1578
AllowShortBlocksOnASingleLine: Never
79+
AllowShortCaseExpressionOnASingleLine: true
1680
AllowShortCaseLabelsOnASingleLine: false
17-
AllowShortFunctionsOnASingleLine: Inline
81+
AllowShortCompoundRequirementOnASingleLine: true
82+
AllowShortEnumsOnASingleLine: true
83+
AllowShortFunctionsOnASingleLine: All
84+
AllowShortIfStatementsOnASingleLine: WithoutElse
1885
AllowShortLambdasOnASingleLine: All
19-
AllowShortIfStatementsOnASingleLine: Never
20-
AllowShortLoopsOnASingleLine: false
86+
AllowShortLoopsOnASingleLine: true
87+
AllowShortNamespacesOnASingleLine: false
2188
AlwaysBreakAfterDefinitionReturnType: None
22-
AlwaysBreakAfterReturnType: None
2389
AlwaysBreakBeforeMultilineStrings: true
24-
AlwaysBreakTemplateDeclarations: Yes
25-
BinPackArguments: false
26-
BinPackParameters: false
90+
AttributeMacros:
91+
- __capability
92+
- absl_nonnull
93+
- absl_nullable
94+
- absl_nullability_unknown
95+
BinPackArguments: true
96+
BinPackLongBracedList: true
97+
BinPackParameters: BinPack
98+
BitFieldColonSpacing: Both
99+
BracedInitializerIndentWidth: -1
27100
BraceWrapping:
28-
AfterCaseLabel: true
29-
AfterClass: true
30-
AfterControlStatement: false
101+
AfterCaseLabel: false
102+
AfterClass: false
103+
AfterControlStatement: Never
31104
AfterEnum: false
105+
AfterExternBlock: false
32106
AfterFunction: false
33107
AfterNamespace: false
34108
AfterObjCDeclaration: false
35109
AfterStruct: false
36110
AfterUnion: false
37-
AfterExternBlock: false
38111
BeforeCatch: false
39112
BeforeElse: false
113+
BeforeLambdaBody: false
114+
BeforeWhile: false
40115
IndentBraces: false
41116
SplitEmptyFunction: true
42117
SplitEmptyRecord: true
43118
SplitEmptyNamespace: true
119+
BreakAdjacentStringLiterals: true
120+
BreakAfterAttributes: Leave
121+
BreakAfterJavaFieldAnnotations: false
122+
BreakAfterReturnType: None
123+
BreakArrays: true
44124
BreakBeforeBinaryOperators: None
125+
BreakBeforeConceptDeclarations: Always
45126
BreakBeforeBraces: Attach
46-
BreakBeforeInheritanceComma: false
47-
BreakInheritanceList: BeforeColon
127+
BreakBeforeInlineASMColon: OnlyMultiline
128+
BreakBeforeTemplateCloser: false
48129
BreakBeforeTernaryOperators: true
49-
BreakConstructorInitializersBeforeComma: false
130+
BreakBinaryOperations: Never
50131
BreakConstructorInitializers: BeforeColon
51-
BreakAfterJavaFieldAnnotations: false
132+
BreakFunctionDefinitionParameters: false
133+
BreakInheritanceList: BeforeColon
52134
BreakStringLiterals: true
53-
ColumnLimit: 100
135+
BreakTemplateDeclarations: Yes
136+
ColumnLimit: 80
54137
CommentPragmas: '^ IWYU pragma:'
55138
CompactNamespaces: false
56-
ConstructorInitializerAllOnOneLineOrOnePerLine: true
57139
ConstructorInitializerIndentWidth: 4
58140
ContinuationIndentWidth: 4
59141
Cpp11BracedListStyle: true
60-
DeriveLineEnding: true
61142
DerivePointerAlignment: false
62143
DisableFormat: false
144+
EmptyLineAfterAccessModifier: Never
145+
EmptyLineBeforeAccessModifier: LogicalBlock
146+
EnumTrailingComma: Leave
63147
ExperimentalAutoDetectBinPacking: false
64148
FixNamespaceComments: true
65149
ForEachMacros:
66150
- foreach
67151
- Q_FOREACH
68152
- BOOST_FOREACH
153+
IfMacros:
154+
- KJ_IF_MAYBE
69155
IncludeBlocks: Regroup
70156
IncludeCategories:
71157
- Regex: '^<ext/.*\.h>'
72158
Priority: 2
73159
SortPriority: 0
160+
CaseSensitive: false
74161
- Regex: '^<.*\.h>'
75162
Priority: 1
76163
SortPriority: 0
164+
CaseSensitive: false
77165
- Regex: '^<.*'
78166
Priority: 2
79167
SortPriority: 0
168+
CaseSensitive: false
80169
- Regex: '.*'
81170
Priority: 3
82171
SortPriority: 0
172+
CaseSensitive: false
83173
IncludeIsMainRegex: '([-_](test|unittest))?$'
84174
IncludeIsMainSourceRegex: ''
175+
IndentAccessModifiers: false
176+
IndentCaseBlocks: false
85177
IndentCaseLabels: true
178+
IndentExportBlock: true
179+
IndentExternBlock: AfterExternBlock
86180
IndentGotoLabels: true
87181
IndentPPDirectives: None
182+
IndentRequiresClause: true
88183
IndentWidth: 2
89184
IndentWrappedFunctionNames: false
185+
InsertBraces: false
186+
InsertNewlineAtEOF: false
187+
InsertTrailingCommas: None
188+
IntegerLiteralSeparator:
189+
Binary: 0
190+
BinaryMinDigits: 0
191+
Decimal: 0
192+
DecimalMinDigits: 0
193+
Hex: 0
194+
HexMinDigits: 0
90195
JavaScriptQuotes: Leave
91196
JavaScriptWrapImports: true
92-
KeepEmptyLinesAtTheStartOfBlocks: false
197+
KeepEmptyLines:
198+
AtEndOfFile: false
199+
AtStartOfBlock: false
200+
AtStartOfFile: true
201+
KeepFormFeed: false
202+
LambdaBodyIndentation: Signature
203+
LineEnding: DeriveLF
93204
MacroBlockBegin: ''
94205
MacroBlockEnd: ''
206+
MainIncludeChar: Quote
95207
MaxEmptyLinesToKeep: 1
96208
NamespaceIndentation: None
209+
NumericLiteralCase:
210+
ExponentLetter: Leave
211+
HexDigit: Leave
212+
Prefix: Leave
213+
Suffix: Leave
97214
ObjCBinPackProtocolList: Never
98215
ObjCBlockIndentWidth: 2
216+
ObjCBreakBeforeNestedBlockParam: true
99217
ObjCSpaceAfterProperty: false
100218
ObjCSpaceBeforeProtocolList: true
219+
OneLineFormatOffRegex: ''
220+
PackConstructorInitializers: NextLine
101221
PenaltyBreakAssignment: 2
102222
PenaltyBreakBeforeFirstCallParameter: 1
223+
PenaltyBreakBeforeMemberAccess: 150
103224
PenaltyBreakComment: 300
104225
PenaltyBreakFirstLessLess: 120
226+
PenaltyBreakOpenParenthesis: 0
227+
PenaltyBreakScopeResolution: 500
105228
PenaltyBreakString: 1000
106229
PenaltyBreakTemplateDeclaration: 10
107230
PenaltyExcessCharacter: 1000000
231+
PenaltyIndentedWhitespace: 0
108232
PenaltyReturnTypeOnItsOwnLine: 200
109233
PointerAlignment: Left
234+
PPIndentWidth: -1
235+
QualifierAlignment: Leave
110236
RawStringFormats:
111237
- Language: Cpp
112238
Delimiters:
@@ -133,36 +259,84 @@ RawStringFormats:
133259
- PARSE_TEXT_PROTO
134260
- ParseTextOrDie
135261
- ParseTextProtoOrDie
136-
CanonicalDelimiter: ''
262+
- ParseTestProto
263+
- ParsePartialTestProto
264+
CanonicalDelimiter: pb
137265
BasedOnStyle: google
138-
ReflowComments: true
139-
SortIncludes: true
140-
SortUsingDeclarations: true
266+
ReferenceAlignment: Pointer
267+
ReflowComments: Always
268+
RemoveBracesLLVM: false
269+
RemoveEmptyLinesInUnwrappedLines: false
270+
RemoveParentheses: Leave
271+
RemoveSemicolon: false
272+
RequiresClausePosition: OwnLine
273+
RequiresExpressionIndentation: OuterScope
274+
SeparateDefinitionBlocks: Leave
275+
ShortNamespaceLines: 1
276+
SkipMacroDefinitionBody: false
277+
SortIncludes:
278+
Enabled: true
279+
IgnoreCase: false
280+
IgnoreExtension: false
281+
SortJavaStaticImport: Before
282+
SortUsingDeclarations: LexicographicNumeric
141283
SpaceAfterCStyleCast: false
142284
SpaceAfterLogicalNot: false
143-
SpaceAfterTemplateKeyword: false
285+
SpaceAfterOperatorKeyword: false
286+
SpaceAfterTemplateKeyword: true
287+
SpaceAroundPointerQualifiers: Default
144288
SpaceBeforeAssignmentOperators: true
289+
SpaceBeforeCaseColon: false
145290
SpaceBeforeCpp11BracedList: false
146291
SpaceBeforeCtorInitializerColon: true
147292
SpaceBeforeInheritanceColon: true
293+
SpaceBeforeJsonColon: false
148294
SpaceBeforeParens: ControlStatements
295+
SpaceBeforeParensOptions:
296+
AfterControlStatements: true
297+
AfterForeachMacros: true
298+
AfterFunctionDefinitionName: false
299+
AfterFunctionDeclarationName: false
300+
AfterIfMacros: true
301+
AfterNot: false
302+
AfterOverloadedOperator: false
303+
AfterPlacementOperator: true
304+
AfterRequiresInClause: false
305+
AfterRequiresInExpression: false
306+
BeforeNonEmptyParentheses: false
149307
SpaceBeforeRangeBasedForLoopColon: true
150-
SpaceInEmptyBlock: false
151-
SpaceInEmptyParentheses: false
152-
SpacesBeforeTrailingComments: 1
153-
SpacesInAngles: false
154-
SpacesInConditionalStatement: false
308+
SpaceBeforeSquareBrackets: false
309+
SpaceInEmptyBraces: Never
310+
SpacesBeforeTrailingComments: 2
311+
SpacesInAngles: Never
155312
SpacesInContainerLiterals: true
156-
SpacesInCStyleCastParentheses: false
157-
SpacesInParentheses: false
313+
SpacesInLineCommentPrefix:
314+
Minimum: 1
315+
Maximum: -1
316+
SpacesInParens: Never
317+
SpacesInParensOptions:
318+
ExceptDoubleParentheses: false
319+
InCStyleCasts: false
320+
InConditionalStatements: false
321+
InEmptyParentheses: false
322+
Other: false
158323
SpacesInSquareBrackets: false
159-
SpaceBeforeSquareBrackets: false
160-
Standard: Latest
324+
Standard: Auto
325+
StatementAttributeLikeMacros:
326+
- Q_EMIT
161327
StatementMacros:
162328
- Q_UNUSED
163329
- QT_REQUIRE_VERSION
330+
TableGenBreakInsideDAGArg: DontBreak
164331
TabWidth: 8
165-
UseCRLF: false
166332
UseTab: Never
333+
VerilogBreakBetweenInstancePorts: true
334+
WhitespaceSensitiveMacros:
335+
- BOOST_PP_STRINGIZE
336+
- CF_SWIFT_NAME
337+
- NS_SWIFT_NAME
338+
- PP_STRINGIZE
339+
- STRINGIZE
340+
WrapNamespaceBodyWithEmptyLines: Leave
167341
...
168342

0 commit comments

Comments
 (0)