Skip to content

Commit d9933e7

Browse files
committed
chore: Add configuration file of clang format tool
1 parent b3ba326 commit d9933e7

File tree

1 file changed

+220
-0
lines changed

1 file changed

+220
-0
lines changed

.clang-format

Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: Microsoft
4+
AccessModifierOffset: -4
5+
AlignAfterOpenBracket: Align
6+
AlignArrayOfStructures: Left
7+
AlignConsecutiveMacros:
8+
Enabled: true
9+
AcrossEmptyLines: false
10+
AcrossComments: false
11+
AlignConsecutiveAssignments: false
12+
AlignConsecutiveBitFields: false
13+
AlignConsecutiveDeclarations: false
14+
AlignConsecutiveShortCaseStatements:
15+
Enabled: false
16+
AcrossEmptyLines: true
17+
AcrossComments: true
18+
AlignCaseColons: false
19+
AlignEscapedNewlines: Right
20+
AlignOperands: Align
21+
AlignTrailingComments: true
22+
AllowAllArgumentsOnNextLine: false
23+
AllowAllParametersOfDeclarationOnNextLine: true
24+
AllowBreakBeforeNoexceptSpecifier: OnlyWithParen
25+
AllowShortEnumsOnASingleLine: false
26+
AllowShortBlocksOnASingleLine: Never
27+
AllowShortCaseLabelsOnASingleLine: false
28+
AllowShortCompoundRequirementOnASingleLine: false
29+
AllowShortFunctionsOnASingleLine: Empty
30+
AllowShortLambdasOnASingleLine: Empty
31+
AllowShortIfStatementsOnASingleLine: Never
32+
AllowShortLoopsOnASingleLine: false
33+
AlwaysBreakAfterDefinitionReturnType: None
34+
AlwaysBreakAfterReturnType: TopLevel
35+
AlwaysBreakBeforeMultilineStrings: false
36+
AlwaysBreakTemplateDeclarations: MultiLine
37+
AttributeMacros:
38+
- __capability
39+
BinPackArguments: false
40+
BinPackParameters: true
41+
BraceWrapping:
42+
AfterCaseLabel: false
43+
AfterClass: true
44+
AfterControlStatement: Always
45+
AfterEnum: true
46+
AfterFunction: true
47+
AfterNamespace: true
48+
AfterObjCDeclaration: true
49+
AfterStruct: true
50+
AfterUnion: false
51+
AfterExternBlock: true
52+
BeforeCatch: true
53+
BeforeElse: true
54+
BeforeLambdaBody: false
55+
BeforeWhile: false
56+
IndentBraces: false
57+
SplitEmptyFunction: true
58+
SplitEmptyRecord: true
59+
SplitEmptyNamespace: true
60+
BracedInitializerIndentWidth : 4
61+
BreakAdjacentStringLiterals: true
62+
BreakAfterAttributes: Always
63+
BreakBeforeBinaryOperators: None
64+
BreakBeforeConceptDeclarations: Always
65+
BreakBeforeInlineASMColon: OnlyMultiline
66+
BreakBeforeBraces: Custom
67+
BreakInheritanceList: AfterComma
68+
BreakBeforeTernaryOperators: true
69+
BreakConstructorInitializers: BeforeColon
70+
BreakAfterJavaFieldAnnotations: false
71+
BreakArrays: false
72+
BreakStringLiterals: true
73+
ColumnLimit: 80
74+
CommentPragmas: '^ IWYU pragma:'
75+
QualifierAlignment: Left
76+
CompactNamespaces: false
77+
ConstructorInitializerIndentWidth: 4
78+
ContinuationIndentWidth: 4
79+
Cpp11BracedListStyle: true
80+
DeriveLineEnding: true
81+
DerivePointerAlignment: false
82+
DisableFormat: false
83+
EmptyLineAfterAccessModifier: Never
84+
EmptyLineBeforeAccessModifier: LogicalBlock
85+
ExperimentalAutoDetectBinPacking: false
86+
PackConstructorInitializers: BinPack
87+
BasedOnStyle: ''
88+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
89+
AllowAllConstructorInitializersOnNextLine: true
90+
FixNamespaceComments: true
91+
ForEachMacros:
92+
- foreach
93+
- Q_FOREACH
94+
- BOOST_FOREACH
95+
IfMacros:
96+
- KJ_IF_MAYBE
97+
IncludeBlocks: Preserve
98+
IncludeCategories:
99+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
100+
Priority: 2
101+
SortPriority: 0
102+
CaseSensitive: false
103+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
104+
Priority: 3
105+
SortPriority: 0
106+
CaseSensitive: false
107+
- Regex: '.*'
108+
Priority: 1
109+
SortPriority: 0
110+
CaseSensitive: false
111+
IncludeIsMainRegex: '(Test)?$'
112+
IncludeIsMainSourceRegex: ''
113+
IndentAccessModifiers: false
114+
IndentCaseLabels: false
115+
IndentCaseBlocks: false
116+
IndentGotoLabels: true
117+
IndentPPDirectives: None
118+
IndentExternBlock: AfterExternBlock
119+
IndentRequiresClause: false
120+
IndentWidth: 4
121+
IndentWrappedFunctionNames: false
122+
InsertBraces: true
123+
InsertNewlineAtEOF: false
124+
InsertTrailingCommas: None
125+
IntegerLiteralSeparator:
126+
Binary: -1
127+
Decimal: -1
128+
Hex: -1
129+
JavaScriptQuotes: Leave
130+
JavaScriptWrapImports: true
131+
KeepEmptyLinesAtEOF: false
132+
KeepEmptyLinesAtTheStartOfBlocks: true
133+
LambdaBodyIndentation: Signature
134+
LineEnding: LF
135+
MacroBlockBegin: ''
136+
MacroBlockEnd: ''
137+
MaxEmptyLinesToKeep: 1
138+
NamespaceIndentation: None
139+
ObjCBinPackProtocolList: Auto
140+
ObjCBlockIndentWidth: 2
141+
ObjCBreakBeforeNestedBlockParam: true
142+
ObjCSpaceAfterProperty: false
143+
ObjCSpaceBeforeProtocolList: true
144+
PenaltyBreakAssignment: 2
145+
PenaltyBreakBeforeFirstCallParameter: 19
146+
PenaltyBreakComment: 300
147+
PenaltyBreakFirstLessLess: 120
148+
PenaltyBreakOpenParenthesis: 0
149+
PenaltyBreakScopeResolution: 100
150+
PenaltyBreakString: 1000
151+
PenaltyBreakTemplateDeclaration: 10
152+
PenaltyExcessCharacter: 1000000
153+
PenaltyReturnTypeOnItsOwnLine: 1000
154+
PenaltyIndentedWhitespace: 0
155+
PointerAlignment: Left
156+
PPIndentWidth: -1
157+
ReferenceAlignment: Pointer
158+
ReflowComments: true
159+
RemoveBracesLLVM: false
160+
RemoveParentheses: Leave
161+
RemoveSemicolon: false
162+
RequiresClausePosition: SingleLine
163+
RequiresExpressionIndentation: OuterScope
164+
SeparateDefinitionBlocks: Leave
165+
ShortNamespaceLines: 1
166+
SkipMacroDefinitionBody: false
167+
SortIncludes: CaseSensitive
168+
SortJavaStaticImport: Before
169+
SortUsingDeclarations: LexicographicNumeric
170+
SpaceAfterCStyleCast: false
171+
SpaceAfterLogicalNot: false
172+
SpaceAfterTemplateKeyword: true
173+
SpaceBeforeAssignmentOperators: true
174+
SpaceBeforeCaseColon: false
175+
SpaceBeforeCpp11BracedList: true
176+
SpaceBeforeCtorInitializerColon: true
177+
SpaceBeforeInheritanceColon: true
178+
SpaceBeforeParensOptions:
179+
AfterControlStatements: true
180+
AfterForeachMacros: true
181+
AfterFunctionDefinitionName: false
182+
AfterFunctionDeclarationName: false
183+
AfterIfMacros: true
184+
AfterOverloadedOperator: false
185+
BeforeNonEmptyParentheses: false
186+
AfterRequiresInClause: false
187+
AfterRequiresInExpression: false
188+
SpaceAroundPointerQualifiers: Default
189+
SpaceBeforeRangeBasedForLoopColon: true
190+
SpaceInEmptyBlock: false
191+
SpaceInEmptyParentheses: false
192+
SpacesBeforeTrailingComments: 1
193+
SpacesInAngles: Never
194+
SpacesInConditionalStatement: false
195+
SpacesInContainerLiterals: true
196+
SpacesInCStyleCastParentheses: false
197+
SpacesInLineCommentPrefix:
198+
Minimum: 1
199+
Maximum: -1
200+
SpacesInParens: Never
201+
SpacesInSquareBrackets: false
202+
SpaceBeforeSquareBrackets: false
203+
BitFieldColonSpacing: Both
204+
Standard: Latest
205+
StatementAttributeLikeMacros:
206+
- Q_EMIT
207+
StatementMacros:
208+
- Q_UNUSED
209+
- QT_REQUIRE_VERSION
210+
TabWidth: 4
211+
UseCRLF: false
212+
UseTab: Never
213+
WhitespaceSensitiveMacros:
214+
- STRINGIZE
215+
- PP_STRINGIZE
216+
- BOOST_PP_STRINGIZE
217+
- NS_SWIFT_NAME
218+
- CF_SWIFT_NAME
219+
...
220+

0 commit comments

Comments
 (0)