-
Notifications
You must be signed in to change notification settings - Fork 236
/
.clang-format
234 lines (222 loc) · 6.17 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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: false
AlignEscapedNewlines: DontAlign
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLambdasOnASingleLine: Empty
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
BreakStringLiterals: false
ColumnLimit: 130
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: true
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
FixNamespaceComments: true
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeBlocks: Regroup
IndentCaseLabels: false
IncludeCategories:
- Regex: '^"(stdafx.h|pch.h|precomp.h)"$'
Priority: -1
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: '^BEGIN_COM_MAP$|^BEGIN_CONNECTION_POINT_MAP$|^BEGIN_HELPER_NODEMAP$|^BEGIN_MODULE$|^BEGIN_MSG_MAP$|^BEGIN_OBJECT_MAP$|^BEGIN_TEST_CLASS$|^BEGIN_TEST_METHOD$|^BEGIN_TEST_METHOD_PROPERTIES$'
MacroBlockEnd: '^END_COM_MAP$|^END_CONNECTION_POINT_MAP$|^END_HELPER_NODEMAP$|^END_MODULE$|^END_MSG_MAP$|^END_OBJECT_MAP$|^END_TEST_CLASS$|^END_TEST_METHOD$|^END_TEST_METHOD_PROPERTIES$'
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 2000
PenaltyExcessCharacter: 2
PenaltyReturnTypeOnItsOwnLine: 1000
PointerAlignment: Left
SortIncludes: false
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Latest
TabWidth: 4
UseTab: Never
AttributeMacros: [
CALLBACK,
]
StatementMacros: [
_Acquires_exclusive_lock_,
_Acquires_lock_,
_Acquires_nonreentrant_lock_,
_Acquires_shared_lock_,
_Analysis_assume_smart_lock_acquired_,
_Analysis_assume_smart_lock_released_,
_Create_lock_level_,
_Detaches_lock_,
_Function_class_,
_Global_cancel_spin_lock_,
_Global_critical_region_,
_Global_interlock_,
_Global_priority_region_,
_Has_lock_kind_,
_Has_lock_level_,
_IRQL_always_function_max_,
_IRQL_always_function_min_,
_IRQL_raises_,
_IRQL_requires_,
_IRQL_requires_max_,
_IRQL_requires_min_,
_IRQL_requires_same_,
_IRQL_restores_,
_IRQL_restores_global_,
_IRQL_saves_,
_IRQL_saves_global_,
_Lock_level_order_,
_Moves_lock_,
_Must_inspect_result_,
_No_competing_thread_,
_Post_same_lock_,
_Post_writable_byte_size_,
_Pre_satisfies_,
_Releases_exclusive_lock_,
_Releases_lock_,
_Releases_nonreentrant_lock_,
_Releases_shared_lock_,
_Replaces_lock_,
_Requires_exclusive_lock_held_,
_Requires_lock_held_,
_Requires_lock_not_held_,
_Requires_no_locks_held_,
_Requires_shared_lock_held_,
_Ret_maybenull_,
_Ret_range_,
_Struct_size_bytes_,
_Success_,
_Swaps_locks_,
_Use_decl_annotations_,
_When_,
DECLARE_ORDINAL_MAP,
DECLARE_PROCNAME_MAP,
DEFINE_ORDINAL_ENTRIES,
DEFINE_ORDINAL_ENTRIES_ALTNAME,
DEFINE_ORDINAL_ENTRIES_APISET,
DEFINE_ORDINAL_MAP,
DEFINE_PROCNAME_ENTRIES,
DEFINE_PROCNAME_ENTRIES_ALTNAME,
DEFINE_PROCNAME_ENTRIES_APISET,
DEFINE_PROCNAME_MAP,
DLOENTRY,
DLOENTRY_APISET,
DLPENTRY,
DLPENTRY_APISET,
RpcEndExcept,
ActivatableClass,
ActivatableClassWithFactory,
ActivatableClassWithFactoryEx,
ActivatableStaticOnlyFactory,
ActivatableStaticOnlyFactoryEx,
CoCreatableClass,
CoCreatableClassWithFactory,
CoCreatableClassWithFactoryEx,
# Additional definitions for the WIL repo
_Translates_NTSTATUS_to_HRESULT_,
_Translates_Win32_to_HRESULT_,
_Translates_last_error_to_HRESULT_,
TEST_CASE,
SECTION,
]
TypenameMacros: [
IFACEMETHOD,
STDMETHOD,
STDAPI_,
]
# Additional definitions for the WIL repo
WhitespaceSensitiveMacros: [
__WI_CLANG_DISABLE_WARNING,
]
# TODO: Only supported by clang-format version 17+
# Macros:
# - WI_NOEXCEPT=noexcept
# - __R_FN_PARAMS_FULL=int x
# - RESULT_NORETURN=[[noreturn]]
---
Language: CSharp
AlignAfterOpenBracket: AlwaysBreak
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
BeforeCatch: true
BeforeElse: true
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBraces: Custom
ColumnLimit: 130
DerivePointerAlignment: false
IndentWidth: 4
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 2000
PenaltyExcessCharacter: 2
PenaltyReturnTypeOnItsOwnLine: 1000
PointerAlignment: Left
TabWidth: 4
UseTab: Never
...