forked from NeutrinoCodes/Neutrino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuncrustify.cfg
243 lines (179 loc) · 9.11 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
# Add or remove space around arithmetic operators '+' and '-'.
#
# Overrides sp_arith.
sp_arith_additive = force # ignore/add/remove/force
# Add or remove space around assignment operator '=', '+=', etc.
sp_assign = force # ignore/add/remove/force
# Add or remove space between function name and '(' on function calls.
sp_func_call_paren = force # ignore/add/remove/force
# Add or remove space between function name and '(' on function definition.
sp_func_def_paren = force # ignore/add/remove/force
# Add or remove space between function name and '(' on function declaration.
sp_func_proto_paren = force # ignore/add/remove/force
# Add or remove space inside '(' and ')'.
sp_inside_paren = remove # ignore/add/remove/force
# Add or remove space around boolean operators '&&' and '||'.
sp_bool = force # ignore/add/remove/force
# Add or remove space around compare operator '<', '>', '==', etc.
sp_compare = force # ignore/add/remove/force
# Add or remove space before pointer star '*'.
sp_before_ptr_star = remove # ignore/add/remove/force
# Add or remove space after pointer star '*', if followed by a word.
sp_after_ptr_star = force # ignore/add/remove/force
# Add or remove space after reference sign '&', if followed by a word.
sp_after_byref = remove # ignore/add/remove/force
# Add or remove space before '(' of control statements ('if', 'for', 'switch',
# 'while', etc.).
sp_before_sparen = remove # ignore/add/remove/force
# Add or remove space around the '.' or '->' operators.
#
# Default: remove
# sp_member = add # ignore/add/remove/force
# The number of columns to indent per level. Usually 2, 3, 4, or 8.
#
# Default: 8
indent_columns = 2 # unsigned number
# If an open parenthesis is followed by a newline, whether to indent the next
# line so that it lines up after the open parenthesis (not recommended).
indent_paren_nl = true # true/false
# How to indent a close parenthesis after a newline.
#
# 0: Indent to body level (default)
# 1: Align under the open parenthesis
# 2: Indent to the brace level
indent_paren_close = 1 # unsigned number
# Whether to indent the open parenthesis of a function definition,
# if the parenthesis is on its own line.
indent_paren_after_func_def = false # true/false
# Whether braces are indented to the body level.
indent_braces = false # true/false
# Whether the 'class' body is indented.
indent_class = true # true/false
# Spaces to indent 'case' from 'switch'. Usually 0 or indent_columns.
indent_switch_case = 2 # unsigned number
# How to use tabs when indenting code.
#
# 0: Spaces only
# 1: Indent with tabs to brace level, align with spaces (default)
# 2: Indent and align with tabs, using spaces when not on a tabstop
#
# Default: 1
indent_with_tabs = 0 # unsigned number
# Add or remove newline between 'if' and '{'.
nl_if_brace = force # ignore/add/remove/force
# Add or remove newline after each ',' in a function declaration.
nl_func_decl_args = force # ignore/add/remove/force
# Add or remove newline after each ',' in a function definition.
nl_func_def_args = force # ignore/add/remove/force
# Add or remove newline after '(' in a function declaration.
nl_func_decl_start = force # ignore/add/remove/force
# Add or remove newline after '(' in a function definition.
nl_func_def_start = force # ignore/add/remove/force
# Overrides nl_func_decl_start when there is only one parameter.
nl_func_decl_start_single = ignore # ignore/add/remove/force
# Overrides nl_func_def_start when there is only one parameter.
nl_func_def_start_single = ignore # ignore/add/remove/force
# Add or remove newline before the ')' in a function declaration.
nl_func_decl_end = force # ignore/add/remove/force
# Add or remove newline before the ')' in a function definition.
nl_func_def_end = force # ignore/add/remove/force
# Overrides nl_func_decl_end when there is only one parameter.
nl_func_decl_end_single = force # ignore/add/remove/force
# Overrides nl_func_def_end when there is only one parameter.
nl_func_def_end_single = force # ignore/add/remove/force
# Whether to add a newline after '(' in a function declaration if '(' and ')'
# are in different lines. If false, nl_func_decl_start is used instead.
nl_func_decl_start_multi_line = true # true/false
# Whether to add a newline after '(' in a function definition if '(' and ')'
# are in different lines. If false, nl_func_def_start is used instead.
nl_func_def_start_multi_line = true # true/false
# Whether to add a newline before ')' in a function declaration if '(' and ')'
# are in different lines. If false, nl_func_decl_end is used instead.
nl_func_decl_end_multi_line = true # true/false
# Whether to add a newline before ')' in a function definition if '(' and ')'
# are in different lines. If false, nl_func_def_end is used instead.
nl_func_def_end_multi_line = true # true/false
# Whether to add a newline after '(' in a function call if '(' and ')' are in
# different lines.
nl_func_call_start_multi_line = true # true/false
# Whether to add a newline after each ',' in a function call if '(' and ')'
# are in different lines.
nl_func_call_args_multi_line = true # true/false
# Whether to add a newline before ')' in a function call if '(' and ')' are in
# different lines.
nl_func_call_end_multi_line = true # true/false
# Add or remove blank line before 'for'.
nl_before_for = add # ignore/add/remove/force
# Add or remove blank line after 'for' statement.
nl_after_for = add # ignore/add/remove/force
# Add or remove blank line before 'while'.
nl_before_while = add # ignore/add/remove/force
# Add or remove blank line after 'while' statement.
nl_after_while = add # ignore/add/remove/force
# Add or remove blank line before 'switch'.
nl_before_switch = add # ignore/add/remove/force
# Add or remove blank line after 'switch' statement.
nl_after_switch = add # ignore/add/remove/force
# Add or remove blank line before 'synchronized'.
nl_before_synchronized = add # ignore/add/remove/force
# Add or remove blank line after 'synchronized' statement.
nl_after_synchronized = add # ignore/add/remove/force
# Add or remove blank line before 'do'.
nl_before_do = add # ignore/add/remove/force
# Add or remove blank line after 'do/while' statement.
nl_after_do = add # ignore/add/remove/force
# Whether to align variable definitions in prototypes and functions.
align_func_params = true # true/false
# The number of newlines before a function prototype.
nl_before_func_body_proto = 2 # unsigned number
# The number of newlines after a function prototype.
nl_after_func_proto = 2 # unsigned number
# Newline count after function prototype group
nl_after_func_proto_group = 2 # number
# The span for aligning parameter definitions in function on parameter name.
#
# 0 = Don't align (default).
align_func_params_span = 10 # unsigned number
# The span for aligning variable definitions.
#
# 0 = Don't align (default).
align_var_def_span = 10 # unsigned number
# The span for aligning class member definitions.
#
# 0 = Don't align (default).
align_var_class_span = 10 # unsigned number
# The threshold for aligning class member definitions.
#
# 0 = No limit (default).
align_var_class_thresh = 0 # unsigned number
# The span for aligning on '=' in assignments.
#
# 0 = Don't align (default).
align_assign_span = 10 # unsigned number
# The threshold for aligning on '=' in assignments.
#
# 0 = No limit (default).
align_assign_thresh = 0 # unsigned number
# The span for aligning comments that end lines.
#
# 0 = Don't align (default).
align_right_cmt_span = 101 # unsigned number
# Minimum column at which to align trailing comments. Comments which are
# aligned beyond this column, but which can be aligned in a lesser column,
# may be "pulled in".
#
# 0 = Ignore (default).
align_right_cmt_at_col = 101 # unsigned number
# The span for aligning function prototypes.
#
# 0 = Don't align (default).
align_func_proto_span = 10 # unsigned number
# The span for aligning on '#define' bodies.
#
# =0: Don't align (default)
# >0: Number of lines (including comments) between blocks
align_pp_define_span = 10 # unsigned number
# Whether to indent the code between #if, #else and #endif.
pp_if_indent_code = true # true/false
# Try to limit code width to N columns.
code_width = 100 # unsigned number