-
Notifications
You must be signed in to change notification settings - Fork 9
/
uncrustify.cfg
347 lines (228 loc) · 12.1 KB
/
uncrustify.cfg
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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.4.3 (252)
#
# Alignment
# ---------
## Alignment
# Align on tabstop
align_on_tabstop = false # boolean (false/true)
# Align with tabs
align_with_tabs = false # boolean (false/true)
## Alignment Span
# Alignment span for #define bodies
align_pp_define_span = 8 # number
# Alignment span for ObjC message colons
align_oc_msg_colon_span = 1 # number
# Alignment span for ObjC message spec
align_oc_msg_spec_span = 0 # number
# Alignment span for equals in enums
align_enum_equ_span = 4 # number
# Alignment span for struct initializer values
align_struct_init_span = 4 # number
# Alignment span for trailing comments
align_right_cmt_span = 8 # number
## Gap
# Minimum gap for trailing comment
align_right_cmt_gap = 8 # number
# Blank Lines
# -----------
## Newline Count After
# Newline count after variable definition block
nl_func_var_def_blk = 1 # number
# The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
# Will not change the newline count if after a brace open.
# 0 = No change.
nl_before_access_spec = 2 # number
# Code-Modifying
# --------------
## Braces
# Braces around statments that span N newlines
mod_full_brace_nl = 3 # number
# Braces on single-line do statement
mod_full_brace_do = add # string (add/force/ignore/remove)
# Braces on single-line else statement
mod_full_brace_if = add # string (add/force/ignore/remove)
# Braces on single-line for statement
mod_full_brace_for = add # string (add/force/ignore/remove)
# Braces on single-line while statement
mod_full_brace_while = add # string (add/force/ignore/remove)
## Comments
# Add comment after ifdef/endif statement of size
mod_add_long_ifdef_endif_comment = 20 # number
## Parentheses
# Remove unnecessary parentheses on return statement
mod_paren_on_return = ignore # string (add/force/ignore/remove)
# Comments
# --------
## Other
# Stars on multi-line comments
cmt_star_cont = false # boolean (false/true)
# General
# -------
## Other
# Output tab size
output_tab_size = 4 # number
# Indentation
# -----------
## Indentation Size
# Indentation column size
indent_columns = 4 # number
# Indentation size between case and switch
indent_switch_case = 4 # number
## Other
# The continuation indent. If non-zero, this overrides the indent of '(' and '=' continuation indents.
# For FreeBSD, this is set to 4. Negative value is absolute and not increased for each ( level
indent_continue = 0 # number
# Align continued statements at equals
indent_align_assign = false # boolean (false/true)
# Indent goto labels
indent_label = 2 # number
# Indent with tabs
indent_with_tabs = 0 # number
# Whether the 'namespace' body is indented
indent_namespace = true # false/true
# Whether the 'extern "C"' body is indented
indent_extern = true # false/true
# Indent the code after an access specifier by one level.
# If set, this option forces 'indent_access_spec=0'
indent_access_spec_body = true # false/true
# Same as indent_func_call_param, but for function defs
indent_func_def_param = true # false/true
#
# Preprocessor options
#
# Control indent of preprocessors inside #if blocks at brace level 0
pp_indent = force # ignore/add/remove/force
# Whether to indent #if/#else/#endif at the brace level (true) or from column 1 (false)
pp_indent_at_level = true # false/true
# If pp_indent_at_level=false, specifies the number of columns to indent per level. Default=1.
pp_indent_count = 4 # number
# Newlines
# --------
## Newline Between
# Newline between close brace and else
nl_brace_else = force # string (add/force/ignore/remove)
# Newline between close brace and while
nl_brace_while = add # string (add/force/ignore/remove)
# Newline between do and open brace
nl_do_brace = add # string (add/force/ignore/remove)
# Newline between else and open brace
nl_else_brace = force # string (add/force/ignore/remove)
# Newline between enum and open brace
nl_enum_brace = add # string (add/force/ignore/remove)
# Newline between for and open brace
nl_for_brace = add # string (add/force/ignore/remove)
# Newline between function call and open brace
nl_fcall_brace = add # string (add/force/ignore/remove)
# Newline between function signature and open brace
nl_fdef_brace = add # string (add/force/ignore/remove)
# Newline between if and open brace
nl_if_brace = add # string (add/force/ignore/remove)
# Newline between struct and open brace
nl_struct_brace = add # string (add/force/ignore/remove)
# Newline between switch and open brace
nl_switch_brace = add # string (add/force/ignore/remove)
# Newline between union and open brace
nl_union_brace = add # string (add/force/ignore/remove)
# Newline between while and open brace
nl_while_brace = add # string (add/force/ignore/remove)
# Add or remove newline between return type and function name in a function definition
nl_func_type_name = remove # ignore/add/remove/force
# Add or remove newline between return type and function name inside a class {}
# Uses nl_func_type_name or nl_func_proto_type_name if set to ignore.
nl_func_type_name_class = remove # ignore/add/remove/force
# Whether to put a newline after brace open.
# This also adds a newline before the matching brace close.
nl_after_brace_open = false # false/true
# Spacing
# -------
## Space After
# Space after C++ comment opening
sp_cmt_cpp_start = add # string (add/force/ignore/remove)
# Space after ObjC block caret
sp_after_oc_block_caret = remove # string (add/force/ignore/remove)
# Space after ObjC colon
sp_after_oc_colon = remove # string (add/force/ignore/remove)
# Space after ObjC message colon
sp_after_send_oc_colon = remove # string (add/force/ignore/remove)
# Space after ObjC return type
sp_after_oc_return_type = force # string (add/force/ignore/remove)
# Space after ObjC scope
sp_after_oc_scope = force # string (add/force/ignore/remove)
# Space after ObjC type
sp_after_oc_type = remove # string (add/force/ignore/remove)
# Space after cast
sp_after_cast = add # string (add/force/ignore/remove)
# Space after class colon
sp_after_class_colon = force # string (add/force/ignore/remove)
# Space after comma
sp_after_comma = add # string (add/force/ignore/remove)
# Space after condition close parenthesis
sp_after_sparen = force # string (add/force/ignore/remove)
# Space after pointer star
sp_after_ptr_star = force # string (add/force/ignore/remove)
# Space after pointer star followed by function
sp_after_ptr_star_func = force # string (add/force/ignore/remove)
## Space Around
# Space around arithmetic operators
sp_arith = add # string (add/force/ignore/remove)
# Space around assignment operator
sp_assign = add # string (add/force/ignore/remove)
# Space around boolean operators
sp_bool = add # string (add/force/ignore/remove)
# Space around compare operators
sp_compare = add # string (add/force/ignore/remove)
# Space around ternary condition colon
sp_cond_colon = force # string (add/force/ignore/remove)
# Space around ternary condition question mark
sp_cond_question = force # string (add/force/ignore/remove)
## Space Before
# Space before ObjC block caret
sp_before_oc_block_caret = force # string (add/force/ignore/remove)
# Space before ObjC colon
sp_before_oc_colon = remove # string (add/force/ignore/remove)
# Space before ObjC message colon
sp_before_send_oc_colon = remove # string (add/force/ignore/remove)
# Space before case colon
sp_before_case_colon = remove # string (add/force/ignore/remove)
# Space before class colon
sp_before_class_colon = force # string (add/force/ignore/remove)
# Space before if/for/switch/while open parenthesis
sp_before_sparen = force # string (add/force/ignore/remove)
# Space before pointer star
sp_before_ptr_star = remove # string (add/force/ignore/remove)
# Space before pointer star followed by function
sp_before_ptr_star_func = remove # string (add/force/ignore/remove)
# Space before unnamed pointer star
sp_before_unnamed_ptr_star = ignore # string (add/force/ignore/remove)
## Space Between
# Space between @selector and open parenthesis
sp_after_oc_at_sel = remove # string (add/force/ignore/remove)
# Space between close brace and else
sp_brace_else = force # string (add/force/ignore/remove)
# Space between close parenthesis and open brace
sp_paren_brace = force # string (add/force/ignore/remove)
# Space between else and open brace
sp_else_brace = force # string (add/force/ignore/remove)
# Space between function name and open parenthesis
sp_func_call_paren = remove # string (add/force/ignore/remove)
# Space between function name and open parenthesis in declaration
sp_func_proto_paren = remove # string (add/force/ignore/remove)
# Space between function name and open parenthesis in function definition
sp_func_def_paren = remove # string (add/force/ignore/remove)
# Space between pointer stars
sp_between_ptr_star = remove # string (add/force/ignore/remove)
# Space between return and open parenthesis
sp_return_paren = add # string (add/force/ignore/remove)
# Space between sizeof and open parenthesis
sp_sizeof_paren = remove # string (add/force/ignore/remove)
## Space Inside
# Space inside braces
sp_inside_braces = add # string (add/force/ignore/remove)
# Space inside enum braces
sp_inside_braces_enum = add # string (add/force/ignore/remove)
# Space inside function parentheses
sp_inside_fparen = remove # string (add/force/ignore/remove)
# Space inside struct/union braces
sp_inside_braces_struct = add # string (add/force/ignore/remove)