-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
215 lines (154 loc) · 6.54 KB
/
.clang-format
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
Language: Cpp
# --------------------------------------------------------------------------- #
# Basic rules #
# --------------------------------------------------------------------------- #
# Column limit on which to break.
ColumnLimit: 100
# Number of columns used for tab stops.
TabWidth: 4
# Number of columns used for indentation.
IndentWidth: 4
# Indent width for line continuations.
ContinuationIndentWidth: 4
# Align pointers and references on the left (next to the type).
PointerAlignment: Left
# Do not insert spaces in parentheses.
SpacesInParentheses: false
# Do not insert spaces in square brackets.
SpacesInSquareBrackets: false
# Never use tab to indent (use spaces instead).
UseTab: Never
# --------------------------------------------------------------------------- #
# Alignment behavior #
# --------------------------------------------------------------------------- #
# Horizontally align arguments after an open bracket.
AlignAfterOpenBracket: Align
# Do not align assignments on consecutive lines.
AlignConsecutiveAssignments: false
# Do not align declarations on consecutive lines.
AlignConsecutiveDeclarations: false
# Do not align macros on consecutive lines.
AlignConsecutiveMacros: false
# Align `\` on the right-most column (see `ColumnLimit`).
AlignEscapedNewlines: Right
# Horizontally align operands of binary and ternary expressions.
AlignOperands: true
# Align comments that are trailing statements.
AlignTrailingComments: true
# --------------------------------------------------------------------------- #
# Brace wrapping behavior #
# --------------------------------------------------------------------------- #
# Only break for functions and in case of multiline control statements.
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: true
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
# --------------------------------------------------------------------------- #
# Line breaking behavior #
# --------------------------------------------------------------------------- #
# Do not break after function's return type.
AlwaysBreakAfterReturnType: None
# Do not break after multiline string literals.
AlwaysBreakBeforeMultilineStrings: false
# Break if arguments do not fit on the same line.
BinPackArguments: true
# Break if function parameters do not fit on the same line.
BinPackParameters: true
# Break after operators.
BreakBeforeBinaryOperators: None
# Break after ternary operator.
BreakBeforeTernaryOperators: false
# Allow breaking on long string literals.
BreakStringLiterals: true
# Always break after template declaration
# BreakTemplateDeclaration: Always
# Always break before concept declaration (after template decl)
# BreakBeforeConceptDeclarations: Always
# --------------------------------------------------------------------------- #
# Indenting behavior #
# --------------------------------------------------------------------------- #
# Indent case labels from switch statement.
IndentCaseLabels: true
# Indent goto labels.
IndentGotoLabels: true
# Indent pre-processor directives before the hash.
IndentPPDirectives: BeforeHash
# Do not indent if a function definition or declaration is wrapped after the type.
IndentWrappedFunctionNames: false
# Always indent inside namespaces
NamespaceIndentation: All
# --------------------------------------------------------------------------- #
# Space insertion behavior #
# --------------------------------------------------------------------------- #
# Insert space around the colon.
BitFieldColonSpacing: Both
# Do not insert a space after a C-style cast.
SpaceAfterCStyleCast: false
# Do not insert a space after logical not operator.
SpaceAfterLogicalNot: false
# Do not insert spaces around pointer qualifiers.
SpaceAroundPointerQualifiers: Default
# Insert spaces around assignment operators.
SpaceBeforeAssignmentOperators: true
# Do not insert a space before a colon.
SpaceBeforeCaseColon: false
# Only insert a space before control statements.
SpaceBeforeParens: ControlStatements
# Insert a space inside empty blocks.
SpaceInEmptyBlock: true
# Do not insert a space inside empty parentheses.
SpaceInEmptyParentheses: false
# Insert a single space before trailing comments.
SpacesBeforeTrailingComments: 1
# Do not insert spaces in C-style casts parentheses.
SpacesInCStyleCastParentheses: false
# Insert at least single space before text in a line comment.
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
# --------------------------------------------------------------------------- #
# Misc #
# --------------------------------------------------------------------------- #
# Do not allow putting all arguments onto the next line.
AllowAllArgumentsOnNextLine: false
# Do not allow putting all function parameters declaration onto the next line.
AllowAllParametersOfDeclarationOnNextLine: false
# Do not allow short blocks on a single line.
AllowShortBlocksOnASingleLine: Empty
# Do not allow short `case` labels on a single line.
AllowShortCaseLabelsOnASingleLine: false
# Do not allow short enumerations on a single line.
AllowShortEnumsOnASingleLine: false
# Do not allow short functions on a single line.
AllowShortFunctionsOnASingleLine: false
# Do not allow short `if` statements on a single line.
AllowShortIfStatementsOnASingleLine: false
# Do not allow short loops on a single line.
AllowShortLoopsOnASingleLine: false
# Treat curly braces as parentheses and do not insert space inside the braced list.
Cpp11BracedListStyle: false
# Merge multiple include blocks, sort and split based on category.
IncludeBlocks: Regroup
# Sort includes regardless of their case.
SortIncludes: CaseInsensitive
# Do not keep empty lines at the start of blocks.
KeepEmptyLinesAtTheStartOfBlocks: false
# Maximum number of consecutive empty lines to keep.
MaxEmptyLinesToKeep: 1
# Reflow comments exceeding column limit.
ReflowComments: true
# Insert trailing commas in multiline container literals.
#InsertTrailingCommas: Wrapped