-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
.uncrustify.cfg
317 lines (208 loc) · 11.5 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
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.4.3 (252)
#
# Code-Modifying
# --------------
## Braces
# 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)
## Parentheses
# Remove unnecessary parentheses on return statement
mod_paren_on_return = remove # string (add/force/ignore/remove)
# Comments
# --------
## Other
# Remove leading spaces from multi-line comments
cmt_multi_check_last = false # boolean (false/true)
# General
# -------
## Other
# Input tab size
input_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
# Align strings broken by backslash
indent_align_string = true # boolean (false/true)
# Indent with tabs
indent_with_tabs = 0 # number
# Line-Splitting
# --------------
## Splitting
# Code width
code_width = 100 # number
# Split long for statements at semicolons
ls_for_split_full = true # boolean (false/true)
# Split long function prototypes/calls at commas
ls_func_split_full = true # boolean (false/true)
# Newlines
# --------
## Newline Between
# Newline between assignment and open brace
nl_assign_brace = remove # string (add/force/ignore/remove)
# Newline between close brace and else
nl_brace_else = add # string (add/force/ignore/remove)
# Newline between close brace and while
nl_brace_while = remove # string (add/force/ignore/remove)
# Newline between do and open brace
nl_do_brace = remove # string (add/force/ignore/remove)
# Newline between else and open brace
nl_else_brace = remove # string (add/force/ignore/remove)
# Newline between enum and open brace
nl_enum_brace = remove # string (add/force/ignore/remove)
# Newline between for and open brace
nl_for_brace = remove # 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 = remove # string (add/force/ignore/remove)
# Newline between if and open brace
nl_if_brace = remove # string (add/force/ignore/remove)
# Newline between struct and open brace
nl_struct_brace = remove # string (add/force/ignore/remove)
# Newline between switch and open brace
nl_switch_brace = remove # string (add/force/ignore/remove)
# Newline between union and open brace
nl_union_brace = remove # string (add/force/ignore/remove)
# Newline between while and open brace
nl_while_brace = remove # string (add/force/ignore/remove)
## Other
# Newline count at end of file
nl_end_of_file_min = 1 # number
# Newlines at end of file
nl_end_of_file = add # string (add/force/ignore/remove)
# Newlines at start of file
nl_start_of_file = remove # string (add/force/ignore/remove)
# Spacing
# -------
## Space After
# Space after address-of operator
sp_addr = remove # string (add/force/ignore/remove)
# Space after cast
sp_after_cast = add # string (add/force/ignore/remove)
# Space after comma
sp_after_comma = add # string (add/force/ignore/remove)
# Space after dereference operator
sp_deref = remove # string (add/force/ignore/remove)
# Space after final semicolon in empty for statement
sp_after_semi_for_empty = remove # string (add/force/ignore/remove)
# Space after invert operator
sp_inv = remove # string (add/force/ignore/remove)
# Space after not operator
sp_not = remove # string (add/force/ignore/remove)
# Space after pointer star
sp_after_ptr_star = remove # string (add/force/ignore/remove)
# Space after pointer star followed by function
sp_after_ptr_star_func = remove # string (add/force/ignore/remove)
# Space after semicolon
sp_after_semi = add # string (add/force/ignore/remove)
# Space after semicolon in non-empty for statements
sp_after_semi_for = add # string (add/force/ignore/remove)
# Space after sign in assignment
sp_sign = remove # string (add/force/ignore/remove)
# Space after type
sp_after_type = add # 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 increment/decrement operators
sp_incdec = remove # string (add/force/ignore/remove)
# Space around member operators
sp_member = remove # string (add/force/ignore/remove)
# Space around preprocessor concatenation operator
sp_pp_concat = ignore # string (add/force/ignore/remove)
# Space around ternary condition colon
sp_cond_colon = add # string (add/force/ignore/remove)
# Space around ternary condition question mark
sp_cond_question = add # string (add/force/ignore/remove)
## Space Before
# Space before backslash-newline at end of line
sp_before_nl_cont = add # string (add/force/ignore/remove)
# Space before case colon
sp_before_case_colon = remove # string (add/force/ignore/remove)
# Space before comma
sp_before_comma = remove # 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 = add # string (add/force/ignore/remove)
# Space before semicolon
sp_before_semi = remove # string (add/force/ignore/remove)
# Space before semicolon in empty for statement
sp_before_semi_for_empty = remove # string (add/force/ignore/remove)
# Space before semicolon in for statements
sp_before_semi_for = remove # string (add/force/ignore/remove)
## Space Between
# Space between __attribute__ and open parenthesis
sp_attribute_paren = remove # string (add/force/ignore/remove)
# Space between close brace and else
sp_brace_else = remove # string (add/force/ignore/remove)
# Space between close brace and typedef name
sp_brace_typedef = force # string (add/force/ignore/remove)
# Space between closing parenthesis and open brace
sp_fparen_brace = add # string (add/force/ignore/remove)
# Space between defined and open parenthesis
sp_defined_paren = remove # 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 if/for/switch/while close parenthesis and open brace
sp_sparen_brace = force # string (add/force/ignore/remove)
# Space between macro and value
sp_macro = add # string (add/force/ignore/remove)
# Space between macro function close parenthesis and value
sp_macro_func = add # string (add/force/ignore/remove)
# Space between nested parentheses
sp_paren_paren = remove # string (add/force/ignore/remove)
# Space between pointer stars
sp_between_ptr_star = remove # string (add/force/ignore/remove)
# Space between preprocessor else and comment
sp_endif_cmt = add # string (add/force/ignore/remove)
# Space between return type and function name
sp_type_func = 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 cast parentheses
sp_inside_paren_cast = remove # string (add/force/ignore/remove)
# Space inside empty function parentheses
sp_inside_fparens = remove # 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 if-condition parentheses
sp_inside_sparen = remove # string (add/force/ignore/remove)
# Space inside non-empty square brackets
sp_inside_square = remove # string (add/force/ignore/remove)
# Space inside parentheses
sp_inside_paren = remove # string (add/force/ignore/remove)
# Space inside parentheses in function type
sp_inside_tparen = remove # string (add/force/ignore/remove)
# Space inside struct/union braces
sp_inside_braces_struct = add # string (add/force/ignore/remove)