5680
by charles
config file for `uncrustify' source code formatter |
1 |
# Uncrustify 0.47
|
2 |
#
|
|
3 |
# General options
|
|
4 |
#
|
|
5 |
||
6 |
newlines lf # { Auto, LF, CR, CRLF }
|
|
7 |
# The type of line endings
|
|
8 |
||
9 |
input_tab_size 4 # Number
|
|
10 |
# The original size of tabs in the input
|
|
11 |
||
12 |
output_tab_size 4 # Number
|
|
13 |
# The size of tabs in the output (only used if align_with_tabs=true)
|
|
14 |
||
15 |
string_escape_char 92 # Number
|
|
16 |
# The ascii value of the string escape char, usually 92 (\) or 94 (^). (Pawn)
|
|
17 |
||
18 |
string_escape_char2 0
|
|
19 |
# Alternate string escape char for Pawn. Only works right before the quote char.
|
|
20 |
||
21 |
#
|
|
22 |
# Indenting
|
|
23 |
#
|
|
24 |
||
25 |
indent_columns 4 # Number
|
|
26 |
# The number of columns to indent per level.
|
|
27 |
# Usually 2, 3, 4, or 8.
|
|
28 |
||
29 |
indent_with_tabs 0 # Number
|
|
30 |
# How to use tabs when indenting code
|
|
31 |
# 0=spaces only
|
|
32 |
# 1=indent with tabs, align with spaces
|
|
33 |
# 2=indent and align with tabs
|
|
34 |
||
35 |
indent_align_string True # { False, True }
|
|
36 |
# Whether to indent strings broken by '\' so that they line up
|
|
37 |
||
38 |
indent_xml_string 0 # Number
|
|
39 |
# The number of spaces to indent multi-line XML strings.
|
|
40 |
# Requires indent_align_string=True
|
|
41 |
||
42 |
indent_brace 0 # Number
|
|
43 |
# Spaces to indent '{' from level
|
|
44 |
||
45 |
indent_braces False # { False, True }
|
|
46 |
# Whether braces are indented to the body level
|
|
47 |
||
48 |
#indent_braces_no_func { False, True }
|
|
49 |
# Disabled indenting function braces if indent_braces is true
|
|
50 |
||
51 |
indent_brace_parent False # { False, True }
|
|
52 |
# Indent based on the size of the brace parent, ie 'if' => 3 spaces, 'for' => 4 spaces, etc.
|
|
53 |
||
54 |
#indent_namespace { False, True }
|
|
55 |
# Whether the 'namespace' body is indented
|
|
56 |
||
57 |
indent_extern False # { False, True }
|
|
58 |
# Whether the 'extern "C"' body is indented
|
|
59 |
||
60 |
#indent_class { False, True }
|
|
61 |
# Whether the 'class' body is indented
|
|
62 |
||
63 |
#indent_class_colon { False, True }
|
|
64 |
# Whether to indent the stuff after a leading class colon
|
|
65 |
||
66 |
indent_func_call_param False # { False, True }
|
|
67 |
# True: indent continued function call parameters one indent level
|
|
68 |
# False: align parameters under the open paren
|
|
69 |
||
70 |
indent_func_def_param False # { False, True }
|
|
71 |
# Same as indent_func_call_param, but for function defs
|
|
72 |
||
73 |
indent_func_proto_param False # { False, True }
|
|
74 |
# Same as indent_func_call_param, but for function protos
|
|
75 |
||
76 |
#indent_func_class_param False # { False, True }
|
|
77 |
# Same as indent_func_call_param, but for class declarations
|
|
78 |
#
|
|
79 |
#indent_func_ctor_var_param { False, True }
|
|
80 |
# Same as indent_func_call_param, but for class variable constructors
|
|
81 |
||
82 |
indent_func_param_double False # { False, True }
|
|
83 |
# Double the indent for indent_func_xxx_param options
|
|
84 |
||
85 |
indent_member 0 # Number
|
|
86 |
# The number of spaces to indent a continued '->' or '.'
|
|
87 |
# Usually set to 0, 1, or indent_columns.
|
|
88 |
||
89 |
#indent_sing_line_comments 3
|
|
90 |
# Spaces to indent single line ('//') comments on lines before code
|
|
91 |
#
|
|
92 |
#indent_relative_single_line_comments True # { False, True }
|
|
93 |
# If set, will indent trailing single line ('//') comments relative
|
|
94 |
# to the code instead of trying to keep the same absolute column
|
|
95 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
96 |
indent_switch_case 4 # Number
|
5680
by charles
config file for `uncrustify' source code formatter |
97 |
# Spaces to indent 'case' from 'switch'
|
98 |
# Usually 0 or indent_columns.
|
|
99 |
||
100 |
indent_case_shift 0
|
|
101 |
# Spaces to shift the 'case' line, without affecting any other lines
|
|
102 |
# Usually 0.
|
|
103 |
||
104 |
indent_case_brace 0
|
|
105 |
# Spaces to indent '{' from 'case'.
|
|
106 |
# By default, the brace will appear under the 'c' in case.
|
|
107 |
# Usually set to 0 or indent_columns.
|
|
108 |
||
109 |
indent_col1_comment False # { False, True }
|
|
110 |
# Whether to indent comments found in first column
|
|
111 |
||
112 |
indent_label 1 # Number
|
|
113 |
# How to indent goto labels
|
|
114 |
# >0 : absolute column where 1 is the leftmost column
|
|
115 |
# <=0 : subtract from brace indent
|
|
116 |
||
117 |
indent_access_spec 1 # Number
|
|
118 |
# Same as indent_label, but for access specifiers that are followed by a colon
|
|
119 |
||
120 |
indent_access_spec_body False # { False, True }
|
|
121 |
# Indent the code after an access specifier by one level.
|
|
122 |
# If set, this option forces 'indent_access_spec=0'
|
|
123 |
||
124 |
indent_paren_nl False # { False, True }
|
|
125 |
# If an open paren is followed by a newline, indent the next line so that it lines up after the open paren (not recommended)
|
|
126 |
||
127 |
indent_paren_close 1 # Number
|
|
128 |
# Controls the indent of a close paren after a newline.
|
|
129 |
# 0: Indent to body level
|
|
130 |
# 1: Align under the open paren
|
|
131 |
# 2: Indent to the brace level
|
|
132 |
||
133 |
indent_comma_paren False # { False, True }
|
|
134 |
# Controls the indent of a comma when inside a paren.If TRUE, aligns under the open paren
|
|
135 |
||
136 |
indent_bool_paren True # { False, True }
|
|
137 |
# Controls the indent of a BOOL operator when inside a paren.If TRUE, aligns under the open paren
|
|
138 |
||
139 |
indent_square_nl False # { False, True }
|
|
140 |
# If an open square is followed by a newline, indent the next line so that it lines up after the open square (not recommended)
|
|
141 |
||
142 |
#indent_preserve_sql { False, True }
|
|
143 |
# Don't change the relative indent of ESQL/C 'EXEC SQL' bodies
|
|
144 |
||
145 |
#
|
|
146 |
# Spacing options
|
|
147 |
#
|
|
148 |
||
149 |
sp_arith Add # { Ignore, Add, Remove, Force }
|
|
150 |
# Add or remove space around arithmetic operator '+', '-', '/', '*', etc
|
|
151 |
||
152 |
sp_assign Add # { Ignore, Add, Remove, Force }
|
|
153 |
# Add or remove space around assignment operator '=', '+=', etc
|
|
154 |
||
155 |
sp_enum_assign Add # { Ignore, Add, Remove, Force }
|
|
156 |
# Add or remove space around assignment '=' in enum
|
|
157 |
||
158 |
sp_bool Add # { Ignore, Add, Remove, Force }
|
|
159 |
# Add or remove space around boolean operators '&&' and '||'
|
|
160 |
||
161 |
sp_compare Add # { Ignore, Add, Remove, Force }
|
|
162 |
# Add or remove space around compare operator '<', '>', '==', etc
|
|
163 |
||
164 |
sp_inside_paren Add # { Ignore, Add, Remove, Force }
|
|
165 |
# Add or remove space inside '(' and ')'
|
|
166 |
||
167 |
sp_paren_paren Add # { Ignore, Add, Remove, Force }
|
|
168 |
# Add or remove space between nested parens
|
|
169 |
||
170 |
sp_balance_nested_parens True # { False, True }
|
|
171 |
# Whether to balance spaces inside nested parens
|
|
172 |
||
173 |
sp_paren_brace Add # { Ignore, Add, Remove, Force }
|
|
174 |
# Add or remove space between ')' and '{'
|
|
175 |
||
176 |
#sp_before_ptr_star Add # { Ignore, Add, Remove, Force }
|
|
177 |
# Add or remove space before pointer star '*'
|
|
178 |
||
179 |
#sp_before_unnamed_ptr_star Add # { Ignore, Add, Remove, Force }
|
|
180 |
# Add or remove space before pointer star '*' that isn't followed by a variable name
|
|
181 |
# If set to 'ignore', sp_before_ptr_star is used instead.
|
|
182 |
||
183 |
#sp_between_ptr_star Remove # { Ignore, Add, Remove, Force }
|
|
184 |
# Add or remove space between pointer stars '*'
|
|
185 |
||
186 |
#sp_after_ptr_star Add # { Ignore, Add, Remove, Force }
|
|
187 |
# Add or remove space after pointer star '*', if followed by a word.
|
|
188 |
||
189 |
sp_before_byref Add # { Ignore, Add, Remove, Force }
|
|
190 |
# Add or remove space before reference sign '&'
|
|
191 |
||
192 |
sp_before_unnamed_byref Add # { Ignore, Add, Remove, Force }
|
|
193 |
# Add or remove space before reference sign '&' that isn't followed by a variable name
|
|
194 |
# If set to 'ignore', sp_before_byref is used instead.
|
|
195 |
||
196 |
sp_after_byref Remove # { Ignore, Add, Remove, Force }
|
|
197 |
# Add or remove space after reference sign '&', if followed by a word.
|
|
198 |
||
199 |
sp_after_type Add # { Ignore, Add, Remove, Force }
|
|
200 |
# Add or remove space between type and word
|
|
201 |
||
202 |
#sp_before_angle Add # { Ignore, Add, Remove, Force }
|
|
203 |
# Add or remove space before '<>'
|
|
204 |
||
205 |
#sp_after_angle Add # { Ignore, Add, Remove, Force }
|
|
206 |
# Add or remove space after '<>'
|
|
207 |
||
208 |
#sp_angle_paren { Ignore, Add, Remove, Force }
|
|
209 |
# Add or remove space between '<>' and '(' as found in 'new List<byte>();'
|
|
210 |
#
|
|
211 |
#sp_angle_word { Ignore, Add, Remove, Force }
|
|
212 |
# Add or remove space between '<>' and a word as in 'List<byte> m;'
|
|
213 |
||
214 |
sp_before_sparen Remove # { Ignore, Add, Remove, Force }
|
|
215 |
# Add or remove space before '(' of 'if', 'for', 'switch', and 'while'
|
|
216 |
||
217 |
sp_inside_sparen Add # { Ignore, Add, Remove, Force }
|
|
218 |
# Add or remove space inside if-condition '(' and ')'
|
|
219 |
||
220 |
sp_after_sparen Remove # { Ignore, Add, Remove, Force }
|
|
221 |
# Add or remove space after ')' of 'if', 'for', 'switch', and 'while'
|
|
222 |
||
223 |
sp_sparen_brace Add # { Ignore, Add, Remove, Force }
|
|
224 |
# Add or remove space between ')' and '{' of 'if', 'for', 'switch', and 'while'
|
|
225 |
||
226 |
sp_special_semi Add # { Ignore, Add, Remove, Force }
|
|
227 |
# Add or remove space before empty statement ';' on 'if', 'for' and 'while'
|
|
228 |
||
229 |
sp_before_semi Remove # { Ignore, Add, Remove, Force }
|
|
230 |
# Add or remove space before ';'
|
|
231 |
||
232 |
sp_before_semi_for Remove # { Ignore, Add, Remove, Force }
|
|
233 |
# Add or remove space before ';' in non-empty 'for' statements
|
|
234 |
||
235 |
sp_before_semi_for_empty Add # { Ignore, Add, Remove, Force }
|
|
236 |
# Add or remove space before a semicolon of an empty part of a for statment.
|
|
237 |
||
238 |
sp_after_semi_for_empty Add # { Ignore, Add, Remove, Force }
|
|
239 |
# Add or remove space after the final semicolon of an empty part of a for statment: for ( ; ; <here> ).
|
|
240 |
||
241 |
sp_before_square Remove # { Ignore, Add, Remove, Force }
|
|
242 |
# Add or remove space before '[' (except '[]')
|
|
243 |
||
244 |
sp_before_squares Remove # { Ignore, Add, Remove, Force }
|
|
245 |
# Add or remove space before '[]'
|
|
246 |
||
247 |
sp_inside_square Remove # { Ignore, Add, Remove, Force }
|
|
248 |
# Add or remove space inside '[' and ']'
|
|
249 |
||
250 |
sp_after_comma Add # { Ignore, Add, Remove, Force }
|
|
251 |
# Add or remove space after ','
|
|
252 |
||
253 |
sp_before_comma Remove # { Ignore, Add, Remove, Force }
|
|
254 |
# Add or remove space before ','
|
|
255 |
||
256 |
#sp_after_class_colon { Ignore, Add, Remove, Force }
|
|
257 |
# Add or remove space after class ':'
|
|
258 |
#
|
|
259 |
#sp_before_class_colon { Ignore, Add, Remove, Force }
|
|
260 |
# Add or remove space before class ':'
|
|
261 |
#
|
|
262 |
#sp_after_operator { Ignore, Add, Remove, Force }
|
|
263 |
# Add or remove space between 'operator' and operator sign
|
|
264 |
||
265 |
sp_after_cast Ignore # { Ignore, Add, Remove, Force }
|
|
266 |
# Add or remove space after cast
|
|
267 |
||
268 |
sp_inside_paren_cast Ignore # { Ignore, Add, Remove, Force }
|
|
269 |
# Add or remove spaces inside cast parens
|
|
270 |
||
271 |
sp_sizeof_paren Ignore # { Ignore, Add, Remove, Force }
|
|
272 |
# Add or remove space between 'sizeof' and '('
|
|
273 |
||
274 |
#sp_after_tag { Ignore, Add, Remove, Force }
|
|
275 |
# Add or remove space after the tag keyword (Pawn)
|
|
276 |
||
277 |
#sp_inside_braces_enum Ignore # { Ignore, Add, Remove, Force }
|
|
278 |
# Add or remove space inside enum '{' and '}'
|
|
279 |
#
|
|
280 |
#sp_inside_braces_struct { Ignore, Add, Remove, Force }
|
|
281 |
# Add or remove space inside struct/union '{' and '}'
|
|
282 |
#
|
|
283 |
#sp_inside_braces { Ignore, Add, Remove, Force }
|
|
284 |
# Add or remove space inside '{' and '}'
|
|
285 |
#
|
|
286 |
#sp_inside_braces_empty { Ignore, Add, Remove, Force }
|
|
287 |
# Add or remove space inside '{}'
|
|
288 |
#
|
|
289 |
#sp_inside_angle { Ignore, Add, Remove, Force }
|
|
290 |
# Add or remove space inside '<' and '>'
|
|
291 |
#
|
|
292 |
#sp_type_func { Ignore, Add, Remove, Force }
|
|
293 |
# Add or remove space between return type and function name
|
|
294 |
# A minimum of 1 is forced except for pointer return types.
|
|
295 |
||
296 |
sp_func_proto_paren Remove # { Ignore, Add, Remove, Force }
|
|
297 |
# Add or remove space between function name and '(' on function declaration
|
|
298 |
||
299 |
sp_func_def_paren Remove { Ignore, Add, Remove, Force }
|
|
300 |
# Add or remove space between function name and '(' on function definition
|
|
301 |
||
302 |
sp_inside_fparens Add # { Ignore, Add, Remove, Force }
|
|
303 |
# Add or remove space inside empty function '()'
|
|
304 |
||
305 |
sp_inside_fparen Add # { Ignore, Add, Remove, Force }
|
|
306 |
# Add or remove space inside function '(' and ')'
|
|
307 |
||
308 |
#sp_square_fparen { Ignore, Add, Remove, Force }
|
|
309 |
# Add or remove space between ']' and '(' when part of a function call.
|
|
310 |
#
|
|
311 |
#sp_fparen_brace { Ignore, Add, Remove, Force }
|
|
312 |
# Add or remove space between ')' and '{' of function
|
|
313 |
||
314 |
#sp_func_call_paren { Ignore, Add, Remove, Force }
|
|
315 |
# Add or remove space between function name and '(' on function calls
|
|
316 |
#
|
|
317 |
#sp_func_class_paren { Ignore, Add, Remove, Force }
|
|
318 |
# Add or remove space between a constructor/destructor and the open paren
|
|
319 |
||
320 |
sp_return_paren Add # { Ignore, Add, Remove, Force }
|
|
321 |
# Add or remove space between 'return' and '('
|
|
322 |
||
323 |
sp_attribute_paren Add # { Ignore, Add, Remove, Force }
|
|
324 |
# Add or remove space between '__attribute__' and '('
|
|
325 |
||
326 |
#sp_macro { Ignore, Add, Remove, Force }
|
|
327 |
# Add or remove space between macro and value
|
|
328 |
#
|
|
329 |
#sp_macro_func { Ignore, Add, Remove, Force }
|
|
330 |
# Add or remove space between macro function ')' and value
|
|
331 |
||
332 |
sp_else_brace Add # { Ignore, Add, Remove, Force }
|
|
333 |
# Add or remove space between 'else' and '{' if on the same line
|
|
334 |
||
335 |
sp_brace_else Add # { Ignore, Add, Remove, Force }
|
|
336 |
# Add or remove space between '}' and 'else' if on the same line
|
|
337 |
||
338 |
#sp_catch_brace { Ignore, Add, Remove, Force }
|
|
339 |
# Add or remove space between 'catch' and '{' if on the same line
|
|
340 |
#
|
|
341 |
#sp_brace_catch { Ignore, Add, Remove, Force }
|
|
342 |
# Add or remove space between '}' and 'catch' if on the same line
|
|
343 |
#
|
|
344 |
#sp_finally_brace { Ignore, Add, Remove, Force }
|
|
345 |
# Add or remove space between 'finally' and '{' if on the same line
|
|
346 |
#
|
|
347 |
#sp_brace_finally { Ignore, Add, Remove, Force }
|
|
348 |
# Add or remove space between '}' and 'finally' if on the same line
|
|
349 |
#
|
|
350 |
#sp_try_brace { Ignore, Add, Remove, Force }
|
|
351 |
# Add or remove space between 'try' and '{' if on the same line
|
|
352 |
#
|
|
353 |
#sp_getset_brace { Ignore, Add, Remove, Force }
|
|
354 |
# Add or remove space between get/set and '{' if on the same line
|
|
355 |
#
|
|
356 |
#sp_before_dc { Ignore, Add, Remove, Force }
|
|
357 |
# Add or remove space before the '::' operator
|
|
358 |
#
|
|
359 |
#sp_after_dc { Ignore, Add, Remove, Force }
|
|
360 |
# Add or remove space after the '::' operator
|
|
361 |
#
|
|
362 |
#sp_d_array_colon { Ignore, Add, Remove, Force }
|
|
363 |
# Add or remove around the D named array initializer ':' operator
|
|
364 |
||
365 |
sp_not Remove # { Ignore, Add, Remove, Force }
|
|
366 |
# Add or remove space after the '!' (not) operator.
|
|
367 |
||
368 |
sp_inv Remove # { Ignore, Add, Remove, Force }
|
|
369 |
# Add or remove space after the '~' (invert) operator.
|
|
370 |
||
371 |
sp_addr Remove # { Ignore, Add, Remove, Force }
|
|
372 |
# Add or remove space after the '&' (address-of) operator.
|
|
373 |
# This does not affect the spacing after a '&' that is part of a type.
|
|
374 |
||
375 |
sp_member Remove # { Ignore, Add, Remove, Force }
|
|
376 |
# Add or remove space around the '.' or '->' operators
|
|
377 |
||
378 |
||
379 |
sp_deref Remove # { Ignore, Add, Remove, Force }
|
|
380 |
# Add or remove space after the '*' (dereference) operator.
|
|
381 |
# This does not affect the spacing after a '*' that is part of a type.
|
|
382 |
||
383 |
sp_sign Remove # { Ignore, Add, Remove, Force }
|
|
384 |
# Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'
|
|
385 |
||
386 |
sp_incdec Remove # { Ignore, Add, Remove, Force }
|
|
387 |
# Add or remove space before or after '++' and '--', as in '(--x)' or 'y++;'
|
|
388 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
389 |
#sp_after_oc_scope { Ignore, Add, Remove, Force }
|
390 |
# Add or remove space after the scope '+' or '-', as in '-(void) foo;' or '+(int) bar;'
|
|
391 |
#
|
|
392 |
#sp_before_oc_colon { Ignore, Add, Remove, Force }
|
|
393 |
# Add or remove space after the colon in message specs
|
|
394 |
# '-(int) f: (int) x;' vs '+(int) f : (int) x;'
|
|
395 |
#
|
|
396 |
#sp_after_oc_type { Ignore, Add, Remove, Force }
|
|
397 |
# Add or remove space after the (type) in message specs
|
|
398 |
# '-(int) f: (int) x;' vs '+(int)f : (int)x;'
|
|
5680
by charles
config file for `uncrustify' source code formatter |
399 |
|
400 |
#
|
|
401 |
# Code alignment (not left column spaces/tabs)
|
|
402 |
#
|
|
403 |
||
404 |
align_keep_tabs False # { False, True }
|
|
405 |
# Whether to keep non-indenting tabs
|
|
406 |
||
407 |
align_with_tabs False # { False, True }
|
|
408 |
# Whether to use tabs for alinging
|
|
409 |
||
410 |
align_on_tabstop False # { False, True }
|
|
411 |
# Whether to bump out to the next tab when aligning
|
|
412 |
||
413 |
align_number_left True # { False, True }
|
|
414 |
# Whether to left-align numbers
|
|
415 |
||
416 |
align_func_params True # { False, True }
|
|
417 |
# Align variable definitions in prototypes and functions
|
|
418 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
419 |
align_var_def_span 10 # Number
|
5680
by charles
config file for `uncrustify' source code formatter |
420 |
# The span for aligning variable definitions (0=don't align)
|
421 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
422 |
align_var_def_star_style 0 # Number
|
5680
by charles
config file for `uncrustify' source code formatter |
423 |
# How to align the star in variable definitions.
|
424 |
# 0=Part of the type
|
|
425 |
# 1=Part of the variable
|
|
426 |
# 2=Dangling
|
|
427 |
#
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
428 |
align_var_def_amp_style 0 # Number
|
5680
by charles
config file for `uncrustify' source code formatter |
429 |
# How to align the '&' in variable definitions.
|
430 |
# 0=Part of the type
|
|
431 |
# 1=Part of the variable
|
|
432 |
# 2=Dangling
|
|
433 |
#
|
|
434 |
#align_var_def_thresh 0 # Number
|
|
435 |
# The threshold for aligning variable definitions (0=no limit)
|
|
436 |
#
|
|
437 |
#align_var_def_gap 4 # Number
|
|
438 |
# The gap for aligning variable definitions
|
|
439 |
#
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
440 |
align_var_def_colon True # { False, True }
|
5680
by charles
config file for `uncrustify' source code formatter |
441 |
# Whether to align the colon in struct bit fields
|
442 |
#
|
|
443 |
#align_var_def_inline True # { False, True }
|
|
444 |
# Whether to align inline struct/enum/union variable definitions
|
|
445 |
||
446 |
align_assign_span 0 # Number
|
|
447 |
# The span for aligning on '=' in assignments (0=don't align)
|
|
448 |
||
449 |
align_assign_thresh 0 # Number
|
|
450 |
# The threshold for aligning on '=' in assignments (0=no limit)
|
|
451 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
452 |
align_enum_equ_span 0 # Number
|
5680
by charles
config file for `uncrustify' source code formatter |
453 |
# The span for aligning on '=' in enums (0=don't align)
|
454 |
||
455 |
align_enum_equ_thresh 0 # Number
|
|
456 |
# The threshold for aligning on '=' in enums (0=no limit)
|
|
457 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
458 |
align_var_struct_span 2 # Number
|
5680
by charles
config file for `uncrustify' source code formatter |
459 |
# The span for aligning struct/union (0=don't align)
|
460 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
461 |
align_var_struct_thresh 50 # Number
|
5680
by charles
config file for `uncrustify' source code formatter |
462 |
# The threshold for aligning struct/union member definitions (0=no limit)
|
463 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
464 |
align_var_struct_gap 4 # Number
|
5680
by charles
config file for `uncrustify' source code formatter |
465 |
# The gap for aligning struct/union member definitions
|
466 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
467 |
align_struct_init_span 4
|
5680
by charles
config file for `uncrustify' source code formatter |
468 |
# The span for aligning struct initializer values (0=don't align)
|
469 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
470 |
#align_typedef_gap Number
|
5680
by charles
config file for `uncrustify' source code formatter |
471 |
# The minimum space between the type and the synonym of a typedef
|
472 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
473 |
#align_typedef_span Number
|
5680
by charles
config file for `uncrustify' source code formatter |
474 |
# The span for aligning single-line typedefs (0=don't align)
|
475 |
||
476 |
align_typedef_func 0 # Number
|
|
477 |
# How to align typedef'd functions with other typedefs
|
|
478 |
# 0: Don't mix them at all
|
|
479 |
# 1: align the open paren with the types
|
|
480 |
# 2: align the function type name with the other type names
|
|
481 |
||
482 |
align_typedef_star_style 2 # Number
|
|
483 |
# Controls the positioning of the '*' in typedefs. Just try it.
|
|
484 |
# 0: Align on typdef type, ignore '*'
|
|
485 |
# 1: The '*' is part of type name: typedef int *pint;
|
|
486 |
# 2: The '*' is part of the type, but dangling: typedef int *pint;
|
|
487 |
||
488 |
align_typedef_amp_style 2 # Number
|
|
489 |
# Controls the positioning of the '&' in typedefs. Just try it.
|
|
490 |
# 0: Align on typdef type, ignore '&'
|
|
491 |
# 1: The '&' is part of type name: typedef int &pint;
|
|
492 |
# 2: The '&' is part of the type, but dangling: typedef int &pint;
|
|
493 |
||
494 |
align_right_cmt_span 0 # Number
|
|
495 |
# The span for aligning comments that end lines (0=don't align)
|
|
496 |
||
497 |
#align_right_cmt_mix { False, True }
|
|
498 |
# If aligning comments, mix with comments after '}' and #endif with less than 3 spaces before the comment
|
|
499 |
||
500 |
align_func_proto_span 20 # Number
|
|
501 |
# The span for aligning function prototypes (0=don't align)
|
|
502 |
||
503 |
align_func_proto_gap 2 # Number
|
|
504 |
# Minimum gap between the return type and the function name.
|
|
505 |
||
506 |
align_mix_var_proto True # { False, True }
|
|
507 |
# Whether to mix aligning prototype and variable declarations.
|
|
508 |
# If true, align_var_def_XXX options are used instead of align_func_proto_XXX options.
|
|
509 |
#
|
|
510 |
#align_single_line_func { False, True }
|
|
511 |
# Align single-line functions with function prototypes, uses align_func_proto_span
|
|
512 |
#
|
|
513 |
#align_single_line_brace { False, True }
|
|
514 |
# Aligning the open brace of single-line functions.
|
|
515 |
# Requires align_single_line_func=true, uses align_func_proto_span
|
|
516 |
#
|
|
517 |
#align_single_line_brace_gap Number
|
|
518 |
# Gap for align_single_line_brace.
|
|
519 |
||
520 |
||
521 |
#align_oc_msg_spec_span Number
|
|
522 |
# The span for aligning ObjC msg spec (0=don't align)
|
|
523 |
#
|
|
524 |
#align_nl_cont { False, True }
|
|
525 |
# Whether to align macros wrapped with a backslash and a newline.
|
|
526 |
# This will not work right if the macro contains a multi-line comment.
|
|
527 |
#
|
|
528 |
#align_pp_define_gap Number
|
|
529 |
# The minimum space between label and value of a preprocessor define
|
|
530 |
#
|
|
531 |
#align_pp_define_span Number
|
|
532 |
# The span for aligning on '#define' bodies (0=don't align)
|
|
533 |
||
534 |
#
|
|
535 |
# Newline adding and removing options
|
|
536 |
#
|
|
537 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
538 |
nl_collapse_empty_body True # { False, True }
|
539 |
# Whether to collapse empty blocks between '{' and '}'
|
|
540 |
||
541 |
nl_assign_leave_one_liners True # { False, True }
|
|
542 |
# Don't split one-line braced assignments - 'foo_t f = { 1, 2 };'
|
|
543 |
||
544 |
#nl_class_leave_one_liners { False, True }
|
|
545 |
# Don't split one-line braced statements inside a class xx { } body
|
|
546 |
||
547 |
nl_enum_leave_one_liners True # { False, True }
|
|
548 |
# Don't split one-line enums: 'enum foo { BAR = 15 };'
|
|
549 |
||
550 |
nl_getset_leave_one_liners True # { False, True }
|
|
551 |
# Don't split one-line get or set functions
|
|
552 |
||
553 |
nl_func_leave_one_liners True # { False, True }
|
|
554 |
# Don't split one-line function definitions - 'int foo() { return 0; }'
|
|
555 |
||
556 |
nl_if_leave_one_liners True # { False, True }
|
|
557 |
# Don't split one-line if/else statements - 'if(a) b++;'
|
|
558 |
||
559 |
nl_start_of_file Remove # { Ignore, Add, Remove, Force }
|
|
5680
by charles
config file for `uncrustify' source code formatter |
560 |
# Add or remove newlines at the start of the file
|
561 |
||
562 |
#nl_start_of_file_min Number
|
|
563 |
# The number of newlines at the start of the file (only used if nl_start_of_file is 'add' or 'force'
|
|
564 |
||
565 |
nl_end_of_file Add # { Ignore, Add, Remove, Force }
|
|
566 |
# Add or remove newline at the end of the file
|
|
567 |
||
568 |
nl_end_of_file_min 1 # Number
|
|
569 |
# The number of newlines at the end of the file (only used if nl_end_of_file is 'add' or 'force')
|
|
570 |
||
571 |
nl_assign_brace Ignore # { Ignore, Add, Remove, Force }
|
|
572 |
# Add or remove newline between '=' and '{'
|
|
573 |
||
574 |
#nl_assign_square { Ignore, Add, Remove, Force }
|
|
575 |
# Add or remove newline between '=' and '[' (D only)
|
|
576 |
#
|
|
577 |
#nl_after_square_assign { Ignore, Add, Remove, Force }
|
|
578 |
# Add or remove newline after '= [' (D only). Will also affect the newline before the ']'
|
|
579 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
580 |
nl_func_var_def_blk 1 # Number
|
581 |
# The number of newlines after a block of variable definitions
|
|
5680
by charles
config file for `uncrustify' source code formatter |
582 |
|
583 |
#nl_fcall_brace { Ignore, Add, Remove, Force }
|
|
584 |
# Add or remove newline between a function call's ')' and '{', as in:
|
|
585 |
# list_for_each(item, &list) { }
|
|
586 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
587 |
nl_enum_brace Force # { Ignore, Add, Remove, Force }
|
5680
by charles
config file for `uncrustify' source code formatter |
588 |
# Add or remove newline between 'enum' and '{'
|
589 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
590 |
nl_struct_brace Force # { Ignore, Add, Remove, Force }
|
5680
by charles
config file for `uncrustify' source code formatter |
591 |
# Add or remove newline between 'struct and '{'
|
592 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
593 |
nl_union_brace Force # { Ignore, Add, Remove, Force }
|
5680
by charles
config file for `uncrustify' source code formatter |
594 |
# Add or remove newline between 'union' and '{'
|
595 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
596 |
nl_if_brace Force # { Ignore, Add, Remove, Force }
|
5680
by charles
config file for `uncrustify' source code formatter |
597 |
# Add or remove newline between 'if' and '{'
|
598 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
599 |
nl_brace_else Force # { Ignore, Add, Remove, Force }
|
5680
by charles
config file for `uncrustify' source code formatter |
600 |
# Add or remove newline between '}' and 'else'
|
601 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
602 |
nl_elseif_brace Force # { Ignore, Add, Remove, Force }
|
603 |
# Add or remove newline between 'else if' and '{'
|
|
604 |
# If set to ignore, nl_if_brace is used instead
|
|
5680
by charles
config file for `uncrustify' source code formatter |
605 |
|
606 |
nl_else_brace Add # { Ignore, Add, Remove, Force }
|
|
607 |
# Add or remove newline between 'else' and '{'
|
|
608 |
||
609 |
#nl_brace_finally { Ignore, Add, Remove, Force }
|
|
610 |
# Add or remove newline between '}' and 'finally'
|
|
611 |
#
|
|
612 |
#nl_finally_brace { Ignore, Add, Remove, Force }
|
|
613 |
# Add or remove newline between 'finally' and '{'
|
|
614 |
#
|
|
615 |
#nl_try_brace { Ignore, Add, Remove, Force }
|
|
616 |
# Add or remove newline between 'try' and '{'
|
|
617 |
#
|
|
618 |
#nl_getset_brace { Ignore, Add, Remove, Force }
|
|
619 |
# Add or remove newline between get/set and '{'
|
|
620 |
#
|
|
5682
by charles
run libT, cli, daemon, gtk through the source-code formatter "uncrustify" as promised/threatened |
621 |
nl_for_brace Force # { Ignore, Add, Remove, Force }
|
5680
by charles
config file for `uncrustify' source code formatter |
622 |
# Add or remove newline between 'for' and '{'
|
623 |
#
|
|
624 |
#nl_catch_brace { Ignore, Add, Remove, Force }
|
|
625 |
# Add or remove newline between 'catch' and '{'
|
|
626 |
#
|
|
627 |
#nl_brace_catch { Ignore, Add, Remove, Force }
|
|
628 |
# Add or remove newline between '}' and 'catch'
|
|
629 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
630 |
nl_while_brace Force # { Ignore, Add, Remove, Force }
|
631 |
# Add or remove newline between 'while' and '{'
|
|
632 |
||
633 |
nl_do_brace Force # { Ignore, Add, Remove, Force }
|
|
634 |
# Add or remove newline between 'do' and '{'
|
|
635 |
||
636 |
nl_brace_while Force # { Ignore, Add, Remove, Force }
|
|
637 |
# Add or remove newline between '}' and 'while' of 'do' statement
|
|
638 |
||
639 |
nl_switch_brace Force { Ignore, Add, Remove, Force }
|
|
5680
by charles
config file for `uncrustify' source code formatter |
640 |
# Add or remove newline between 'switch' and '{'
|
641 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
642 |
#nl_multi_line_cond { False, True }
|
643 |
# Add or remove newline when condition spans two or more lines
|
|
644 |
||
645 |
nl_multi_line_define True # { False, True }
|
|
646 |
# Force a newline in a define after the macro name for multi-line defines.
|
|
647 |
||
648 |
nl_before_case True # { False, True }
|
|
649 |
# Whether to put a newline before 'case' statement
|
|
650 |
||
651 |
#nl_before_throw { Ignore, Add, Remove, Force }
|
|
652 |
# Add or remove newline between ')' and 'throw'
|
|
653 |
||
654 |
nl_after_case True # { False, True }
|
|
655 |
# Whether to put a newline after 'case' statement
|
|
5680
by charles
config file for `uncrustify' source code formatter |
656 |
|
657 |
#nl_namespace_brace { Ignore, Add, Remove, Force }
|
|
658 |
# Newline between namespace and {
|
|
659 |
#
|
|
660 |
#nl_template_class { Ignore, Add, Remove, Force }
|
|
661 |
# Add or remove newline between 'template<>' and 'class'
|
|
662 |
#
|
|
663 |
#nl_class_brace { Ignore, Add, Remove, Force }
|
|
664 |
# Add or remove newline between 'class' and '{'
|
|
665 |
#
|
|
666 |
#nl_class_init_args { Ignore, Add, Remove, Force }
|
|
667 |
# Add or remove newline after each ',' in the constructor member initialization
|
|
668 |
||
669 |
nl_func_type_name Add # { Ignore, Add, Remove, Force }
|
|
670 |
# Add or remove newline between return type and function name in definition
|
|
671 |
||
672 |
nl_func_proto_type_name Remove # { Ignore, Add, Remove, Force }
|
|
673 |
# Add or remove newline between return type and function name in a prototype
|
|
674 |
||
675 |
nl_func_paren Remove # { Ignore, Add, Remove, Force }
|
|
676 |
# Add or remove newline between a function name and the opening '('
|
|
677 |
||
678 |
nl_func_decl_start Remove # { Ignore, Add, Remove, Force }
|
|
679 |
# Add or remove newline after '(' in a function declaration
|
|
680 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
681 |
nl_func_decl_args Force # { Ignore, Add, Remove, Force }
|
5680
by charles
config file for `uncrustify' source code formatter |
682 |
# Add or remove newline after each ',' in a function declaration
|
683 |
||
684 |
nl_func_decl_end Remove # { Ignore, Add, Remove, Force }
|
|
685 |
# Add or remove newline before the ')' in a function declaration
|
|
686 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
687 |
nl_fdef_brace Force # { Ignore, Add, Remove, Force }
|
5680
by charles
config file for `uncrustify' source code formatter |
688 |
# Add or remove newline between function signature and '{'
|
689 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
690 |
nl_after_return False # { False, True }
|
5680
by charles
config file for `uncrustify' source code formatter |
691 |
# Whether to put a newline after 'return' statement
|
692 |
||
693 |
#nl_after_semicolon { False, True }
|
|
694 |
# Whether to put a newline after semicolons, except in 'for' statements
|
|
695 |
||
696 |
#nl_after_brace_open { False, True }
|
|
697 |
# Whether to put a newline after brace open.
|
|
698 |
# This also adds a newline before the matching brace close.
|
|
699 |
#
|
|
700 |
#nl_after_brace_open_cmt { False, True }
|
|
701 |
# If nl_after_brace_open and nl_after_brace_open_cmt are true, a newline is
|
|
702 |
# placed between the open brace and a trailing single-line comment.
|
|
703 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
704 |
#nl_after_vbrace_open { False, True }
|
705 |
# Whether to put a newline after a virtual brace open.
|
|
706 |
# These occur in un-braced if/while/do/for statement bodies.
|
|
5680
by charles
config file for `uncrustify' source code formatter |
707 |
|
708 |
nl_define_macro False # { False, True }
|
|
709 |
# Whether to alter newlines in '#define' macros
|
|
710 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
711 |
#nl_squeeze_ifdef { False, True }
|
712 |
# Whether to not put blanks after '#ifxx', '#elxx', or before '#endif'
|
|
713 |
||
714 |
nl_before_if Ignore # { Ignore, Add, Remove, Force }
|
|
715 |
# Add or remove newline before 'if'
|
|
716 |
||
717 |
nl_after_if Ignore # { Ignore, Add, Remove, Force }
|
|
718 |
# Add or remove newline after 'if'
|
|
719 |
||
720 |
nl_before_for Ignore # { Ignore, Add, Remove, Force }
|
|
721 |
# Add or remove newline before 'for'
|
|
722 |
||
723 |
nl_after_for Ignore # { Ignore, Add, Remove, Force }
|
|
724 |
# Add or remove newline after 'for'
|
|
725 |
||
726 |
nl_before_while Ignore # { Ignore, Add, Remove, Force }
|
|
727 |
# Add or remove newline before 'while'
|
|
5680
by charles
config file for `uncrustify' source code formatter |
728 |
|
729 |
nl_after_while Add # { Ignore, Add, Remove, Force }
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
730 |
# Add or remove newline after 'while'
|
5680
by charles
config file for `uncrustify' source code formatter |
731 |
|
732 |
#nl_before_switch Ignore # { Ignore, Add, Remove, Force }
|
|
733 |
# Add or remove newline before 'switch'
|
|
734 |
#
|
|
735 |
#nl_after_switch Force # { Ignore, Add, Remove, Force }
|
|
736 |
# Add or remove newline after 'switch'
|
|
737 |
||
738 |
nl_before_do Ignore # { Ignore, Add, Remove, Force }
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
739 |
# Add or remove newline before 'do'
|
5680
by charles
config file for `uncrustify' source code formatter |
740 |
|
741 |
nl_after_do Force # { Ignore, Add, Remove, Force }
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
742 |
# Add or remove newline after 'do'
|
5680
by charles
config file for `uncrustify' source code formatter |
743 |
|
744 |
nl_ds_struct_enum_cmt False # { False, True }
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
745 |
# Whether to double-space commented-entries in struct/enum
|
5680
by charles
config file for `uncrustify' source code formatter |
746 |
|
747 |
nl_ds_struct_enum_close_brace False # { False, True }
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
748 |
# Whether to double-space before the close brace of a struct/union/enum
|
5680
by charles
config file for `uncrustify' source code formatter |
749 |
|
750 |
#nl_class_colon Ignore # { Ignore, Add, Remove, Force }
|
|
751 |
# Add or remove a newline around a class colon.
|
|
752 |
# Related to pos_class_colon, nl_class_init_args, and pos_comma.
|
|
753 |
||
754 |
nl_create_if_one_liner False # { False, True }
|
|
755 |
# Change simple unbraced if statements into a one-liner
|
|
756 |
# 'if(b)\n i++;' => 'if(b) i++;'
|
|
757 |
||
758 |
nl_create_for_one_liner False # { False, True }
|
|
759 |
# Change simple unbraced for statements into a one-liner
|
|
760 |
# 'for (i=0;i<5;i++)\n foo(i);' => 'for (i=0;i<5;i++) foo(i);'
|
|
761 |
||
762 |
nl_create_while_one_liner False # { False, True }
|
|
763 |
# Change simple unbraced while statements into a one-liner
|
|
764 |
# 'while (i<5)\n foo(i++);' => 'while (i<5) foo(i++);'
|
|
765 |
||
766 |
#
|
|
767 |
# Positioning options
|
|
768 |
#
|
|
769 |
||
770 |
pos_bool Lead # { Ignore, Lead, Trail }
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
771 |
# The position of boolean operators in wrapped expressions
|
5680
by charles
config file for `uncrustify' source code formatter |
772 |
|
773 |
#pos_comma { Ignore, Lead, Trail }
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
774 |
# The position of the comma in wrapped expressions
|
5680
by charles
config file for `uncrustify' source code formatter |
775 |
|
776 |
#pos_class_comma { Ignore, Lead, Trail }
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
777 |
# The position of the comma in the constructor initialization list
|
778 |
#
|
|
5680
by charles
config file for `uncrustify' source code formatter |
779 |
#pos_class_colon { Ignore, Lead, Trail }
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
780 |
# The position of colons between constructor and member initialization
|
5680
by charles
config file for `uncrustify' source code formatter |
781 |
|
782 |
#
|
|
783 |
# Line Splitting options
|
|
784 |
#
|
|
785 |
||
786 |
code_width 76 # Number
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
787 |
# Try to limit code width to N number of columns
|
5680
by charles
config file for `uncrustify' source code formatter |
788 |
|
789 |
ls_for_split_full False # { False, True }
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
790 |
# Whether to fully split long 'for' statements at semi-colons
|
5680
by charles
config file for `uncrustify' source code formatter |
791 |
|
792 |
ls_func_split_full False # { False, True }
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
793 |
# Whether to fully split long function protos/calls at commas
|
5680
by charles
config file for `uncrustify' source code formatter |
794 |
|
795 |
#
|
|
796 |
# Blank line options
|
|
797 |
#
|
|
798 |
||
799 |
nl_max 3 # Number
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
800 |
# The maximum consecutive newlines
|
5680
by charles
config file for `uncrustify' source code formatter |
801 |
|
802 |
nl_after_func_proto 2 # Number
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
803 |
# The number of newlines after a function prototype, if followed by another function prototype
|
5680
by charles
config file for `uncrustify' source code formatter |
804 |
|
805 |
nl_after_func_proto_group 2 # Number
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
806 |
# The number of newlines after a function prototype, if not followed by another function prototype
|
5680
by charles
config file for `uncrustify' source code formatter |
807 |
|
808 |
nl_after_func_body 2 # Number
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
809 |
# The number of newlines after '}' of a multi-line function body
|
5680
by charles
config file for `uncrustify' source code formatter |
810 |
|
811 |
nl_after_func_body_one_liner 1 # Number
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
812 |
# The number of newlines after '}' of a single line function body
|
5680
by charles
config file for `uncrustify' source code formatter |
813 |
|
814 |
nl_before_block_comment 0 # Number
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
815 |
# The minimum number of newlines before a multi-line comment.
|
816 |
# Doesn't apply if after a brace open or another multi-line comment.
|
|
5680
by charles
config file for `uncrustify' source code formatter |
817 |
|
818 |
nl_before_c_comment 0 # Number
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
819 |
# The minimum number of newlines before a single-line C comment.
|
820 |
# Doesn't apply if after a brace open or other single-line C comments.
|
|
5680
by charles
config file for `uncrustify' source code formatter |
821 |
|
822 |
nl_before_cpp_comment 0 # Number
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
823 |
# The minimum number of newlines before a CPP comment.
|
824 |
# Doesn't apply if after a brace open or other CPP comments.
|
|
5680
by charles
config file for `uncrustify' source code formatter |
825 |
|
826 |
nl_after_multiline_comment True # { False, True }
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
827 |
# Whether to force a newline after a multi-line comment.
|
828 |
||
829 |
#nl_before_access_spec 1 # Number
|
|
830 |
# The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
|
|
831 |
# Will not change the newline count if after a brace open.
|
|
832 |
# 0 = No change.
|
|
833 |
#
|
|
834 |
#nl_after_access_spec 1 # Number
|
|
835 |
# The number of newlines after a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
|
|
836 |
# 0 = No change.
|
|
5680
by charles
config file for `uncrustify' source code formatter |
837 |
|
838 |
eat_blanks_after_open_brace True # { False, True }
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
839 |
# Whether to remove blank lines after '{'
|
5680
by charles
config file for `uncrustify' source code formatter |
840 |
|
841 |
eat_blanks_before_close_brace True # { False, True }
|
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
842 |
# Whether to remove blank lines before '}'
|
5680
by charles
config file for `uncrustify' source code formatter |
843 |
|
844 |
#
|
|
845 |
# Code modifying options (non-whitespace)
|
|
846 |
#
|
|
847 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
848 |
mod_full_brace_do Ignore # { Ignore, Add, Remove, Force }
|
849 |
# Add or remove braces on single-line 'do' statement
|
|
850 |
||
851 |
mod_full_brace_for Ignore # { Ignore, Add, Remove, Force }
|
|
852 |
# Add or remove braces on single-line 'for' statement
|
|
853 |
||
854 |
# mod_full_brace_function { Ignore, Add, Remove, Force }
|
|
855 |
# Add or remove braces on single-line function defintions. (Pawn)
|
|
856 |
||
857 |
mod_full_brace_if Ignore # { Ignore, Add, Remove, Force }
|
|
858 |
# Add or remove braces on single-line 'if' statement
|
|
859 |
||
860 |
#mod_full_brace_nl 2
|
|
5680
by charles
config file for `uncrustify' source code formatter |
861 |
# Don't remove braces around statements that span N newlines
|
862 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
863 |
mod_full_brace_while Ignore # { Ignore, Add, Remove, Force }
|
864 |
# Add or remove braces on single-line 'while' statement
|
|
865 |
||
866 |
mod_paren_on_return Remove # { Ignore, Add, Remove, Force }
|
|
867 |
# Add or remove unnecessary paren on 'return' statement
|
|
868 |
||
869 |
#mod_pawn_semicolon { False, True }
|
|
870 |
# Whether to change optional semicolons to real semicolons
|
|
871 |
||
872 |
mod_full_paren_if_bool False # { False, True }
|
|
873 |
# Add parens on 'while' and 'if' statement around bools
|
|
874 |
||
875 |
mod_remove_extra_semicolon True # { False, True }
|
|
876 |
# Whether to remove superfluous semicolons
|
|
877 |
||
878 |
#mod_add_long_function_closebrace_comment Number
|
|
879 |
# If a function body exceeds the specified number of newlines and doesn't have a comment after
|
|
880 |
# the close brace, a comment will be added.
|
|
881 |
||
882 |
#mod_add_long_switch_closebrace_comment Number
|
|
883 |
# If a switch body exceeds the specified number of newlines and doesn't have a comment after
|
|
884 |
# the close brace, a comment will be added.
|
|
885 |
||
886 |
#mod_sort_import { False, True }
|
|
887 |
# If TRUE, will sort consecutive single-line 'import' statements [Java, D]
|
|
888 |
#
|
|
889 |
#mod_sort_using { False, True }
|
|
890 |
# If TRUE, will sort consecutive single-line 'using' statements [C#]
|
|
891 |
||
892 |
mod_sort_include False # { False, True }
|
|
893 |
# If TRUE, will sort consecutive single-line '#include' statements [C/C++] and '#import' statements [Obj-C]
|
|
894 |
# This is generally a bad idea, as it may break your code.
|
|
895 |
||
896 |
#mod_move_case_break { False, True }
|
|
897 |
# If TRUE, it will move a 'break' that appears after a fully braced 'case' before the close brace.
|
|
5680
by charles
config file for `uncrustify' source code formatter |
898 |
|
899 |
#
|
|
900 |
# Comment modifications
|
|
901 |
#
|
|
902 |
||
5682
by charles
run libT, cli, daemon, gtk through the source-code formatter "uncrustify" as promised/threatened |
903 |
cmt_width 80 # Number
|
5680
by charles
config file for `uncrustify' source code formatter |
904 |
# Try to wrap comments at cmt_width columns
|
905 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
906 |
#cmt_indent_multi False # { False, True }
|
5680
by charles
config file for `uncrustify' source code formatter |
907 |
# Whether to mess with the indent of multi-line comments
|
908 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
909 |
#cmt_c_group True # { False, True }
|
5680
by charles
config file for `uncrustify' source code formatter |
910 |
# Whether to group c-comments that look like they are in a block
|
911 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
912 |
#cmt_c_nl_start False # { False, True }
|
5680
by charles
config file for `uncrustify' source code formatter |
913 |
# Whether to put an empty '/*' on the first line of the combined c-comment
|
914 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
915 |
#cmt_c_nl_end False # { False, True }
|
5680
by charles
config file for `uncrustify' source code formatter |
916 |
# Whether to put a newline before the closing '*/' of the combined c-comment
|
917 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
918 |
#cmt_cpp_group True # { False, True }
|
5680
by charles
config file for `uncrustify' source code formatter |
919 |
# Whether to group cpp-comments that look like they are in a block
|
920 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
921 |
#cmt_cpp_nl_start False # { False, True }
|
5680
by charles
config file for `uncrustify' source code formatter |
922 |
# Whether to put an empty '/*' on the first line of the combined cpp-comment
|
923 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
924 |
#cmt_cpp_nl_end False # { False, True }
|
5680
by charles
config file for `uncrustify' source code formatter |
925 |
# Whether to put a newline before the closing '*/' of the combined cpp-comment
|
926 |
||
927 |
cmt_cpp_to_c True # { False, True }
|
|
928 |
# Whether to change cpp-comments into c-comments
|
|
929 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
930 |
#cmt_star_cont False # { False, True }
|
5680
by charles
config file for `uncrustify' source code formatter |
931 |
# Whether to put a star on subsequent comment lines
|
932 |
#
|
|
933 |
#cmt_sp_before_star_cont 0 # Number
|
|
934 |
# The number of spaces to insert at the start of subsequent comment lines
|
|
935 |
#
|
|
936 |
#cmt_sp_after_star_cont 1 # Number
|
|
937 |
# The number of spaces to insert after the star on subsequent comment lines
|
|
938 |
#
|
|
939 |
#cmt_insert_file_header String
|
|
940 |
# The filename that contains text to insert at the head of a file if the file doesn't start with a C/C++ comment.
|
|
941 |
# Will substitue $(filename) with the current file's name.
|
|
942 |
||
943 |
#cmt_insert_func_header String
|
|
944 |
# The filename that contains text to insert before a function implementation if the function isn't preceeded with a C/C++ comment.
|
|
945 |
# Will substitue $(function) with the function name and $(javaparam) with the javadoc @param and @return stuff.
|
|
946 |
# Will also substitute $(fclass) with the class name: void CFoo::Bar() { ... }
|
|
947 |
||
948 |
#cmt_insert_class_header String
|
|
949 |
# The filename that contains text to insert before a class if the class isn't preceeded with a C/C++ comment.
|
|
950 |
# Will substitue $(class) with the class name.
|
|
951 |
||
952 |
#
|
|
953 |
# Preprocessor options
|
|
954 |
#
|
|
955 |
||
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
956 |
pp_indent Add # { Ignore, Add, Remove, Force }
|
5680
by charles
config file for `uncrustify' source code formatter |
957 |
# Control indent of preprocessors inside #if blocks at brace level 0
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
958 |
#
|
5682
by charles
run libT, cli, daemon, gtk through the source-code formatter "uncrustify" as promised/threatened |
959 |
pp_indent_at_level False # { False, True }
|
5680
by charles
config file for `uncrustify' source code formatter |
960 |
# Whether to indent #if/#else/#endif at the brace level (true) or from column 1 (false)
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
961 |
#
|
962 |
pp_space Remove # { Ignore, Add, Remove, Force }
|
|
963 |
## Add or remove space after # based on pp_level of #if blocks
|
|
964 |
#
|
|
965 |
#pp_space_count 4
|
|
966 |
## Sets the number of spaces added with pp_space
|
|
967 |
#
|
|
968 |
pp_indent_region 4
|
|
5680
by charles
config file for `uncrustify' source code formatter |
969 |
# The indent for #region and #endregion in C# and '#pragma region' in C/C++
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
970 |
#
|
971 |
#pp_region_indent_code True # { False, True }
|
|
5680
by charles
config file for `uncrustify' source code formatter |
972 |
# Whether to indent the code between #region and #endregion
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
973 |
#
|
974 |
#pp_indent_if 4 # Number
|
|
5680
by charles
config file for `uncrustify' source code formatter |
975 |
# If pp_indent_at_level=true, sets the indent for #if, #else, and #endif when not at file-level
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
976 |
#
|
977 |
#pp_if_indent_code True # { False, True }
|
|
5680
by charles
config file for `uncrustify' source code formatter |
978 |
# Control whether to indent the code between #if, #else and #endif when not at file-level
|
5681
by charles
unless muks screams too loudly, this will probably be the scheme for code formatting. |
979 |
#
|
980 |
#pp_define_at_level False # { False, True }
|
|
5680
by charles
config file for `uncrustify' source code formatter |
981 |
# Whether to indent '#define' at the brace level (true) or from column 1 (false)
|
982 |