blob: ec52e717ade5874be4005dc2cb42e47d4332fd62 [file] [log] [blame]
Michal Vasko2bf4af42023-01-04 12:08:38 +01001# Uncrustify-0.76.0_f
Radek Krejcia198c962020-08-16 10:32:10 +02002
3#
4# General options
5#
6
7# Added specific file extensions.
8file_ext C .c.in
9file_ext C-Header .h.in
10
11# The type of line endings.
12#
13# Default: auto
14newlines = lf # lf/crlf/cr/auto
15
16# The original size of tabs in the input.
17#
18# Default: 8
19input_tab_size = 8 # unsigned number
20
21# The size of tabs in the output (only used if align_with_tabs=true).
22#
23# Default: 8
24output_tab_size = 8 # unsigned number
25
26# The ASCII value of the string escape char, usually 92 (\) or (Pawn) 94 (^).
27#
28# Default: 92
29string_escape_char = 92 # unsigned number
30
31# Alternate string escape char (usually only used for Pawn).
32# Only works right before the quote char.
33string_escape_char2 = 0 # unsigned number
34
35# Replace tab characters found in string literals with the escape sequence \t
36# instead.
37string_replace_tab_chars = true # true/false
38
39# Allow interpreting '>=' and '>>=' as part of a template in code like
40# 'void f(list<list<B>>=val);'. If true, 'assert(x<0 && y>=3)' will be broken.
41# Improvements to template detection may make this option obsolete.
42tok_split_gte = false # true/false
43
44# Disable formatting of NL_CONT ('\\n') ended lines (e.g. multiline macros)
45disable_processing_nl_cont = false # true/false
46
47# Specify the marker used in comments to disable processing of part of the
48# file.
49# The comment should be used alone in one line.
50#
51# Default: *INDENT-OFF*
52disable_processing_cmt = " *INDENT-OFF*" # string
53
54# Specify the marker used in comments to (re)enable processing in a file.
55# The comment should be used alone in one line.
56#
57# Default: *INDENT-ON*
58enable_processing_cmt = " *INDENT-ON*" # string
59
60# Enable parsing of digraphs.
61enable_digraphs = false # true/false
62
Michal Vasko26bbb272022-08-02 14:54:33 +020063# Option to allow both disable_processing_cmt and enable_processing_cmt
64# strings, if specified, to be interpreted as ECMAScript regular expressions.
65# If true, a regex search will be performed within comments according to the
66# specified patterns in order to disable/enable processing.
67processing_cmt_as_regex = false # true/false
68
Radek Krejcia198c962020-08-16 10:32:10 +020069# Add or remove the UTF-8 BOM (recommend 'remove').
70utf8_bom = ignore # ignore/add/remove/force
71
72# If the file contains bytes with values between 128 and 255, but is not
73# UTF-8, then output as UTF-8.
74utf8_byte = false # true/false
75
76# Force the output encoding to UTF-8.
77utf8_force = true # true/false
78
79# Add or remove space between 'do' and '{'.
Michal Vasko44f3d2c2020-08-24 09:49:38 +020080sp_do_brace_open = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +020081
82# Add or remove space between '}' and 'while'.
Michal Vasko44f3d2c2020-08-24 09:49:38 +020083sp_brace_close_while = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +020084
85# Add or remove space between 'while' and '('.
Michal Vasko44f3d2c2020-08-24 09:49:38 +020086sp_while_paren_open = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +020087
88#
89# Spacing options
90#
91
92# Add or remove space around non-assignment symbolic operators ('+', '/', '%',
93# '<<', and so forth).
Michal Vasko44f3d2c2020-08-24 09:49:38 +020094sp_arith = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +020095
96# Add or remove space around arithmetic operators '+' and '-'.
97#
98# Overrides sp_arith.
Michal Vasko44f3d2c2020-08-24 09:49:38 +020099sp_arith_additive = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200100
101# Add or remove space around assignment operator '=', '+=', etc.
Michal Vasko44f3d2c2020-08-24 09:49:38 +0200102sp_assign = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200103
104# Add or remove space around '=' in C++11 lambda capture specifications.
105#
106# Overrides sp_assign.
Michal Vasko44f3d2c2020-08-24 09:49:38 +0200107sp_cpp_lambda_assign = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200108
109# Add or remove space after the capture specification of a C++11 lambda when
110# an argument list is present, as in '[] <here> (int x){ ... }'.
111sp_cpp_lambda_square_paren = ignore # ignore/add/remove/force
112
113# Add or remove space after the capture specification of a C++11 lambda with
114# no argument list is present, as in '[] <here> { ... }'.
115sp_cpp_lambda_square_brace = ignore # ignore/add/remove/force
116
Michal Vasko26bbb272022-08-02 14:54:33 +0200117# Add or remove space after the opening parenthesis and before the closing
118# parenthesis of a argument list of a C++11 lambda, as in
119# '[]( <here> int x <here> ){ ... }'.
120sp_cpp_lambda_argument_list = ignore # ignore/add/remove/force/not_defined
121
Radek Krejcia198c962020-08-16 10:32:10 +0200122# Add or remove space after the argument list of a C++11 lambda, as in
123# '[](int x) <here> { ... }'.
124sp_cpp_lambda_paren_brace = ignore # ignore/add/remove/force
125
126# Add or remove space between a lambda body and its call operator of an
127# immediately invoked lambda, as in '[]( ... ){ ... } <here> ( ... )'.
128sp_cpp_lambda_fparen = ignore # ignore/add/remove/force
129
130# Add or remove space around assignment operator '=' in a prototype.
131#
132# If set to ignore, use sp_assign.
133sp_assign_default = ignore # ignore/add/remove/force
134
135# Add or remove space before assignment operator '=', '+=', etc.
136#
137# Overrides sp_assign.
Michal Vasko44f3d2c2020-08-24 09:49:38 +0200138sp_before_assign = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200139
140# Add or remove space after assignment operator '=', '+=', etc.
141#
142# Overrides sp_assign.
Michal Vasko44f3d2c2020-08-24 09:49:38 +0200143sp_after_assign = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200144
Michal Vasko26bbb272022-08-02 14:54:33 +0200145# Add or remove space in 'enum {'.
146#
147# Default: add
148sp_enum_brace = force # ignore/add/remove/force/not_defined
149
Radek Krejcia198c962020-08-16 10:32:10 +0200150# Add or remove space in 'NS_ENUM ('.
Michal Vasko44f3d2c2020-08-24 09:49:38 +0200151sp_enum_paren = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200152
153# Add or remove space around assignment '=' in enum.
Michal Vasko44f3d2c2020-08-24 09:49:38 +0200154sp_enum_assign = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200155
156# Add or remove space before assignment '=' in enum.
157#
158# Overrides sp_enum_assign.
Michal Vasko44f3d2c2020-08-24 09:49:38 +0200159sp_enum_before_assign = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200160
161# Add or remove space after assignment '=' in enum.
162#
163# Overrides sp_enum_assign.
Michal Vasko44f3d2c2020-08-24 09:49:38 +0200164sp_enum_after_assign = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200165
166# Add or remove space around assignment ':' in enum.
167sp_enum_colon = ignore # ignore/add/remove/force
168
169# Add or remove space around preprocessor '##' concatenation operator.
170#
171# Default: add
172sp_pp_concat = ignore # ignore/add/remove/force
173
174# Add or remove space after preprocessor '#' stringify operator.
175# Also affects the '#@' charizing operator.
176sp_pp_stringify = ignore # ignore/add/remove/force
177
178# Add or remove space before preprocessor '#' stringify operator
179# as in '#define x(y) L#y'.
180sp_before_pp_stringify = ignore # ignore/add/remove/force
181
182# Add or remove space around boolean operators '&&' and '||'.
Michal Vasko44f3d2c2020-08-24 09:49:38 +0200183sp_bool = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200184
185# Add or remove space around compare operator '<', '>', '==', etc.
Michal Vasko44f3d2c2020-08-24 09:49:38 +0200186sp_compare = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200187
188# Add or remove space inside '(' and ')'.
Michal Vasko44f3d2c2020-08-24 09:49:38 +0200189sp_inside_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200190
191# Add or remove space between nested parentheses, i.e. '((' vs. ') )'.
Michal Vasko44f3d2c2020-08-24 09:49:38 +0200192sp_paren_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200193
194# Add or remove space between back-to-back parentheses, i.e. ')(' vs. ') ('.
Michal Vasko44f3d2c2020-08-24 09:49:38 +0200195sp_cparen_oparen = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200196
197# Whether to balance spaces inside nested parentheses.
198sp_balance_nested_parens = false # true/false
199
200# Add or remove space between ')' and '{'.
Michal Vasko44f3d2c2020-08-24 09:49:38 +0200201sp_paren_brace = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200202
203# Add or remove space between nested braces, i.e. '{{' vs '{ {'.
204sp_brace_brace = ignore # ignore/add/remove/force
205
206# Add or remove space before pointer star '*'.
Michal Vasko22df3f02020-08-24 13:29:22 +0200207sp_before_ptr_star = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200208
209# Add or remove space before pointer star '*' that isn't followed by a
210# variable name. If set to ignore, sp_before_ptr_star is used instead.
211sp_before_unnamed_ptr_star = ignore # ignore/add/remove/force
212
213# Add or remove space between pointer stars '*'.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200214sp_between_ptr_star = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200215
216# Add or remove space after pointer star '*', if followed by a word.
217#
218# Overrides sp_type_func.
Michal Vasko22df3f02020-08-24 13:29:22 +0200219sp_after_ptr_star = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200220
221# Add or remove space after pointer caret '^', if followed by a word.
222#sp_after_ptr_block_caret = ignore # ignore/add/remove/force
223
224# Add or remove space after pointer star '*', if followed by a qualifier.
Michal Vasko22df3f02020-08-24 13:29:22 +0200225sp_after_ptr_star_qualifier = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200226
227# Add or remove space after a pointer star '*', if followed by a function
228# prototype or function definition.
229#
230# Overrides sp_after_ptr_star and sp_type_func.
231sp_after_ptr_star_func = ignore # ignore/add/remove/force
232
Michal Vasko26bbb272022-08-02 14:54:33 +0200233# Add or remove space after a pointer star '*' in the trailing return of a
234# function prototype or function definition.
235sp_after_ptr_star_trailing = ignore # ignore/add/remove/force/not_defined
236
237# Add or remove space between the pointer star '*' and the name of the variable
238# in a function pointer definition.
239sp_ptr_star_func_var = remove # ignore/add/remove/force/not_defined
240
241# Add or remove space between the pointer star '*' and the name of the type
242# in a function pointer type definition.
243sp_ptr_star_func_type = remove # ignore/add/remove/force/not_defined
244
Radek Krejcia198c962020-08-16 10:32:10 +0200245# Add or remove space after a pointer star '*', if followed by an open
246# parenthesis, as in 'void* (*)().
Michal Vaskoe29489b2020-08-24 10:43:54 +0200247sp_ptr_star_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200248
249# Add or remove space before a pointer star '*', if followed by a function
250# prototype or function definition.
Michal Vasko22df3f02020-08-24 13:29:22 +0200251sp_before_ptr_star_func = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200252
Michal Vasko26bbb272022-08-02 14:54:33 +0200253# Add or remove space before a pointer star '*' in the trailing return of a
254# function prototype or function definition.
255sp_before_ptr_star_trailing = ignore # ignore/add/remove/force/not_defined
256
Radek Krejcia198c962020-08-16 10:32:10 +0200257# Add or remove space before a reference sign '&'.
258sp_before_byref = ignore # ignore/add/remove/force
259
260# Add or remove space before a reference sign '&' that isn't followed by a
261# variable name. If set to ignore, sp_before_byref is used instead.
262sp_before_unnamed_byref = ignore # ignore/add/remove/force
263
264# Add or remove space after reference sign '&', if followed by a word.
265#
266# Overrides sp_type_func.
267sp_after_byref = ignore # ignore/add/remove/force
268
269# Add or remove space after a reference sign '&', if followed by a function
270# prototype or function definition.
271#
272# Overrides sp_after_byref and sp_type_func.
273sp_after_byref_func = ignore # ignore/add/remove/force
274
275# Add or remove space before a reference sign '&', if followed by a function
276# prototype or function definition.
277sp_before_byref_func = ignore # ignore/add/remove/force
278
Michal Vasko26bbb272022-08-02 14:54:33 +0200279# Add or remove space after a reference sign '&', if followed by an open
280# parenthesis, as in 'char& (*)()'.
281sp_byref_paren = ignore # ignore/add/remove/force/not_defined
282
Radek Krejcia198c962020-08-16 10:32:10 +0200283# Add or remove space between type and word.
284#
285# Default: force
286sp_after_type = ignore # ignore/add/remove/force
287
288# Add or remove space between 'decltype(...)' and word.
289sp_after_decltype = ignore # ignore/add/remove/force
290
291# (D) Add or remove space before the parenthesis in the D constructs
292# 'template Foo(' and 'class Foo('.
293sp_before_template_paren = ignore # ignore/add/remove/force
294
295# Add or remove space between 'template' and '<'.
296# If set to ignore, sp_before_angle is used.
297sp_template_angle = ignore # ignore/add/remove/force
298
299# Add or remove space before '<'.
300sp_before_angle = ignore # ignore/add/remove/force
301
302# Add or remove space inside '<' and '>'.
303sp_inside_angle = ignore # ignore/add/remove/force
304
305# Add or remove space inside '<>'.
306sp_inside_angle_empty = ignore # ignore/add/remove/force
307
308# Add or remove space between '>' and ':'.
309sp_angle_colon = ignore # ignore/add/remove/force
310
311# Add or remove space after '>'.
312sp_after_angle = ignore # ignore/add/remove/force
313
314# Add or remove space between '>' and '(' as found in 'new List<byte>(foo);'.
315sp_angle_paren = ignore # ignore/add/remove/force
316
317# Add or remove space between '>' and '()' as found in 'new List<byte>();'.
318sp_angle_paren_empty = ignore # ignore/add/remove/force
319
320# Add or remove space between '>' and a word as in 'List<byte> m;' or
321# 'template <typename T> static ...'.
322sp_angle_word = ignore # ignore/add/remove/force
323
324# Add or remove space between '>' and '>' in '>>' (template stuff).
325#
326# Default: add
327sp_angle_shift = ignore # ignore/add/remove/force
328
329# (C++11) Permit removal of the space between '>>' in 'foo<bar<int> >'. Note
330# that sp_angle_shift cannot remove the space without this option.
331sp_permit_cpp11_shift = false # true/false
332
333# Add or remove space before '(' of control statements ('if', 'for', 'switch',
334# 'while', etc.).
Michal Vaskod989ba02020-08-24 10:59:24 +0200335sp_before_sparen = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200336
337# Add or remove space inside '(' and ')' of control statements.
Michal Vaskod989ba02020-08-24 10:59:24 +0200338sp_inside_sparen = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200339
340# Add or remove space after '(' of control statements.
341#
342# Overrides sp_inside_sparen.
343sp_inside_sparen_open = ignore # ignore/add/remove/force
344
345# Add or remove space before ')' of control statements.
346#
347# Overrides sp_inside_sparen.
348sp_inside_sparen_close = ignore # ignore/add/remove/force
349
Michal Vasko26bbb272022-08-02 14:54:33 +0200350# Add or remove space inside '(' and ')' of 'for' statements.
351sp_inside_for = remove # ignore/add/remove/force/not_defined
352
353# Add or remove space after '(' of 'for' statements.
354#
355# Overrides sp_inside_for.
356sp_inside_for_open = ignore # ignore/add/remove/force/not_defined
357
358# Add or remove space before ')' of 'for' statements.
359#
360# Overrides sp_inside_for.
361sp_inside_for_close = ignore # ignore/add/remove/force/not_defined
362
363# Add or remove space between '((' or '))' of control statements.
364sp_sparen_paren = ignore # ignore/add/remove/force/not_defined
365
Radek Krejcia198c962020-08-16 10:32:10 +0200366# Add or remove space after ')' of control statements.
Michal Vaskod989ba02020-08-24 10:59:24 +0200367sp_after_sparen = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200368
369# Add or remove space between ')' and '{' of of control statements.
Michal Vaskod989ba02020-08-24 10:59:24 +0200370sp_sparen_brace = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200371
372# (D) Add or remove space between 'invariant' and '('.
373sp_invariant_paren = ignore # ignore/add/remove/force
374
375# (D) Add or remove space after the ')' in 'invariant (C) c'.
376sp_after_invariant_paren = ignore # ignore/add/remove/force
377
378# Add or remove space before empty statement ';' on 'if', 'for' and 'while'.
379sp_special_semi = ignore # ignore/add/remove/force
380
381# Add or remove space before ';'.
382#
383# Default: remove
Michal Vaskod989ba02020-08-24 10:59:24 +0200384sp_before_semi = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200385
386# Add or remove space before ';' in non-empty 'for' statements.
Michal Vaskod989ba02020-08-24 10:59:24 +0200387sp_before_semi_for = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200388
389# Add or remove space before a semicolon of an empty part of a for statement.
Michal Vaskod989ba02020-08-24 10:59:24 +0200390sp_before_semi_for_empty = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200391
Michal Vasko26bbb272022-08-02 14:54:33 +0200392# Add or remove space between the semicolons of an empty middle part of a for
393# statement, as in 'for ( ; <here> ; )'.
394sp_between_semi_for_empty = ignore # ignore/add/remove/force/not_defined
395
Radek Krejcia198c962020-08-16 10:32:10 +0200396# Add or remove space after ';', except when followed by a comment.
397#
398# Default: add
Michal Vaskod989ba02020-08-24 10:59:24 +0200399sp_after_semi = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200400
401# Add or remove space after ';' in non-empty 'for' statements.
402#
403# Default: force
Michal Vaskod989ba02020-08-24 10:59:24 +0200404sp_after_semi_for = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200405
406# Add or remove space after the final semicolon of an empty part of a for
407# statement, as in 'for ( ; ; <here> )'.
Michal Vaskod989ba02020-08-24 10:59:24 +0200408sp_after_semi_for_empty = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200409
410# Add or remove space before '[' (except '[]').
411sp_before_square = ignore # ignore/add/remove/force
412
413# Add or remove space before '[' for a variable definition.
414#
415# Default: remove
416sp_before_vardef_square = ignore # ignore/add/remove/force
417
418# Add or remove space before '[' for asm block.
419sp_before_square_asm_block = ignore # ignore/add/remove/force
420
421# Add or remove space before '[]'.
422sp_before_squares = ignore # ignore/add/remove/force
423
424# Add or remove space before C++17 structured bindings.
425sp_cpp_before_struct_binding = ignore # ignore/add/remove/force
426
427# Add or remove space inside a non-empty '[' and ']'.
428sp_inside_square = ignore # ignore/add/remove/force
429
Michal Vasko26bbb272022-08-02 14:54:33 +0200430# Add or remove space inside '[]'.
431sp_inside_square_empty = remove # ignore/add/remove/force/not_defined
432
Radek Krejcia198c962020-08-16 10:32:10 +0200433# (OC) Add or remove space inside a non-empty Objective-C boxed array '@[' and
434# ']'. If set to ignore, sp_inside_square is used.
435sp_inside_square_oc_array = ignore # ignore/add/remove/force
436
437# Add or remove space after ',', i.e. 'a,b' vs. 'a, b'.
Michal Vaskod989ba02020-08-24 10:59:24 +0200438sp_after_comma = add # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200439
440# Add or remove space before ','.
441#
442# Default: remove
Michal Vaskod989ba02020-08-24 10:59:24 +0200443sp_before_comma = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200444
445# (C#) Add or remove space between ',' and ']' in multidimensional array type
446# like 'int[,,]'.
447sp_after_mdatype_commas = ignore # ignore/add/remove/force
448
449# (C#) Add or remove space between '[' and ',' in multidimensional array type
450# like 'int[,,]'.
451sp_before_mdatype_commas = ignore # ignore/add/remove/force
452
453# (C#) Add or remove space between ',' in multidimensional array type
454# like 'int[,,]'.
455sp_between_mdatype_commas = ignore # ignore/add/remove/force
456
457# Add or remove space between an open parenthesis and comma,
458# i.e. '(,' vs. '( ,'.
459#
460# Default: force
Michal Vaskod989ba02020-08-24 10:59:24 +0200461sp_paren_comma = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200462
Michal Vasko26bbb272022-08-02 14:54:33 +0200463# Add or remove space between a type and ':'.
464sp_type_colon = ignore # ignore/add/remove/force/not_defined
465
466# Add or remove space after the variadic '...' when preceded by a
467# non-punctuator.
468# The value REMOVE will be overriden with FORCE
469sp_after_ellipsis = ignore # ignore/add/remove/force/not_defined
470
Radek Krejcia198c962020-08-16 10:32:10 +0200471# Add or remove space before the variadic '...' when preceded by a
472# non-punctuator.
Michal Vaskoe1445952020-08-24 11:19:42 +0200473sp_before_ellipsis = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200474
475# Add or remove space between a type and '...'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200476sp_type_ellipsis = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200477
Michal Vasko26bbb272022-08-02 14:54:33 +0200478# Add or remove space between a '*' and '...'.
479sp_ptr_type_ellipsis = ignore # ignore/add/remove/force/not_defined
Radek Krejcia198c962020-08-16 10:32:10 +0200480
481# Add or remove space between ')' and '...'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200482sp_paren_ellipsis = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200483
Michal Vasko26bbb272022-08-02 14:54:33 +0200484# Add or remove space between '&&' and '...'.
485sp_byref_ellipsis = ignore # ignore/add/remove/force/not_defined
486
Radek Krejcia198c962020-08-16 10:32:10 +0200487# Add or remove space between ')' and a qualifier such as 'const'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200488sp_paren_qualifier = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200489
490# Add or remove space between ')' and 'noexcept'.
491sp_paren_noexcept = ignore # ignore/add/remove/force
492
493# Add or remove space after class ':'.
494sp_after_class_colon = ignore # ignore/add/remove/force
495
496# Add or remove space before class ':'.
497sp_before_class_colon = ignore # ignore/add/remove/force
498
499# Add or remove space after class constructor ':'.
500sp_after_constr_colon = ignore # ignore/add/remove/force
501
502# Add or remove space before class constructor ':'.
503sp_before_constr_colon = ignore # ignore/add/remove/force
504
505# Add or remove space before case ':'.
506#
507# Default: remove
508sp_before_case_colon = remove # ignore/add/remove/force
509
510# Add or remove space between 'operator' and operator sign.
511sp_after_operator = ignore # ignore/add/remove/force
512
513# Add or remove space between the operator symbol and the open parenthesis, as
514# in 'operator ++('.
515sp_after_operator_sym = ignore # ignore/add/remove/force
516
517# Overrides sp_after_operator_sym when the operator has no arguments, as in
518# 'operator *()'.
519sp_after_operator_sym_empty = ignore # ignore/add/remove/force
520
521# Add or remove space after C/D cast, i.e. 'cast(int)a' vs. 'cast(int) a' or
522# '(int)a' vs. '(int) a'.
523sp_after_cast = ignore # ignore/add/remove/force
524
525# Add or remove spaces inside cast parentheses.
Michal Vaskoe1445952020-08-24 11:19:42 +0200526sp_inside_paren_cast = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200527
528# Add or remove space between the type and open parenthesis in a C++ cast,
529# i.e. 'int(exp)' vs. 'int (exp)'.
530sp_cpp_cast_paren = ignore # ignore/add/remove/force
531
532# Add or remove space between 'sizeof' and '('.
533sp_sizeof_paren = ignore # ignore/add/remove/force
534
535# Add or remove space between 'sizeof' and '...'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200536sp_sizeof_ellipsis = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200537
538# Add or remove space between 'sizeof...' and '('.
Michal Vaskoe1445952020-08-24 11:19:42 +0200539sp_sizeof_ellipsis_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200540
Michal Vasko26bbb272022-08-02 14:54:33 +0200541# Add or remove space between '...' and a parameter pack.
542sp_ellipsis_parameter_pack = ignore # ignore/add/remove/force/not_defined
543
544# Add or remove space between a parameter pack and '...'.
545sp_parameter_pack_ellipsis = ignore # ignore/add/remove/force/not_defined
546
Radek Krejcia198c962020-08-16 10:32:10 +0200547# Add or remove space between 'decltype' and '('.
548sp_decltype_paren = ignore # ignore/add/remove/force
549
550# (Pawn) Add or remove space after the tag keyword.
551#sp_after_tag = ignore # ignore/add/remove/force
552
553# Add or remove space inside enum '{' and '}'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200554sp_inside_braces_enum = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200555
556# Add or remove space inside struct/union '{' and '}'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200557sp_inside_braces_struct = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200558
559# (OC) Add or remove space inside Objective-C boxed dictionary '{' and '}'
560#sp_inside_braces_oc_dict = ignore # ignore/add/remove/force
561
562# Add or remove space after open brace in an unnamed temporary
563# direct-list-initialization.
564sp_after_type_brace_init_lst_open = ignore # ignore/add/remove/force
565
566# Add or remove space before close brace in an unnamed temporary
567# direct-list-initialization.
568sp_before_type_brace_init_lst_close = ignore # ignore/add/remove/force
569
570# Add or remove space inside an unnamed temporary direct-list-initialization.
571sp_inside_type_brace_init_lst = ignore # ignore/add/remove/force
572
573# Add or remove space inside '{' and '}'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200574sp_inside_braces = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200575
576# Add or remove space inside '{}'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200577sp_inside_braces_empty = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200578
579# Add or remove space around trailing return operator '->'.
580sp_trailing_return = ignore # ignore/add/remove/force
581
582# Add or remove space between return type and function name. A minimum of 1
583# is forced except for pointer return types.
Michal Vaskoe1445952020-08-24 11:19:42 +0200584sp_type_func = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200585
586# Add or remove space between type and open brace of an unnamed temporary
587# direct-list-initialization.
Michal Vaskoe1445952020-08-24 11:19:42 +0200588sp_type_brace_init_lst = ignore # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200589
590# Add or remove space between function name and '(' on function declaration.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200591sp_func_proto_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200592
593# Add or remove space between function name and '()' on function declaration
594# without parameters.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200595sp_func_proto_paren_empty = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200596
597# Add or remove space between function name and '(' with a typedef specifier.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200598sp_func_type_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200599
600# Add or remove space between alias name and '(' of a non-pointer function type typedef.
601sp_func_def_paren = ignore # ignore/add/remove/force
602
603# Add or remove space between function name and '()' on function definition
604# without parameters.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200605sp_func_def_paren_empty = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200606
607# Add or remove space inside empty function '()'.
608# Overrides sp_after_angle unless use_sp_after_angle_always is set to true.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200609sp_inside_fparens = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200610
611# Add or remove space inside function '(' and ')'.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200612sp_inside_fparen = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200613
614# Add or remove space inside the first parentheses in a function type, as in
615# 'void (*x)(...)'.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200616sp_inside_tparen = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200617
618# Add or remove space between the ')' and '(' in a function type, as in
619# 'void (*x)(...)'.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200620sp_after_tparen_close = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200621
622# Add or remove space between ']' and '(' when part of a function call.
623sp_square_fparen = ignore # ignore/add/remove/force
624
625# Add or remove space between ')' and '{' of function.
626sp_fparen_brace = ignore # ignore/add/remove/force
627
628# Add or remove space between ')' and '{' of s function call in object
629# initialization.
630#
631# Overrides sp_fparen_brace.
632sp_fparen_brace_initializer = ignore # ignore/add/remove/force
633
634# (Java) Add or remove space between ')' and '{{' of double brace initializer.
635sp_fparen_dbrace = ignore # ignore/add/remove/force
636
637# Add or remove space between function name and '(' on function calls.
638sp_func_call_paren = ignore # ignore/add/remove/force
639
640# Add or remove space between function name and '()' on function calls without
641# parameters. If set to ignore (the default), sp_func_call_paren is used.
642sp_func_call_paren_empty = ignore # ignore/add/remove/force
643
644# Add or remove space between the user function name and '(' on function
645# calls. You need to set a keyword to be a user function in the config file,
646# like:
647# set func_call_user tr _ i18n
648sp_func_call_user_paren = ignore # ignore/add/remove/force
649
650# Add or remove space inside user function '(' and ')'.
651sp_func_call_user_inside_fparen = ignore # ignore/add/remove/force
652
653# Add or remove space between nested parentheses with user functions,
654# i.e. '((' vs. '( ('.
655sp_func_call_user_paren_paren = ignore # ignore/add/remove/force
656
657# Add or remove space between a constructor/destructor and the open
658# parenthesis.
659sp_func_class_paren = ignore # ignore/add/remove/force
660
661# Add or remove space between a constructor without parameters or destructor
662# and '()'.
663sp_func_class_paren_empty = ignore # ignore/add/remove/force
664
Michal Vasko26bbb272022-08-02 14:54:33 +0200665# Add or remove space after 'return'.
666#
667# Default: force
668sp_return = force # ignore/add/remove/force/not_defined
669
Radek Krejcia198c962020-08-16 10:32:10 +0200670# Add or remove space between 'return' and '('.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200671sp_return_paren = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200672
673# Add or remove space between 'return' and '{'.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200674sp_return_brace = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200675
676# Add or remove space between '__attribute__' and '('.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200677sp_attribute_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200678
679# Add or remove space between 'defined' and '(' in '#if defined (FOO)'.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200680sp_defined_paren = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200681
682# Add or remove space between 'throw' and '(' in 'throw (something)'.
683sp_throw_paren = ignore # ignore/add/remove/force
684
685# Add or remove space between 'throw' and anything other than '(' as in
686# '@throw [...];'.
687sp_after_throw = ignore # ignore/add/remove/force
688
689# Add or remove space between 'catch' and '(' in 'catch (something) { }'.
690# If set to ignore, sp_before_sparen is used.
691sp_catch_paren = ignore # ignore/add/remove/force
692
693# (OC) Add or remove space between '@catch' and '('
694# in '@catch (something) { }'. If set to ignore, sp_catch_paren is used.
695sp_oc_catch_paren = ignore # ignore/add/remove/force
696
697# (OC) Add or remove space before Objective-C protocol list
698# as in '@protocol Protocol<here><Protocol_A>' or '@interface MyClass : NSObject<here><MyProtocol>'.
699sp_before_oc_proto_list = ignore # ignore/add/remove/force
700
701# (OC) Add or remove space between class name and '('
702# in '@interface className(categoryName)<ProtocolName>:BaseClass'
703sp_oc_classname_paren = ignore # ignore/add/remove/force
704
705# (D) Add or remove space between 'version' and '('
706# in 'version (something) { }'. If set to ignore, sp_before_sparen is used.
707sp_version_paren = ignore # ignore/add/remove/force
708
709# (D) Add or remove space between 'scope' and '('
710# in 'scope (something) { }'. If set to ignore, sp_before_sparen is used.
711sp_scope_paren = ignore # ignore/add/remove/force
712
713# Add or remove space between 'super' and '(' in 'super (something)'.
714#
715# Default: remove
716sp_super_paren = ignore # ignore/add/remove/force
717
718# Add or remove space between 'this' and '(' in 'this (something)'.
719#
720# Default: remove
721sp_this_paren = ignore # ignore/add/remove/force
722
723# Add or remove space between a macro name and its definition.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200724sp_macro = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200725
726# Add or remove space between a macro function ')' and its definition.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200727sp_macro_func = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200728
729# Add or remove space between 'else' and '{' if on the same line.
Michal Vaskod989ba02020-08-24 10:59:24 +0200730sp_else_brace = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200731
732# Add or remove space between '}' and 'else' if on the same line.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200733sp_brace_else = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200734
735# Add or remove space between '}' and the name of a typedef on the same line.
Michal Vaskoe1445952020-08-24 11:19:42 +0200736sp_brace_typedef = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200737
738# Add or remove space before the '{' of a 'catch' statement, if the '{' and
739# 'catch' are on the same line, as in 'catch (decl) <here> {'.
740sp_catch_brace = ignore # ignore/add/remove/force
741
742# (OC) Add or remove space before the '{' of a '@catch' statement, if the '{'
743# and '@catch' are on the same line, as in '@catch (decl) <here> {'.
744# If set to ignore, sp_catch_brace is used.
745sp_oc_catch_brace = ignore # ignore/add/remove/force
746
747# Add or remove space between '}' and 'catch' if on the same line.
748sp_brace_catch = ignore # ignore/add/remove/force
749
750# (OC) Add or remove space between '}' and '@catch' if on the same line.
751# If set to ignore, sp_brace_catch is used.
752sp_oc_brace_catch = ignore # ignore/add/remove/force
753
754# Add or remove space between 'finally' and '{' if on the same line.
755sp_finally_brace = ignore # ignore/add/remove/force
756
757# Add or remove space between '}' and 'finally' if on the same line.
758sp_brace_finally = ignore # ignore/add/remove/force
759
760# Add or remove space between 'try' and '{' if on the same line.
761sp_try_brace = ignore # ignore/add/remove/force
762
763# Add or remove space between get/set and '{' if on the same line.
764sp_getset_brace = ignore # ignore/add/remove/force
765
766# Add or remove space between a variable and '{' for C++ uniform
767# initialization.
768sp_word_brace_init_lst = ignore # ignore/add/remove/force
769
770# Add or remove space between a variable and '{' for a namespace.
771#
772# Default: add
773sp_word_brace_ns = ignore # ignore/add/remove/force
774
775# Add or remove space before the '::' operator.
776sp_before_dc = ignore # ignore/add/remove/force
777
778# Add or remove space after the '::' operator.
779sp_after_dc = ignore # ignore/add/remove/force
780
781# (D) Add or remove around the D named array initializer ':' operator.
782sp_d_array_colon = remove # ignore/add/remove/force
783
784# Add or remove space after the '!' (not) unary operator.
785#
786# Default: remove
Michal Vaskoe1445952020-08-24 11:19:42 +0200787sp_not = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200788
Michal Vasko26bbb272022-08-02 14:54:33 +0200789# Add or remove space between two '!' (not) unary operators.
790# If set to ignore, sp_not will be used.
791sp_not_not = remove # ignore/add/remove/force/not_defined
792
Radek Krejcia198c962020-08-16 10:32:10 +0200793# Add or remove space after the '~' (invert) unary operator.
794#
795# Default: remove
Michal Vaskoe1445952020-08-24 11:19:42 +0200796sp_inv = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200797
798# Add or remove space after the '&' (address-of) unary operator. This does not
799# affect the spacing after a '&' that is part of a type.
800#
801# Default: remove
Michal Vaskoe1445952020-08-24 11:19:42 +0200802sp_addr = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200803
804# Add or remove space around the '.' or '->' operators.
805#
806# Default: remove
Michal Vaskoe1445952020-08-24 11:19:42 +0200807sp_member = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200808
809# Add or remove space after the '*' (dereference) unary operator. This does
810# not affect the spacing after a '*' that is part of a type.
811#
812# Default: remove
Michal Vaskoe1445952020-08-24 11:19:42 +0200813sp_deref = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200814
815# Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'.
816#
817# Default: remove
Michal Vaskoe1445952020-08-24 11:19:42 +0200818sp_sign = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200819
820# Add or remove space between '++' and '--' the word to which it is being
821# applied, as in '(--x)' or 'y++;'.
822#
823# Default: remove
Michal Vaskoe1445952020-08-24 11:19:42 +0200824sp_incdec = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200825
826# Add or remove space before a backslash-newline at the end of a line.
827#
828# Default: add
829sp_before_nl_cont = ignore # ignore/add/remove/force
830
831# (OC) Add or remove space after the scope '+' or '-', as in '-(void) foo;'
832# or '+(int) bar;'.
833sp_after_oc_scope = ignore # ignore/add/remove/force
834
835# (OC) Add or remove space after the colon in message specs,
836# i.e. '-(int) f:(int) x;' vs. '-(int) f: (int) x;'.
837sp_after_oc_colon = ignore # ignore/add/remove/force
838
839# (OC) Add or remove space before the colon in message specs,
840# i.e. '-(int) f: (int) x;' vs. '-(int) f : (int) x;'.
841sp_before_oc_colon = ignore # ignore/add/remove/force
842
843# (OC) Add or remove space after the colon in immutable dictionary expression
844# 'NSDictionary *test = @{@"foo" :@"bar"};'.
845sp_after_oc_dict_colon = ignore # ignore/add/remove/force
846
847# (OC) Add or remove space before the colon in immutable dictionary expression
848# 'NSDictionary *test = @{@"foo" :@"bar"};'.
849sp_before_oc_dict_colon = ignore # ignore/add/remove/force
850
851# (OC) Add or remove space after the colon in message specs,
852# i.e. '[object setValue:1];' vs. '[object setValue: 1];'.
853sp_after_send_oc_colon = ignore # ignore/add/remove/force
854
855# (OC) Add or remove space before the colon in message specs,
856# i.e. '[object setValue:1];' vs. '[object setValue :1];'.
857sp_before_send_oc_colon = ignore # ignore/add/remove/force
858
859# (OC) Add or remove space after the (type) in message specs,
860# i.e. '-(int)f: (int) x;' vs. '-(int)f: (int)x;'.
861sp_after_oc_type = ignore # ignore/add/remove/force
862
863# (OC) Add or remove space after the first (type) in message specs,
864# i.e. '-(int) f:(int)x;' vs. '-(int)f:(int)x;'.
865sp_after_oc_return_type = ignore # ignore/add/remove/force
866
867# (OC) Add or remove space between '@selector' and '(',
868# i.e. '@selector(msgName)' vs. '@selector (msgName)'.
869# Also applies to '@protocol()' constructs.
870sp_after_oc_at_sel = ignore # ignore/add/remove/force
871
872# (OC) Add or remove space between '@selector(x)' and the following word,
873# i.e. '@selector(foo) a:' vs. '@selector(foo)a:'.
874sp_after_oc_at_sel_parens = ignore # ignore/add/remove/force
875
876# (OC) Add or remove space inside '@selector' parentheses,
877# i.e. '@selector(foo)' vs. '@selector( foo )'.
878# Also applies to '@protocol()' constructs.
879sp_inside_oc_at_sel_parens = ignore # ignore/add/remove/force
880
881# (OC) Add or remove space before a block pointer caret,
882# i.e. '^int (int arg){...}' vs. ' ^int (int arg){...}'.
883sp_before_oc_block_caret = ignore # ignore/add/remove/force
884
885# (OC) Add or remove space after a block pointer caret,
886# i.e. '^int (int arg){...}' vs. '^ int (int arg){...}'.
887sp_after_oc_block_caret = ignore # ignore/add/remove/force
888
889# (OC) Add or remove space between the receiver and selector in a message,
890# as in '[receiver selector ...]'.
891sp_after_oc_msg_receiver = ignore # ignore/add/remove/force
892
893# (OC) Add or remove space after '@property'.
894sp_after_oc_property = ignore # ignore/add/remove/force
895
896# (OC) Add or remove space between '@synchronized' and the open parenthesis,
897# i.e. '@synchronized(foo)' vs. '@synchronized (foo)'.
898sp_after_oc_synchronized = ignore # ignore/add/remove/force
899
900# Add or remove space around the ':' in 'b ? t : f'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200901sp_cond_colon = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200902
903# Add or remove space before the ':' in 'b ? t : f'.
904#
905# Overrides sp_cond_colon.
Michal Vaskoe1445952020-08-24 11:19:42 +0200906sp_cond_colon_before = ignore # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200907
908# Add or remove space after the ':' in 'b ? t : f'.
909#
910# Overrides sp_cond_colon.
Michal Vaskoe1445952020-08-24 11:19:42 +0200911sp_cond_colon_after = ignore # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200912
913# Add or remove space around the '?' in 'b ? t : f'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200914sp_cond_question = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200915
916# Add or remove space before the '?' in 'b ? t : f'.
917#
918# Overrides sp_cond_question.
919sp_cond_question_before = ignore # ignore/add/remove/force
920
921# Add or remove space after the '?' in 'b ? t : f'.
922#
923# Overrides sp_cond_question.
924sp_cond_question_after = ignore # ignore/add/remove/force
925
926# In the abbreviated ternary form '(a ?: b)', add or remove space between '?'
927# and ':'.
928#
929# Overrides all other sp_cond_* options.
Michal Vaskoe1445952020-08-24 11:19:42 +0200930sp_cond_ternary_short = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200931
932# Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make
933# sense here.
Michal Vaskoe1445952020-08-24 11:19:42 +0200934sp_case_label = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200935
936# (D) Add or remove space around the D '..' operator.
937sp_range = ignore # ignore/add/remove/force
938
939# Add or remove space after ':' in a Java/C++11 range-based 'for',
940# as in 'for (Type var : expr)'.
941sp_after_for_colon = ignore # ignore/add/remove/force
942
943# Add or remove space before ':' in a Java/C++11 range-based 'for',
944# as in 'for (Type var : expr)'.
945sp_before_for_colon = ignore # ignore/add/remove/force
946
947# (D) Add or remove space between 'extern' and '(' as in 'extern (C)'.
948sp_extern_paren = ignore # ignore/add/remove/force
949
950# Add or remove space after the opening of a C++ comment,
951# i.e. '// A' vs. '//A'.
Michal Vasko033278d2020-08-24 11:24:52 +0200952sp_cmt_cpp_start = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200953
Michal Vasko26bbb272022-08-02 14:54:33 +0200954# Add or remove space in a C++ region marker comment, as in '// <here> BEGIN'.
955# A region marker is defined as a comment which is not preceded by other text
956# (i.e. the comment is the first non-whitespace on the line), and which starts
957# with either 'BEGIN' or 'END'.
958#
959# Overrides sp_cmt_cpp_start.
960sp_cmt_cpp_region = ignore # ignore/add/remove/force/not_defined
961
Radek Krejcia198c962020-08-16 10:32:10 +0200962# If true, space is added with sp_cmt_cpp_start will be added after doxygen
963# sequences like '///', '///<', '//!' and '//!<'.
964sp_cmt_cpp_doxygen = true # true/false
965
966# If true, space is added with sp_cmt_cpp_start will be added after Qt
967# translator or meta-data comments like '//:', '//=', and '//~'.
968sp_cmt_cpp_qttr = true # true/false
969
970# Add or remove space between #else or #endif and a trailing comment.
Michal Vasko033278d2020-08-24 11:24:52 +0200971sp_endif_cmt = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200972
973# Add or remove space after 'new', 'delete' and 'delete[]'.
974sp_after_new = ignore # ignore/add/remove/force
975
976# Add or remove space between 'new' and '(' in 'new()'.
977sp_between_new_paren = ignore # ignore/add/remove/force
978
979# Add or remove space between ')' and type in 'new(foo) BAR'.
980sp_after_newop_paren = ignore # ignore/add/remove/force
981
982# Add or remove space inside parenthesis of the new operator
983# as in 'new(foo) BAR'.
984sp_inside_newop_paren = ignore # ignore/add/remove/force
985
986# Add or remove space after the open parenthesis of the new operator,
987# as in 'new(foo) BAR'.
988#
989# Overrides sp_inside_newop_paren.
990sp_inside_newop_paren_open = ignore # ignore/add/remove/force
991
992# Add or remove space before the close parenthesis of the new operator,
993# as in 'new(foo) BAR'.
994#
995# Overrides sp_inside_newop_paren.
996sp_inside_newop_paren_close = ignore # ignore/add/remove/force
997
Michal Vasko26bbb272022-08-02 14:54:33 +0200998# Add or remove space before a trailing comment.
999sp_before_tr_cmt = ignore # ignore/add/remove/force/not_defined
Radek Krejcia198c962020-08-16 10:32:10 +02001000
Michal Vasko26bbb272022-08-02 14:54:33 +02001001# Number of spaces before a trailing comment.
1002sp_num_before_tr_cmt = 0 # unsigned number
1003
1004# Add or remove space before an embedded comment.
1005#
1006# Default: force
1007sp_before_emb_cmt = force # ignore/add/remove/force/not_defined
1008
1009# Number of spaces before an embedded comment.
1010#
1011# Default: 1
1012sp_num_before_emb_cmt = 1 # unsigned number
1013
1014# Add or remove space after an embedded comment.
1015#
1016# Default: force
1017sp_after_emb_cmt = force # ignore/add/remove/force/not_defined
1018
1019# Number of spaces after an embedded comment.
1020#
1021# Default: 1
1022sp_num_after_emb_cmt = 1 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02001023
1024# (Java) Add or remove space between an annotation and the open parenthesis.
1025sp_annotation_paren = ignore # ignore/add/remove/force
1026
1027# If true, vbrace tokens are dropped to the previous token and skipped.
1028sp_skip_vbrace_tokens = false # true/false
1029
1030# Add or remove space after 'noexcept'.
1031sp_after_noexcept = ignore # ignore/add/remove/force
1032
1033# Add or remove space after '_'.
1034sp_vala_after_translation = ignore # ignore/add/remove/force
1035
1036# If true, a <TAB> is inserted after #define.
1037force_tab_after_define = false # true/false
1038
1039#
1040# Indenting options
1041#
1042
1043# The number of columns to indent per level. Usually 2, 3, 4, or 8.
1044#
1045# Default: 8
1046indent_columns = 4 # unsigned number
1047
Michal Vasko26bbb272022-08-02 14:54:33 +02001048# Whether to ignore indent for the first continuation line. Subsequent
1049# continuation lines will still be indented to match the first.
1050indent_ignore_first_continue = false # true/false
1051
Radek Krejcia198c962020-08-16 10:32:10 +02001052# The continuation indent. If non-zero, this overrides the indent of '(', '['
1053# and '=' continuation indents. Negative values are OK; negative value is
1054# absolute and not increased for each '(' or '[' level.
1055#
1056# For FreeBSD, this is set to 4.
1057indent_continue = 8 # number
1058
1059# The continuation indent, only for class header line(s). If non-zero, this
1060# overrides the indent of 'class' continuation indents.
1061indent_continue_class_head = 0 # unsigned number
1062
1063# Whether to indent empty lines (i.e. lines which contain only spaces before
1064# the newline character).
1065indent_single_newlines = false # true/false
1066
1067# The continuation indent for func_*_param if they are true. If non-zero, this
1068# overrides the indent.
Michal Vasko69730152020-10-09 16:30:07 +02001069indent_param = 4 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02001070
1071# How to use tabs when indenting code.
1072#
1073# 0: Spaces only
1074# 1: Indent with tabs to brace level, align with spaces (default)
1075# 2: Indent and align with tabs, using spaces when not on a tabstop
1076#
1077# Default: 1
1078indent_with_tabs = 0 # unsigned number
1079
1080# Whether to indent comments that are not at a brace level with tabs on a
1081# tabstop. Requires indent_with_tabs=2. If false, will use spaces.
1082indent_cmt_with_tabs = false # true/false
1083
1084# Whether to indent strings broken by '\' so that they line up.
1085indent_align_string = false # true/false
1086
1087# The number of spaces to indent multi-line XML strings.
1088# Requires indent_align_string=true.
Michal Vasko69730152020-10-09 16:30:07 +02001089indent_xml_string = 4 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02001090
1091# Spaces to indent '{' from level.
1092indent_brace = 0 # unsigned number
1093
1094# Whether braces are indented to the body level.
1095indent_braces = false # true/false
1096
1097# Whether to disable indenting function braces if indent_braces=true.
1098indent_braces_no_func = false # true/false
1099
1100# Whether to disable indenting class braces if indent_braces=true.
1101indent_braces_no_class = false # true/false
1102
1103# Whether to disable indenting struct braces if indent_braces=true.
1104indent_braces_no_struct = false # true/false
1105
1106# Whether to indent based on the size of the brace parent,
1107# i.e. 'if' => 3 spaces, 'for' => 4 spaces, etc.
1108indent_brace_parent = false # true/false
1109
1110# Whether to indent based on the open parenthesis instead of the open brace
1111# in '({\n'.
1112indent_paren_open_brace = false # true/false
1113
1114# (C#) Whether to indent the brace of a C# delegate by another level.
1115indent_cs_delegate_brace = false # true/false
1116
1117# (C#) Whether to indent a C# delegate (to handle delegates with no brace) by
1118# another level.
1119indent_cs_delegate_body = false # true/false
1120
1121# Whether to indent the body of a 'namespace'.
1122indent_namespace = false # true/false
1123
1124# Whether to indent only the first namespace, and not any nested namespaces.
1125# Requires indent_namespace=true.
1126indent_namespace_single_indent = false # true/false
1127
1128# The number of spaces to indent a namespace block.
1129# If set to zero, use the value indent_columns
1130indent_namespace_level = 0 # unsigned number
1131
1132# If the body of the namespace is longer than this number, it won't be
1133# indented. Requires indent_namespace=true. 0 means no limit.
1134indent_namespace_limit = 0 # unsigned number
1135
Michal Vasko26bbb272022-08-02 14:54:33 +02001136# Whether to indent only in inner namespaces (nested in other namespaces).
1137# Requires indent_namespace=true.
1138indent_namespace_inner_only = false # true/false
1139
Radek Krejcia198c962020-08-16 10:32:10 +02001140# Whether the 'extern "C"' body is indented.
1141indent_extern = false # true/false
1142
1143# Whether the 'class' body is indented.
1144indent_class = false # true/false
1145
Michal Vasko26bbb272022-08-02 14:54:33 +02001146# Whether to ignore indent for the leading base class colon.
1147indent_ignore_before_class_colon = false # true/false
1148
1149# Additional indent before the leading base class colon.
1150# Negative values decrease indent down to the first column.
1151# Requires a newline break before colon (see pos_class_colon
1152# and nl_class_colon)
1153indent_before_class_colon = 0 # number
1154
Radek Krejcia198c962020-08-16 10:32:10 +02001155# Whether to indent the stuff after a leading base class colon.
1156indent_class_colon = false # true/false
1157
1158# Whether to indent based on a class colon instead of the stuff after the
1159# colon. Requires indent_class_colon=true.
1160indent_class_on_colon = false # true/false
1161
Michal Vasko26bbb272022-08-02 14:54:33 +02001162# Whether to ignore indent for a leading class initializer colon.
1163indent_ignore_before_constr_colon = false # true/false
1164
Radek Krejcia198c962020-08-16 10:32:10 +02001165# Whether to indent the stuff after a leading class initializer colon.
1166indent_constr_colon = false # true/false
1167
1168# Virtual indent from the ':' for member initializers.
1169#
1170# Default: 2
1171indent_ctor_init_leading = 0 # unsigned number
1172
Michal Vasko26bbb272022-08-02 14:54:33 +02001173# Virtual indent from the ':' for following member initializers.
1174#
1175# Default: 2
1176indent_ctor_init_following = 2 # unsigned number
1177
Radek Krejcia198c962020-08-16 10:32:10 +02001178# Additional indent for constructor initializer list.
1179# Negative values decrease indent down to the first column.
1180indent_ctor_init = 0 # number
1181
1182# Whether to indent 'if' following 'else' as a new block under the 'else'.
1183# If false, 'else\nif' is treated as 'else if' for indenting purposes.
1184indent_else_if = false # true/false
1185
1186# Amount to indent variable declarations after a open brace.
1187#
1188# <0: Relative
1189# >=0: Absolute
1190indent_var_def_blk = 0 # number
1191
1192# Whether to indent continued variable declarations instead of aligning.
Michal Vasko69730152020-10-09 16:30:07 +02001193indent_var_def_cont = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001194
Michal Vasko26bbb272022-08-02 14:54:33 +02001195# How to indent continued shift expressions ('<<' and '>>').
1196# Set align_left_shift=false when using this.
1197# 0: Align shift operators instead of indenting them (default)
1198# 1: Indent by one level
1199# -1: Preserve original indentation
1200indent_shift = 1 # number
Radek Krejcia198c962020-08-16 10:32:10 +02001201
1202# Whether to force indentation of function definitions to start in column 1.
1203indent_func_def_force_col1 = false # true/false
1204
1205# Whether to indent continued function call parameters one indent level,
1206# rather than aligning parameters under the open parenthesis.
Michal Vasko69730152020-10-09 16:30:07 +02001207indent_func_call_param = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001208
1209# Whether to indent continued function definition parameters one indent level,
1210# rather than aligning parameters under the open parenthesis.
Michal Vasko69730152020-10-09 16:30:07 +02001211indent_func_def_param = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001212
1213# for function definitions, only if indent_func_def_param is false
1214# Allows to align params when appropriate and indent them when not
1215# behave as if it was true if paren position is more than this value
1216# if paren position is more than the option value
1217indent_func_def_param_paren_pos_threshold = 0 # unsigned number
1218
1219# Whether to indent continued function call prototype one indent level,
1220# rather than aligning parameters under the open parenthesis.
Michal Vasko69730152020-10-09 16:30:07 +02001221indent_func_proto_param = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001222
1223# Whether to indent continued function call declaration one indent level,
1224# rather than aligning parameters under the open parenthesis.
Michal Vasko69730152020-10-09 16:30:07 +02001225indent_func_class_param = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001226
1227# Whether to indent continued class variable constructors one indent level,
1228# rather than aligning parameters under the open parenthesis.
Michal Vasko69730152020-10-09 16:30:07 +02001229indent_func_ctor_var_param = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001230
1231# Whether to indent continued template parameter list one indent level,
1232# rather than aligning parameters under the open parenthesis.
Michal Vasko69730152020-10-09 16:30:07 +02001233indent_template_param = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001234
1235# Double the indent for indent_func_xxx_param options.
1236# Use both values of the options indent_columns and indent_param.
Michal Vasko69730152020-10-09 16:30:07 +02001237indent_func_param_double = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001238
1239# Indentation column for standalone 'const' qualifier on a function
1240# prototype.
1241indent_func_const = 0 # unsigned number
1242
1243# Indentation column for standalone 'throw' qualifier on a function
1244# prototype.
1245indent_func_throw = 0 # unsigned number
1246
1247# How to indent within a macro followed by a brace on the same line
1248# This allows reducing the indent in macros that have (for example)
1249# `do { ... } while (0)` blocks bracketing them.
1250#
1251# true: add an indent for the brace on the same line as the macro
1252# false: do not add an indent for the brace on the same line as the macro
1253#
1254# Default: true
1255indent_macro_brace = false # true/false
1256
1257# The number of spaces to indent a continued '->' or '.'.
1258# Usually set to 0, 1, or indent_columns.
1259indent_member = 0 # unsigned number
1260
1261# Whether lines broken at '.' or '->' should be indented by a single indent.
1262# The indent_member option will not be effective if this is set to true.
Michal Vasko69730152020-10-09 16:30:07 +02001263indent_member_single = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001264
1265# Spaces to indent single line ('//') comments on lines before code.
Michal Vasko26bbb272022-08-02 14:54:33 +02001266indent_single_line_comments_before = 0 # unsigned number
1267
1268# Spaces to indent single line ('//') comments on lines after code.
1269indent_single_line_comments_after = 0 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02001270
1271# When opening a paren for a control statement (if, for, while, etc), increase
1272# the indent level by this value. Negative values decrease the indent level.
1273indent_sparen_extra = 0 # number
1274
1275# Whether to indent trailing single line ('//') comments relative to the code
1276# instead of trying to keep the same absolute column.
1277indent_relative_single_line_comments = false # true/false
1278
1279# Spaces to indent 'case' from 'switch'. Usually 0 or indent_columns.
1280indent_switch_case = 0 # unsigned number
1281
Michal Vasko26bbb272022-08-02 14:54:33 +02001282# Spaces to indent the body of a 'switch' before any 'case'.
1283# Usually the same as indent_columns or indent_switch_case.
1284indent_switch_body = 0 # unsigned number
1285
1286# Whether to ignore indent for '{' following 'case'.
1287indent_ignore_case_brace = false # true/false
1288
Radek Krejcia198c962020-08-16 10:32:10 +02001289# indent 'break' with 'case' from 'switch'.
1290indent_switch_break_with_case = false # true/false
1291
1292# Whether to indent preprocessor statements inside of switch statements.
1293#
1294# Default: true
1295indent_switch_pp = false # true/false
1296
1297# Spaces to shift the 'case' line, without affecting any other lines.
1298# Usually 0.
1299indent_case_shift = 0 # unsigned number
1300
1301# Spaces to indent '{' from 'case'. By default, the brace will appear under
1302# the 'c' in case. Usually set to 0 or indent_columns. Negative values are OK.
1303indent_case_brace = 0 # number
1304
Michal Vasko26bbb272022-08-02 14:54:33 +02001305# Whether to indent comments not found in first column.
1306#
1307# Default: true
1308indent_comment = true # true/false
1309
Radek Krejcia198c962020-08-16 10:32:10 +02001310# Whether to indent comments found in first column.
1311indent_col1_comment = false # true/false
1312
1313# Whether to indent multi string literal in first column.
1314indent_col1_multi_string_literal = false # true/false
1315
Michal Vasko26bbb272022-08-02 14:54:33 +02001316# Align comments on adjacent lines that are this many columns apart or less.
1317#
1318# Default: 3
1319indent_comment_align_thresh = 3 # unsigned number
1320
1321# Whether to ignore indent for goto labels.
1322indent_ignore_label = true # true/false
1323
Radek Krejcia198c962020-08-16 10:32:10 +02001324# How to indent goto labels.
1325#
1326# >0: Absolute column where 1 is the leftmost column
1327# <=0: Subtract from brace indent
1328#
1329# Default: 1
1330indent_label = 1 # number
1331
1332# How to indent access specifiers that are followed by a
1333# colon.
1334#
1335# >0: Absolute column where 1 is the leftmost column
1336# <=0: Subtract from brace indent
1337#
1338# Default: 1
1339indent_access_spec = 1 # number
1340
1341# Whether to indent the code after an access specifier by one level.
1342# If true, this option forces 'indent_access_spec=0'.
1343indent_access_spec_body = false # true/false
1344
1345# If an open parenthesis is followed by a newline, whether to indent the next
1346# line so that it lines up after the open parenthesis (not recommended).
1347indent_paren_nl = false # true/false
1348
1349# How to indent a close parenthesis after a newline.
1350#
1351# 0: Indent to body level (default)
1352# 1: Align under the open parenthesis
1353# 2: Indent to the brace level
1354indent_paren_close = 1 # unsigned number
1355
1356# Whether to indent the open parenthesis of a function definition,
1357# if the parenthesis is on its own line.
1358indent_paren_after_func_def = false # true/false
1359
1360# Whether to indent the open parenthesis of a function declaration,
1361# if the parenthesis is on its own line.
1362indent_paren_after_func_decl = false # true/false
1363
1364# Whether to indent the open parenthesis of a function call,
1365# if the parenthesis is on its own line.
1366indent_paren_after_func_call = false # true/false
1367
Michal Vasko26bbb272022-08-02 14:54:33 +02001368# How to indent a comma when inside braces.
1369# 0: Indent by one level (default)
1370# 1: Align under the open brace
1371# -1: Preserve original indentation
1372indent_comma_brace = 0 # number
Radek Krejcia198c962020-08-16 10:32:10 +02001373
Michal Vasko26bbb272022-08-02 14:54:33 +02001374# How to indent a comma when inside parentheses.
1375# 0: Indent by one level (default)
1376# 1: Align under the open parenthesis
1377# -1: Preserve original indentation
1378indent_comma_paren = 0 # number
1379
1380# How to indent a Boolean operator when inside parentheses.
1381# 0: Indent by one level (default)
1382# 1: Align under the open parenthesis
1383# -1: Preserve original indentation
1384indent_bool_paren = 0 # number
1385
1386# Whether to ignore the indentation of a Boolean operator when outside
1387# parentheses.
1388indent_ignore_bool = false # true/false
1389
1390# Whether to ignore the indentation of an arithmetic operator.
1391indent_ignore_arith = false # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001392
1393# Whether to indent a semicolon when inside a for parenthesis.
1394# If true, aligns under the open for parenthesis.
1395indent_semicolon_for_paren = false # true/false
1396
Michal Vasko26bbb272022-08-02 14:54:33 +02001397# Whether to ignore the indentation of a semicolon outside of a 'for'
1398# statement.
1399indent_ignore_semicolon = false # true/false
1400
Radek Krejcia198c962020-08-16 10:32:10 +02001401# Whether to align the first expression to following ones
1402# if indent_bool_paren=true.
1403indent_first_bool_expr = false # true/false
1404
1405# Whether to align the first expression to following ones
1406# if indent_semicolon_for_paren=true.
1407indent_first_for_expr = false # true/false
1408
1409# If an open square is followed by a newline, whether to indent the next line
1410# so that it lines up after the open square (not recommended).
1411indent_square_nl = false # true/false
1412
1413# (ESQL/C) Whether to preserve the relative indent of 'EXEC SQL' bodies.
1414indent_preserve_sql = false # true/false
1415
Michal Vasko26bbb272022-08-02 14:54:33 +02001416# Whether to ignore the indentation of an assignment operator.
1417indent_ignore_assign = false # true/false
1418
Radek Krejcia198c962020-08-16 10:32:10 +02001419# Whether to align continued statements at the '='. If false or if the '=' is
1420# followed by a newline, the next line is indent one tab.
1421#
1422# Default: true
Michal Vasko69730152020-10-09 16:30:07 +02001423indent_align_assign = false # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001424
1425# If true, the indentation of the chunks after a '=' sequence will be set at
1426# LHS token indentation column before '='.
1427indent_off_after_assign = false # true/false
1428
1429# Whether to align continued statements at the '('. If false or the '(' is
1430# followed by a newline, the next line indent is one tab.
1431#
1432# Default: true
1433indent_align_paren = true # true/false
1434
1435# (OC) Whether to indent Objective-C code inside message selectors.
1436indent_oc_inside_msg_sel = false # true/false
1437
1438# (OC) Whether to indent Objective-C blocks at brace level instead of usual
1439# rules.
1440indent_oc_block = false # true/false
1441
1442# (OC) Indent for Objective-C blocks in a message relative to the parameter
1443# name.
1444#
1445# =0: Use indent_oc_block rules
1446# >0: Use specified number of spaces to indent
1447indent_oc_block_msg = 0 # unsigned number
1448
1449# (OC) Minimum indent for subsequent parameters
1450indent_oc_msg_colon = 0 # unsigned number
1451
1452# (OC) Whether to prioritize aligning with initial colon (and stripping spaces
1453# from lines, if necessary).
1454#
1455# Default: true
1456indent_oc_msg_prioritize_first_colon = true # true/false
1457
1458# (OC) Whether to indent blocks the way that Xcode does by default
1459# (from the keyword if the parameter is on its own line; otherwise, from the
1460# previous indentation level). Requires indent_oc_block_msg=true.
1461indent_oc_block_msg_xcode_style = false # true/false
1462
1463# (OC) Whether to indent blocks from where the brace is, relative to a
1464# message keyword. Requires indent_oc_block_msg=true.
1465indent_oc_block_msg_from_keyword = false # true/false
1466
1467# (OC) Whether to indent blocks from where the brace is, relative to a message
1468# colon. Requires indent_oc_block_msg=true.
1469indent_oc_block_msg_from_colon = false # true/false
1470
1471# (OC) Whether to indent blocks from where the block caret is.
1472# Requires indent_oc_block_msg=true.
1473indent_oc_block_msg_from_caret = false # true/false
1474
1475# (OC) Whether to indent blocks from where the brace caret is.
1476# Requires indent_oc_block_msg=true.
1477indent_oc_block_msg_from_brace = false # true/false
1478
1479# When indenting after virtual brace open and newline add further spaces to
1480# reach this minimum indent.
Michal Vasko69730152020-10-09 16:30:07 +02001481indent_min_vbrace_open = 4 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02001482
1483# Whether to add further spaces after regular indent to reach next tabstop
1484# when identing after virtual brace open and newline.
1485indent_vbrace_open_on_tabstop = false # true/false
1486
1487# How to indent after a brace followed by another token (not a newline).
1488# true: indent all contained lines to match the token
1489# false: indent all contained lines to match the brace
1490#
1491# Default: true
1492indent_token_after_brace = false # true/false
1493
1494# Whether to indent the body of a C++11 lambda.
1495indent_cpp_lambda_body = false # true/false
1496
1497# How to indent compound literals that are being returned.
1498# true: add both the indent from return & the compound literal open brace (ie:
1499# 2 indent levels)
1500# false: only indent 1 level, don't add the indent for the open brace, only add
1501# the indent for the return.
1502#
1503# Default: true
1504indent_compound_literal_return = true # true/false
1505
1506# (C#) Whether to indent a 'using' block if no braces are used.
1507#
1508# Default: true
1509indent_using_block = true # true/false
1510
1511# How to indent the continuation of ternary operator.
1512#
1513# 0: Off (default)
1514# 1: When the `if_false` is a continuation, indent it under `if_false`
1515# 2: When the `:` is a continuation, indent it under `?`
Michal Vasko69730152020-10-09 16:30:07 +02001516indent_ternary_operator = 0 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02001517
1518# Whether to indent the statments inside ternary operator.
1519indent_inside_ternary_operator = false # true/false
1520
1521# If true, the indentation of the chunks after a `return` sequence will be set at return indentation column.
1522indent_off_after_return = false # true/false
1523
1524# If true, the indentation of the chunks after a `return new` sequence will be set at return indentation column.
1525indent_off_after_return_new = false # true/false
1526
1527# If true, the tokens after return are indented with regular single indentation. By default (false) the indentation is after the return token.
1528indent_single_after_return = false # true/false
1529
1530# Whether to ignore indent and alignment for 'asm' blocks (i.e. assume they
1531# have their own indentation).
1532indent_ignore_asm_block = true # true/false
1533
Michal Vasko26bbb272022-08-02 14:54:33 +02001534# Don't indent the close parenthesis of a function definition,
1535# if the parenthesis is on its own line.
1536donot_indent_func_def_close_paren = false # true/false
1537
Radek Krejcia198c962020-08-16 10:32:10 +02001538#
1539# Newline adding and removing options
1540#
1541
Michal Vasko2bf4af42023-01-04 12:08:38 +01001542# Whether to collapse empty blocks between '{' and '}' except for functions.
1543# Use nl_collapse_empty_body_functions to specify how empty function braces
1544# should be formatted.
Radek Krejcia198c962020-08-16 10:32:10 +02001545nl_collapse_empty_body = true # true/false
1546
Michal Vasko2bf4af42023-01-04 12:08:38 +01001547# Whether to collapse empty blocks between '{' and '}' for functions only.
1548# If true, overrides nl_inside_empty_func.
1549nl_collapse_empty_body_functions = false # true/false
1550
Radek Krejcia198c962020-08-16 10:32:10 +02001551# Don't split one-line braced assignments, as in 'foo_t f = { 1, 2 };'.
1552nl_assign_leave_one_liners = true # true/false
1553
1554# Don't split one-line braced statements inside a 'class xx { }' body.
1555nl_class_leave_one_liners = true # true/false
1556
1557# Don't split one-line enums, as in 'enum foo { BAR = 15 };'
1558nl_enum_leave_one_liners = true # true/false
1559
1560# Don't split one-line get or set functions.
1561nl_getset_leave_one_liners = true # true/false
1562
1563# (C#) Don't split one-line property get or set functions.
1564nl_cs_property_leave_one_liners = true # true/false
1565
1566# Don't split one-line function definitions, as in 'int foo() { return 0; }'.
1567# might modify nl_func_type_name
1568nl_func_leave_one_liners = true # true/false
1569
1570# Don't split one-line C++11 lambdas, as in '[]() { return 0; }'.
1571nl_cpp_lambda_leave_one_liners = true # true/false
1572
1573# Don't split one-line if/else statements, as in 'if(...) b++;'.
Michal Vasko69730152020-10-09 16:30:07 +02001574nl_if_leave_one_liners = false # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001575
1576# Don't split one-line while statements, as in 'while(...) b++;'.
Michal Vasko69730152020-10-09 16:30:07 +02001577nl_while_leave_one_liners = false # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001578
Michal Vasko26bbb272022-08-02 14:54:33 +02001579# Don't split one-line do statements, as in 'do { b++; } while(...);'.
1580nl_do_leave_one_liners = false # true/false
1581
Radek Krejcia198c962020-08-16 10:32:10 +02001582# Don't split one-line for statements, as in 'for(...) b++;'.
Michal Vasko69730152020-10-09 16:30:07 +02001583nl_for_leave_one_liners = false # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001584
1585# (OC) Don't split one-line Objective-C messages.
1586nl_oc_msg_leave_one_liner = true # true/false
1587
1588# (OC) Add or remove newline between method declaration and '{'.
1589nl_oc_mdef_brace = ignore # ignore/add/remove/force
1590
1591# (OC) Add or remove newline between Objective-C block signature and '{'.
1592nl_oc_block_brace = ignore # ignore/add/remove/force
1593
1594# (OC) Add or remove blank line before '@interface' statement.
1595nl_oc_before_interface = ignore # ignore/add/remove/force
1596
1597# (OC) Add or remove blank line before '@implementation' statement.
1598nl_oc_before_implementation = ignore # ignore/add/remove/force
1599
1600# (OC) Add or remove blank line before '@end' statement.
1601nl_oc_before_end = ignore # ignore/add/remove/force
1602
1603# (OC) Add or remove newline between '@interface' and '{'.
1604nl_oc_interface_brace = ignore # ignore/add/remove/force
1605
1606# (OC) Add or remove newline between '@implementation' and '{'.
1607nl_oc_implementation_brace = ignore # ignore/add/remove/force
1608
1609# Add or remove newlines at the start of the file.
Michal Vasko69730152020-10-09 16:30:07 +02001610nl_start_of_file = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001611
1612# The minimum number of newlines at the start of the file (only used if
1613# nl_start_of_file is 'add' or 'force').
1614nl_start_of_file_min = 0 # unsigned number
1615
1616# Add or remove newline at the end of the file.
Michal Vasko69730152020-10-09 16:30:07 +02001617nl_end_of_file = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001618
1619# The minimum number of newlines at the end of the file (only used if
1620# nl_end_of_file is 'add' or 'force').
Michal Vasko69730152020-10-09 16:30:07 +02001621nl_end_of_file_min = 1 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02001622
1623# Add or remove newline between '=' and '{'.
1624nl_assign_brace = ignore # ignore/add/remove/force
1625
1626# (D) Add or remove newline between '=' and '['.
1627nl_assign_square = ignore # ignore/add/remove/force
1628
1629# Add or remove newline between '[]' and '{'.
1630nl_tsquare_brace = ignore # ignore/add/remove/force
1631
1632# (D) Add or remove newline after '= ['. Will also affect the newline before
1633# the ']'.
1634nl_after_square_assign = ignore # ignore/add/remove/force
1635
1636# Add or remove newline between a function call's ')' and '{', as in
1637# 'list_for_each(item, &list) { }'.
1638nl_fcall_brace = ignore # ignore/add/remove/force
1639
1640# Add or remove newline between 'enum' and '{'.
Michal Vasko26bbb272022-08-02 14:54:33 +02001641nl_enum_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001642
1643# Add or remove newline between 'enum' and 'class'.
1644nl_enum_class = ignore # ignore/add/remove/force
1645
1646# Add or remove newline between 'enum class' and the identifier.
1647nl_enum_class_identifier = ignore # ignore/add/remove/force
1648
1649# Add or remove newline between 'enum class' type and ':'.
1650nl_enum_identifier_colon = ignore # ignore/add/remove/force
1651
1652# Add or remove newline between 'enum class identifier :' and type.
1653nl_enum_colon_type = ignore # ignore/add/remove/force
1654
1655# Add or remove newline between 'struct and '{'.
Michal Vasko26bbb272022-08-02 14:54:33 +02001656nl_struct_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001657
1658# Add or remove newline between 'union' and '{'.
Michal Vasko26bbb272022-08-02 14:54:33 +02001659nl_union_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001660
1661# Add or remove newline between 'if' and '{'.
Michal Vasko69730152020-10-09 16:30:07 +02001662nl_if_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001663
1664# Add or remove newline between '}' and 'else'.
1665nl_brace_else = remove # ignore/add/remove/force
1666
1667# Add or remove newline between 'else if' and '{'. If set to ignore,
1668# nl_if_brace is used instead.
1669nl_elseif_brace = ignore # ignore/add/remove/force
1670
1671# Add or remove newline between 'else' and '{'.
Michal Vasko69730152020-10-09 16:30:07 +02001672nl_else_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001673
1674# Add or remove newline between 'else' and 'if'.
Michal Vasko69730152020-10-09 16:30:07 +02001675nl_else_if = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001676
1677# Add or remove newline before '{' opening brace
Michal Vasko69730152020-10-09 16:30:07 +02001678nl_before_opening_brace_func_class_def = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001679
1680# Add or remove newline before 'if'/'else if' closing parenthesis.
Michal Vasko69730152020-10-09 16:30:07 +02001681nl_before_if_closing_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001682
1683# Add or remove newline between '}' and 'finally'.
1684nl_brace_finally = ignore # ignore/add/remove/force
1685
1686# Add or remove newline between 'finally' and '{'.
1687nl_finally_brace = ignore # ignore/add/remove/force
1688
1689# Add or remove newline between 'try' and '{'.
1690nl_try_brace = ignore # ignore/add/remove/force
1691
1692# Add or remove newline between get/set and '{'.
1693nl_getset_brace = ignore # ignore/add/remove/force
1694
1695# Add or remove newline between 'for' and '{'.
Michal Vasko69730152020-10-09 16:30:07 +02001696nl_for_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001697
1698# Add or remove newline before the '{' of a 'catch' statement, as in
1699# 'catch (decl) <here> {'.
1700nl_catch_brace = ignore # ignore/add/remove/force
1701
1702# (OC) Add or remove newline before the '{' of a '@catch' statement, as in
1703# '@catch (decl) <here> {'. If set to ignore, nl_catch_brace is used.
1704nl_oc_catch_brace = ignore # ignore/add/remove/force
1705
1706# Add or remove newline between '}' and 'catch'.
1707nl_brace_catch = ignore # ignore/add/remove/force
1708
1709# (OC) Add or remove newline between '}' and '@catch'. If set to ignore,
1710# nl_brace_catch is used.
1711nl_oc_brace_catch = ignore # ignore/add/remove/force
1712
1713# Add or remove newline between '}' and ']'.
1714nl_brace_square = ignore # ignore/add/remove/force
1715
1716# Add or remove newline between '}' and ')' in a function invocation.
1717nl_brace_fparen = ignore # ignore/add/remove/force
1718
1719# Add or remove newline between 'while' and '{'.
Michal Vasko69730152020-10-09 16:30:07 +02001720nl_while_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001721
1722# (D) Add or remove newline between 'scope (x)' and '{'.
1723nl_scope_brace = ignore # ignore/add/remove/force
1724
1725# (D) Add or remove newline between 'unittest' and '{'.
1726nl_unittest_brace = ignore # ignore/add/remove/force
1727
1728# (D) Add or remove newline between 'version (x)' and '{'.
1729nl_version_brace = ignore # ignore/add/remove/force
1730
1731# (C#) Add or remove newline between 'using' and '{'.
1732nl_using_brace = ignore # ignore/add/remove/force
1733
1734# Add or remove newline between two open or close braces. Due to general
1735# newline/brace handling, REMOVE may not work.
1736nl_brace_brace = ignore # ignore/add/remove/force
1737
1738# Add or remove newline between 'do' and '{'.
Michal Vasko69730152020-10-09 16:30:07 +02001739nl_do_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001740
1741# Add or remove newline between '}' and 'while' of 'do' statement.
Michal Vasko69730152020-10-09 16:30:07 +02001742nl_brace_while = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001743
1744# Add or remove newline between 'switch' and '{'.
Michal Vasko69730152020-10-09 16:30:07 +02001745nl_switch_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001746
1747# Add or remove newline between 'synchronized' and '{'.
1748nl_synchronized_brace = ignore # ignore/add/remove/force
1749
1750# Add a newline between ')' and '{' if the ')' is on a different line than the
1751# if/for/etc.
1752#
1753# Overrides nl_for_brace, nl_if_brace, nl_switch_brace, nl_while_switch and
1754# nl_catch_brace.
1755nl_multi_line_cond = false # true/false
1756
1757# Add a newline after '(' if an if/for/while/switch condition spans multiple
1758# lines
1759nl_multi_line_sparen_open = ignore # ignore/add/remove/force
1760
1761# Add a newline before ')' if an if/for/while/switch condition spans multiple
1762# lines. Overrides nl_before_if_closing_paren if both are specified.
1763nl_multi_line_sparen_close = ignore # ignore/add/remove/force
1764
1765# Force a newline in a define after the macro name for multi-line defines.
1766nl_multi_line_define = false # true/false
1767
1768# Whether to add a newline before 'case', and a blank line before a 'case'
1769# statement that follows a ';' or '}'.
1770nl_before_case = false # true/false
1771
1772# Whether to add a newline after a 'case' statement.
Michal Vasko69730152020-10-09 16:30:07 +02001773nl_after_case = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001774
1775# Add or remove newline between a case ':' and '{'.
1776#
1777# Overrides nl_after_case.
Michal Vasko69730152020-10-09 16:30:07 +02001778nl_case_colon_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001779
1780# Add or remove newline between ')' and 'throw'.
1781nl_before_throw = ignore # ignore/add/remove/force
1782
1783# Add or remove newline between 'namespace' and '{'.
1784nl_namespace_brace = ignore # ignore/add/remove/force
1785
1786# Add or remove newline after 'template<...>' of a template class.
1787nl_template_class = ignore # ignore/add/remove/force
1788
1789# Add or remove newline after 'template<...>' of a template class declaration.
1790#
1791# Overrides nl_template_class.
1792nl_template_class_decl = ignore # ignore/add/remove/force
1793
1794# Add or remove newline after 'template<>' of a specialized class declaration.
1795#
1796# Overrides nl_template_class_decl.
1797nl_template_class_decl_special = ignore # ignore/add/remove/force
1798
1799# Add or remove newline after 'template<...>' of a template class definition.
1800#
1801# Overrides nl_template_class.
1802nl_template_class_def = ignore # ignore/add/remove/force
1803
1804# Add or remove newline after 'template<>' of a specialized class definition.
1805#
1806# Overrides nl_template_class_def.
1807nl_template_class_def_special = ignore # ignore/add/remove/force
1808
1809# Add or remove newline after 'template<...>' of a template function.
1810nl_template_func = ignore # ignore/add/remove/force
1811
1812# Add or remove newline after 'template<...>' of a template function
1813# declaration.
1814#
1815# Overrides nl_template_func.
1816nl_template_func_decl = ignore # ignore/add/remove/force
1817
1818# Add or remove newline after 'template<>' of a specialized function
1819# declaration.
1820#
1821# Overrides nl_template_func_decl.
1822nl_template_func_decl_special = ignore # ignore/add/remove/force
1823
1824# Add or remove newline after 'template<...>' of a template function
1825# definition.
1826#
1827# Overrides nl_template_func.
1828nl_template_func_def = ignore # ignore/add/remove/force
1829
1830# Add or remove newline after 'template<>' of a specialized function
1831# definition.
1832#
1833# Overrides nl_template_func_def.
1834nl_template_func_def_special = ignore # ignore/add/remove/force
1835
1836# Add or remove newline after 'template<...>' of a template variable.
1837nl_template_var = ignore # ignore/add/remove/force
1838
1839# Add or remove newline between 'template<...>' and 'using' of a templated
1840# type alias.
1841nl_template_using = ignore # ignore/add/remove/force
1842
1843# Add or remove newline between 'class' and '{'.
1844nl_class_brace = ignore # ignore/add/remove/force
1845
1846# Add or remove newline before or after (depending on pos_class_comma,
1847# may not be IGNORE) each',' in the base class list.
1848nl_class_init_args = ignore # ignore/add/remove/force
1849
1850# Add or remove newline after each ',' in the constructor member
1851# initialization. Related to nl_constr_colon, pos_constr_colon and
1852# pos_constr_comma.
1853nl_constr_init_args = ignore # ignore/add/remove/force
1854
1855# Add or remove newline before first element, after comma, and after last
1856# element, in 'enum'.
1857nl_enum_own_lines = ignore # ignore/add/remove/force
1858
1859# Add or remove newline between return type and function name in a function
1860# definition.
1861# might be modified by nl_func_leave_one_liners
Michal Vasko69730152020-10-09 16:30:07 +02001862nl_func_type_name = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001863
1864# Add or remove newline between return type and function name inside a class
1865# definition. If set to ignore, nl_func_type_name or nl_func_proto_type_name
1866# is used instead.
1867nl_func_type_name_class = ignore # ignore/add/remove/force
1868
1869# Add or remove newline between class specification and '::'
1870# in 'void A::f() { }'. Only appears in separate member implementation (does
1871# not appear with in-line implementation).
1872nl_func_class_scope = ignore # ignore/add/remove/force
1873
1874# Add or remove newline between function scope and name, as in
1875# 'void A :: <here> f() { }'.
1876nl_func_scope_name = ignore # ignore/add/remove/force
1877
1878# Add or remove newline between return type and function name in a prototype.
Michal Vasko69730152020-10-09 16:30:07 +02001879nl_func_proto_type_name = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001880
1881# Add or remove newline between a function name and the opening '(' in the
1882# declaration.
Michal Vasko69730152020-10-09 16:30:07 +02001883nl_func_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001884
1885# Overrides nl_func_paren for functions with no parameters.
1886nl_func_paren_empty = ignore # ignore/add/remove/force
1887
1888# Add or remove newline between a function name and the opening '(' in the
1889# definition.
Michal Vasko69730152020-10-09 16:30:07 +02001890nl_func_def_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001891
1892# Overrides nl_func_def_paren for functions with no parameters.
1893nl_func_def_paren_empty = ignore # ignore/add/remove/force
1894
1895# Add or remove newline between a function name and the opening '(' in the
1896# call.
Michal Vasko69730152020-10-09 16:30:07 +02001897nl_func_call_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001898
1899# Overrides nl_func_call_paren for functions with no parameters.
1900nl_func_call_paren_empty = ignore # ignore/add/remove/force
1901
1902# Add or remove newline after '(' in a function declaration.
1903nl_func_decl_start = ignore # ignore/add/remove/force
1904
1905# Add or remove newline after '(' in a function definition.
1906nl_func_def_start = ignore # ignore/add/remove/force
1907
1908# Overrides nl_func_decl_start when there is only one parameter.
1909nl_func_decl_start_single = ignore # ignore/add/remove/force
1910
1911# Overrides nl_func_def_start when there is only one parameter.
1912nl_func_def_start_single = ignore # ignore/add/remove/force
1913
1914# Whether to add a newline after '(' in a function declaration if '(' and ')'
1915# are in different lines. If false, nl_func_decl_start is used instead.
1916nl_func_decl_start_multi_line = false # true/false
1917
1918# Whether to add a newline after '(' in a function definition if '(' and ')'
1919# are in different lines. If false, nl_func_def_start is used instead.
1920nl_func_def_start_multi_line = false # true/false
1921
1922# Add or remove newline after each ',' in a function declaration.
1923nl_func_decl_args = ignore # ignore/add/remove/force
1924
1925# Add or remove newline after each ',' in a function definition.
1926nl_func_def_args = ignore # ignore/add/remove/force
1927
1928# Add or remove newline after each ',' in a function call.
1929nl_func_call_args = ignore # ignore/add/remove/force
1930
1931# Whether to add a newline after each ',' in a function declaration if '('
1932# and ')' are in different lines. If false, nl_func_decl_args is used instead.
1933nl_func_decl_args_multi_line = false # true/false
1934
1935# Whether to add a newline after each ',' in a function definition if '('
1936# and ')' are in different lines. If false, nl_func_def_args is used instead.
1937nl_func_def_args_multi_line = false # true/false
1938
1939# Add or remove newline before the ')' in a function declaration.
Michal Vasko69730152020-10-09 16:30:07 +02001940nl_func_decl_end = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001941
1942# Add or remove newline before the ')' in a function definition.
Michal Vasko69730152020-10-09 16:30:07 +02001943nl_func_def_end = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001944
1945# Overrides nl_func_decl_end when there is only one parameter.
1946nl_func_decl_end_single = ignore # ignore/add/remove/force
1947
1948# Overrides nl_func_def_end when there is only one parameter.
1949nl_func_def_end_single = ignore # ignore/add/remove/force
1950
1951# Whether to add a newline before ')' in a function declaration if '(' and ')'
1952# are in different lines. If false, nl_func_decl_end is used instead.
1953nl_func_decl_end_multi_line = false # true/false
1954
1955# Whether to add a newline before ')' in a function definition if '(' and ')'
1956# are in different lines. If false, nl_func_def_end is used instead.
1957nl_func_def_end_multi_line = false # true/false
1958
1959# Add or remove newline between '()' in a function declaration.
Michal Vasko69730152020-10-09 16:30:07 +02001960nl_func_decl_empty = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001961
1962# Add or remove newline between '()' in a function definition.
Michal Vasko69730152020-10-09 16:30:07 +02001963nl_func_def_empty = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001964
1965# Add or remove newline between '()' in a function call.
Michal Vasko69730152020-10-09 16:30:07 +02001966nl_func_call_empty = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001967
1968# Whether to add a newline after '(' in a function call,
1969# has preference over nl_func_call_start_multi_line.
1970nl_func_call_start = ignore # ignore/add/remove/force
1971
1972# Whether to add a newline before ')' in a function call.
Michal Vasko69730152020-10-09 16:30:07 +02001973nl_func_call_end = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001974
1975# Whether to add a newline after '(' in a function call if '(' and ')' are in
1976# different lines.
1977nl_func_call_start_multi_line = false # true/false
1978
1979# Whether to add a newline after each ',' in a function call if '(' and ')'
1980# are in different lines.
1981nl_func_call_args_multi_line = false # true/false
1982
1983# Whether to add a newline before ')' in a function call if '(' and ')' are in
1984# different lines.
1985nl_func_call_end_multi_line = false # true/false
1986
1987# Whether to respect nl_func_call_XXX option incase of closure args.
Michal Vasko69730152020-10-09 16:30:07 +02001988nl_func_call_args_multi_line_ignore_closures = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001989
1990# Whether to add a newline after '<' of a template parameter list.
1991nl_template_start = false # true/false
1992
1993# Whether to add a newline after each ',' in a template parameter list.
1994nl_template_args = false # true/false
1995
1996# Whether to add a newline before '>' of a template parameter list.
1997nl_template_end = false # true/false
1998
1999# (OC) Whether to put each Objective-C message parameter on a separate line.
2000# See nl_oc_msg_leave_one_liner.
2001nl_oc_msg_args = false # true/false
2002
Michal Vasko2bf4af42023-01-04 12:08:38 +01002003# (OC) Minimum number of Objective-C message parameters before applying nl_oc_msg_args.
2004nl_oc_msg_args_min_params = 0 # unsigned number
2005
2006# (OC) Max code width of Objective-C message before applying nl_oc_msg_args.
2007nl_oc_msg_args_max_code_width = 0 # unsigned number
2008
Radek Krejcia198c962020-08-16 10:32:10 +02002009# Add or remove newline between function signature and '{'.
Michal Vasko69730152020-10-09 16:30:07 +02002010nl_fdef_brace = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02002011
2012# Add or remove newline between function signature and '{',
2013# if signature ends with ')'. Overrides nl_fdef_brace.
Michal Vasko69730152020-10-09 16:30:07 +02002014nl_fdef_brace_cond = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02002015
2016# Add or remove newline between C++11 lambda signature and '{'.
2017nl_cpp_ldef_brace = ignore # ignore/add/remove/force
2018
2019# Add or remove newline between 'return' and the return expression.
Michal Vasko69730152020-10-09 16:30:07 +02002020nl_return_expr = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02002021
Michal Vasko2bf4af42023-01-04 12:08:38 +01002022# Add or remove newline between 'throw' and the throw expression.
2023nl_throw_expr = ignore # ignore/add/remove/force/not_defined
2024
Radek Krejcia198c962020-08-16 10:32:10 +02002025# Whether to add a newline after semicolons, except in 'for' statements.
2026nl_after_semicolon = false # true/false
2027
2028# (Java) Add or remove newline between the ')' and '{{' of the double brace
2029# initializer.
2030nl_paren_dbrace_open = ignore # ignore/add/remove/force
2031
2032# Whether to add a newline after the type in an unnamed temporary
2033# direct-list-initialization.
2034nl_type_brace_init_lst = ignore # ignore/add/remove/force
2035
2036# Whether to add a newline after the open brace in an unnamed temporary
2037# direct-list-initialization.
2038nl_type_brace_init_lst_open = ignore # ignore/add/remove/force
2039
2040# Whether to add a newline before the close brace in an unnamed temporary
2041# direct-list-initialization.
2042nl_type_brace_init_lst_close = ignore # ignore/add/remove/force
2043
Michal Vasko26bbb272022-08-02 14:54:33 +02002044# Whether to add a newline before '{'.
2045nl_before_brace_open = false # true/false
2046
Radek Krejcia198c962020-08-16 10:32:10 +02002047# Whether to add a newline after '{'. This also adds a newline before the
2048# matching '}'.
Michal Vasko69730152020-10-09 16:30:07 +02002049nl_after_brace_open = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002050
2051# Whether to add a newline between the open brace and a trailing single-line
2052# comment. Requires nl_after_brace_open=true.
2053nl_after_brace_open_cmt = false # true/false
2054
2055# Whether to add a newline after a virtual brace open with a non-empty body.
2056# These occur in un-braced if/while/do/for statement bodies.
2057nl_after_vbrace_open = false # true/false
2058
2059# Whether to add a newline after a virtual brace open with an empty body.
2060# These occur in un-braced if/while/do/for statement bodies.
2061nl_after_vbrace_open_empty = false # true/false
2062
2063# Whether to add a newline after '}'. Does not apply if followed by a
2064# necessary ';'.
Michal Vasko69730152020-10-09 16:30:07 +02002065nl_after_brace_close = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002066
2067# Whether to add a newline after a virtual brace close,
2068# as in 'if (foo) a++; <here> return;'.
2069nl_after_vbrace_close = false # true/false
2070
2071# Add or remove newline between the close brace and identifier,
2072# as in 'struct { int a; } <here> b;'. Affects enumerations, unions and
2073# structures. If set to ignore, uses nl_after_brace_close.
Michal Vasko69730152020-10-09 16:30:07 +02002074nl_brace_struct_var = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02002075
2076# Whether to alter newlines in '#define' macros.
2077nl_define_macro = false # true/false
2078
2079# Whether to alter newlines between consecutive parenthesis closes. The number
2080# of closing parentheses in a line will depend on respective open parenthesis
2081# lines.
Michal Vasko69730152020-10-09 16:30:07 +02002082nl_squeeze_paren_close = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002083
2084# Whether to remove blanks after '#ifxx' and '#elxx', or before '#elxx' and
2085# '#endif'. Does not affect top-level #ifdefs.
Michal Vasko69730152020-10-09 16:30:07 +02002086nl_squeeze_ifdef = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002087
2088# Makes the nl_squeeze_ifdef option affect the top-level #ifdefs as well.
2089nl_squeeze_ifdef_top_level = false # true/false
2090
2091# Add or remove blank line before 'if'.
2092nl_before_if = ignore # ignore/add/remove/force
2093
2094# Add or remove blank line after 'if' statement. Add/Force work only if the
2095# next token is not a closing brace.
2096nl_after_if = ignore # ignore/add/remove/force
2097
2098# Add or remove blank line before 'for'.
2099nl_before_for = ignore # ignore/add/remove/force
2100
2101# Add or remove blank line after 'for' statement.
2102nl_after_for = ignore # ignore/add/remove/force
2103
2104# Add or remove blank line before 'while'.
2105nl_before_while = ignore # ignore/add/remove/force
2106
2107# Add or remove blank line after 'while' statement.
2108nl_after_while = ignore # ignore/add/remove/force
2109
2110# Add or remove blank line before 'switch'.
2111nl_before_switch = ignore # ignore/add/remove/force
2112
2113# Add or remove blank line after 'switch' statement.
2114nl_after_switch = ignore # ignore/add/remove/force
2115
2116# Add or remove blank line before 'synchronized'.
2117nl_before_synchronized = ignore # ignore/add/remove/force
2118
2119# Add or remove blank line after 'synchronized' statement.
2120nl_after_synchronized = ignore # ignore/add/remove/force
2121
2122# Add or remove blank line before 'do'.
2123nl_before_do = ignore # ignore/add/remove/force
2124
2125# Add or remove blank line after 'do/while' statement.
2126nl_after_do = ignore # ignore/add/remove/force
2127
Michal Vasko26bbb272022-08-02 14:54:33 +02002128# Ignore nl_before_{if,for,switch,do,synchronized} if the control
2129# statement is immediately after a case statement.
2130# if nl_before_{if,for,switch,do} is set to remove, this option
2131# does nothing.
2132nl_before_ignore_after_case = false # true/false
2133
Radek Krejcia198c962020-08-16 10:32:10 +02002134# Whether to put a blank line before 'return' statements, unless after an open
2135# brace.
2136nl_before_return = false # true/false
2137
2138# Whether to put a blank line after 'return' statements, unless followed by a
2139# close brace.
2140nl_after_return = false # true/false
2141
2142# Whether to put a blank line before a member '.' or '->' operators.
2143nl_before_member = ignore # ignore/add/remove/force
2144
2145# (Java) Whether to put a blank line after a member '.' or '->' operators.
2146nl_after_member = ignore # ignore/add/remove/force
2147
2148# Whether to double-space commented-entries in 'struct'/'union'/'enum'.
2149nl_ds_struct_enum_cmt = false # true/false
2150
2151# Whether to force a newline before '}' of a 'struct'/'union'/'enum'.
2152# (Lower priority than eat_blanks_before_close_brace.)
2153nl_ds_struct_enum_close_brace = false # true/false
2154
2155# Add or remove newline before or after (depending on pos_class_colon) a class
2156# colon, as in 'class Foo <here> : <or here> public Bar'.
2157nl_class_colon = ignore # ignore/add/remove/force
2158
2159# Add or remove newline around a class constructor colon. The exact position
2160# depends on nl_constr_init_args, pos_constr_colon and pos_constr_comma.
2161nl_constr_colon = ignore # ignore/add/remove/force
2162
2163# Whether to collapse a two-line namespace, like 'namespace foo\n{ decl; }'
2164# into a single line. If true, prevents other brace newline rules from turning
2165# such code into four lines.
2166nl_namespace_two_to_one_liner = false # true/false
2167
2168# Whether to remove a newline in simple unbraced if statements, turning them
2169# into one-liners, as in 'if(b)\n i++;' => 'if(b) i++;'.
2170nl_create_if_one_liner = false # true/false
2171
2172# Whether to remove a newline in simple unbraced for statements, turning them
2173# into one-liners, as in 'for (...)\n stmt;' => 'for (...) stmt;'.
2174nl_create_for_one_liner = false # true/false
2175
2176# Whether to remove a newline in simple unbraced while statements, turning
2177# them into one-liners, as in 'while (expr)\n stmt;' => 'while (expr) stmt;'.
2178nl_create_while_one_liner = false # true/false
2179
2180# Whether to collapse a function definition whose body (not counting braces)
2181# is only one line so that the entire definition (prototype, braces, body) is
2182# a single line.
2183nl_create_func_def_one_liner = false # true/false
2184
2185# Whether to collapse a function definition whose body (not counting braces)
2186# is only one line so that the entire definition (prototype, braces, body) is
2187# a single line.
2188nl_create_list_one_liner = false # true/false
2189
2190# Whether to split one-line simple unbraced if statements into two lines by
2191# adding a newline, as in 'if(b) <here> i++;'.
2192nl_split_if_one_liner = false # true/false
2193
2194# Whether to split one-line simple unbraced for statements into two lines by
2195# adding a newline, as in 'for (...) <here> stmt;'.
2196nl_split_for_one_liner = false # true/false
2197
2198# Whether to split one-line simple unbraced while statements into two lines by
2199# adding a newline, as in 'while (expr) <here> stmt;'.
2200nl_split_while_one_liner = false # true/false
2201
Michal Vasko26bbb272022-08-02 14:54:33 +02002202# Don't add a newline before a cpp-comment in a parameter list of a function
2203# call.
2204donot_add_nl_before_cpp_comment = false # true/false
2205
Radek Krejcia198c962020-08-16 10:32:10 +02002206#
2207# Blank line options
2208#
2209
2210# The maximum number of consecutive newlines (3 = 2 blank lines).
2211nl_max = 2 # unsigned number
2212
2213# The maximum number of consecutive newlines in a function.
2214nl_max_blank_in_func = 2 # unsigned number
2215
Michal Vasko26bbb272022-08-02 14:54:33 +02002216# The number of newlines inside an empty function body.
2217# This option overrides eat_blanks_after_open_brace and
2218# eat_blanks_before_close_brace, but is ignored when
2219# nl_collapse_empty_body=true
2220nl_inside_empty_func = 0 # unsigned number
2221
Radek Krejcia198c962020-08-16 10:32:10 +02002222# The number of newlines before a function prototype.
2223nl_before_func_body_proto = 0 # unsigned number
2224
2225# The number of newlines before a multi-line function definition.
2226nl_before_func_body_def = 0 # unsigned number
2227
2228# The number of newlines before a class constructor/destructor prototype.
2229nl_before_func_class_proto = 0 # unsigned number
2230
2231# The number of newlines before a class constructor/destructor definition.
2232nl_before_func_class_def = 0 # unsigned number
2233
2234# The number of newlines after a function prototype.
2235nl_after_func_proto = 0 # unsigned number
2236
2237# The number of newlines after a function prototype, if not followed by
2238# another function prototype.
2239nl_after_func_proto_group = 0 # unsigned number
2240
2241# The number of newlines after a class constructor/destructor prototype.
2242nl_after_func_class_proto = 0 # unsigned number
2243
2244# The number of newlines after a class constructor/destructor prototype,
2245# if not followed by another constructor/destructor prototype.
2246nl_after_func_class_proto_group = 0 # unsigned number
2247
2248# Whether one-line method definitions inside a class body should be treated
2249# as if they were prototypes for the purposes of adding newlines.
2250#
2251# Requires nl_class_leave_one_liners=true. Overrides nl_before_func_body_def
2252# and nl_before_func_class_def for one-liners.
2253nl_class_leave_one_liner_groups = false # true/false
2254
2255# The number of newlines after '}' of a multi-line function body.
2256nl_after_func_body = 2 # unsigned number
2257
2258# The number of newlines after '}' of a multi-line function body in a class
2259# declaration. Also affects class constructors/destructors.
2260#
2261# Overrides nl_after_func_body.
2262nl_after_func_body_class = 2 # unsigned number
2263
2264# The number of newlines after '}' of a single line function body. Also
2265# affects class constructors/destructors.
2266#
2267# Overrides nl_after_func_body and nl_after_func_body_class.
2268nl_after_func_body_one_liner = 2 # unsigned number
2269
Radek Krejcia198c962020-08-16 10:32:10 +02002270# The number of newlines before a block of typedefs. If nl_after_access_spec
2271# is non-zero, that option takes precedence.
2272#
2273# 0: No change (default).
Michal Vasko69730152020-10-09 16:30:07 +02002274nl_typedef_blk_start = 1 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02002275
2276# The number of newlines after a block of typedefs.
2277#
2278# 0: No change (default).
Michal Vasko69730152020-10-09 16:30:07 +02002279nl_typedef_blk_end = 1 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02002280
2281# The maximum number of consecutive newlines within a block of typedefs.
2282#
2283# 0: No change (default).
2284nl_typedef_blk_in = 0 # unsigned number
2285
Michal Vasko2bf4af42023-01-04 12:08:38 +01002286# The minimum number of blank lines after a block of variable definitions
2287# at the top of a function body. If any preprocessor directives appear
2288# between the opening brace of the function and the variable block, then
2289# it is considered as not at the top of the function.Newlines are added
2290# before trailing preprocessor directives, if any exist.
2291#
2292# 0: No change (default).
2293nl_var_def_blk_end_func_top = 1 # unsigned number
2294
Radek Krejcia198c962020-08-16 10:32:10 +02002295# The number of newlines before a block of variable definitions not at the top
2296# of a function body. If nl_after_access_spec is non-zero, that option takes
2297# precedence.
2298#
2299# 0: No change (default).
2300nl_var_def_blk_start = 0 # unsigned number
2301
2302# The number of newlines after a block of variable definitions not at the top
2303# of a function body.
2304#
2305# 0: No change (default).
Michal Vasko69730152020-10-09 16:30:07 +02002306nl_var_def_blk_end = 1 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02002307
2308# The maximum number of consecutive newlines within a block of variable
2309# definitions.
2310#
2311# 0: No change (default).
2312nl_var_def_blk_in = 0 # unsigned number
2313
2314# The minimum number of newlines before a multi-line comment.
2315# Doesn't apply if after a brace open or another multi-line comment.
2316nl_before_block_comment = 0 # unsigned number
2317
2318# The minimum number of newlines before a single-line C comment.
2319# Doesn't apply if after a brace open or other single-line C comments.
2320nl_before_c_comment = 0 # unsigned number
2321
2322# The minimum number of newlines before a CPP comment.
2323# Doesn't apply if after a brace open or other CPP comments.
2324nl_before_cpp_comment = 0 # unsigned number
2325
2326# Whether to force a newline after a multi-line comment.
2327nl_after_multiline_comment = false # true/false
2328
2329# Whether to force a newline after a label's colon.
Michal Vasko69730152020-10-09 16:30:07 +02002330nl_after_label_colon = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002331
Michal Vasko26bbb272022-08-02 14:54:33 +02002332# The number of newlines before a struct definition.
2333nl_before_struct = 1 # unsigned number
2334
Radek Krejcia198c962020-08-16 10:32:10 +02002335# The number of newlines after '}' or ';' of a struct/enum/union definition.
2336nl_after_struct = 1 # unsigned number
2337
2338# The number of newlines before a class definition.
2339nl_before_class = 0 # unsigned number
2340
2341# The number of newlines after '}' or ';' of a class definition.
2342nl_after_class = 0 # unsigned number
2343
2344# The number of newlines before a namespace.
2345nl_before_namespace = 0 # unsigned number
2346
2347# The number of newlines after '{' of a namespace. This also adds newlines
2348# before the matching '}'.
2349#
2350# 0: Apply eat_blanks_after_open_brace or eat_blanks_before_close_brace if
2351# applicable, otherwise no change.
2352#
2353# Overrides eat_blanks_after_open_brace and eat_blanks_before_close_brace.
2354nl_inside_namespace = 0 # unsigned number
2355
2356# The number of newlines after '}' of a namespace.
2357nl_after_namespace = 0 # unsigned number
2358
2359# The number of newlines before an access specifier label. This also includes
2360# the Qt-specific 'signals:' and 'slots:'. Will not change the newline count
2361# if after a brace open.
2362#
2363# 0: No change (default).
2364nl_before_access_spec = 0 # unsigned number
2365
2366# The number of newlines after an access specifier label. This also includes
2367# the Qt-specific 'signals:' and 'slots:'. Will not change the newline count
2368# if after a brace open.
2369#
2370# 0: No change (default).
2371#
2372# Overrides nl_typedef_blk_start and nl_var_def_blk_start.
2373nl_after_access_spec = 0 # unsigned number
2374
2375# The number of newlines between a function definition and the function
2376# comment, as in '// comment\n <here> void foo() {...}'.
2377#
2378# 0: No change (default).
2379nl_comment_func_def = 0 # unsigned number
2380
2381# The number of newlines after a try-catch-finally block that isn't followed
2382# by a brace close.
2383#
2384# 0: No change (default).
2385nl_after_try_catch_finally = 0 # unsigned number
2386
2387# (C#) The number of newlines before and after a property, indexer or event
2388# declaration.
2389#
2390# 0: No change (default).
2391nl_around_cs_property = 0 # unsigned number
2392
2393# (C#) The number of newlines between the get/set/add/remove handlers.
2394#
2395# 0: No change (default).
2396nl_between_get_set = 0 # unsigned number
2397
2398# (C#) Add or remove newline between property and the '{'.
2399nl_property_brace = ignore # ignore/add/remove/force
2400
2401# Whether to remove blank lines after '{'.
2402eat_blanks_after_open_brace = false # true/false
2403
2404# Whether to remove blank lines before '}'.
2405eat_blanks_before_close_brace = false # true/false
2406
2407# How aggressively to remove extra newlines not in preprocessor.
2408#
2409# 0: No change (default)
2410# 1: Remove most newlines not handled by other config
2411# 2: Remove all newlines and reformat completely by config
2412nl_remove_extra_newlines = 0 # unsigned number
2413
2414# (Java) Add or remove newline after an annotation statement. Only affects
2415# annotations that are after a newline.
2416nl_after_annotation = ignore # ignore/add/remove/force
2417
2418# (Java) Add or remove newline between two annotations.
2419nl_between_annotation = ignore # ignore/add/remove/force
2420
2421# The number of newlines before a whole-file #ifdef.
2422#
2423# 0: No change (default).
Michal Vasko69730152020-10-09 16:30:07 +02002424nl_before_whole_file_ifdef = 2 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02002425
2426# The number of newlines after a whole-file #ifdef.
2427#
2428# 0: No change (default).
2429nl_after_whole_file_ifdef = 0 # unsigned number
2430
2431# The number of newlines before a whole-file #endif.
2432#
2433# 0: No change (default).
Michal Vasko69730152020-10-09 16:30:07 +02002434nl_before_whole_file_endif = 2 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02002435
2436# The number of newlines after a whole-file #endif.
2437#
2438# 0: No change (default).
Michal Vasko69730152020-10-09 16:30:07 +02002439nl_after_whole_file_endif = 2 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02002440
2441#
2442# Positioning options
2443#
2444
2445# The position of arithmetic operators in wrapped expressions.
Michal Vasko69730152020-10-09 16:30:07 +02002446pos_arith = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
Radek Krejcia198c962020-08-16 10:32:10 +02002447
2448# The position of assignment in wrapped expressions. Do not affect '='
2449# followed by '{'.
Michal Vasko69730152020-10-09 16:30:07 +02002450pos_assign = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
Radek Krejcia198c962020-08-16 10:32:10 +02002451
2452# The position of Boolean operators in wrapped expressions.
Michal Vasko69730152020-10-09 16:30:07 +02002453pos_bool = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
Radek Krejcia198c962020-08-16 10:32:10 +02002454
2455# The position of comparison operators in wrapped expressions.
Michal Vasko69730152020-10-09 16:30:07 +02002456pos_compare = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
Radek Krejcia198c962020-08-16 10:32:10 +02002457
2458# The position of conditional operators, as in the '?' and ':' of
2459# 'expr ? stmt : stmt', in wrapped expressions.
Michal Vasko69730152020-10-09 16:30:07 +02002460pos_conditional = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
Radek Krejcia198c962020-08-16 10:32:10 +02002461
2462# The position of the comma in wrapped expressions.
Michal Vasko69730152020-10-09 16:30:07 +02002463pos_comma = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
Radek Krejcia198c962020-08-16 10:32:10 +02002464
2465# The position of the comma in enum entries.
Michal Vasko69730152020-10-09 16:30:07 +02002466pos_enum_comma = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
Radek Krejcia198c962020-08-16 10:32:10 +02002467
2468# The position of the comma in the base class list if there is more than one
2469# line. Affects nl_class_init_args.
2470pos_class_comma = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
2471
2472# The position of the comma in the constructor initialization list.
2473# Related to nl_constr_colon, nl_constr_init_args and pos_constr_colon.
2474pos_constr_comma = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
2475
2476# The position of trailing/leading class colon, between class and base class
2477# list. Affects nl_class_colon.
2478pos_class_colon = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
2479
2480# The position of colons between constructor and member initialization.
2481# Related to nl_constr_colon, nl_constr_init_args and pos_constr_comma.
2482pos_constr_colon = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
2483
Michal Vasko26bbb272022-08-02 14:54:33 +02002484# The position of shift operators in wrapped expressions.
2485pos_shift = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
2486
Radek Krejcia198c962020-08-16 10:32:10 +02002487#
2488# Line splitting options
2489#
2490
2491# Try to limit code width to N columns.
2492code_width = 256 # unsigned number
2493
2494# Whether to fully split long 'for' statements at semi-colons.
2495ls_for_split_full = true # true/false
2496
2497# Whether to fully split long function prototypes/calls at commas.
2498# The option ls_code_width has priority over the option ls_func_split_full.
2499ls_func_split_full = false # true/false
2500
2501# Whether to split lines as close to code_width as possible and ignore some
2502# groupings.
2503# The option ls_code_width has priority over the option ls_func_split_full.
2504ls_code_width = false # true/false
2505
2506#
2507# Code alignment options (not left column spaces/tabs)
2508#
2509
2510# Whether to keep non-indenting tabs.
2511align_keep_tabs = false # true/false
2512
2513# Whether to use tabs for aligning.
2514align_with_tabs = false # true/false
2515
2516# Whether to bump out to the next tab when aligning.
2517align_on_tabstop = true # true/false
2518
2519# Whether to right-align numbers.
2520align_number_right = true # true/false
2521
2522# Whether to keep whitespace not required for alignment.
2523align_keep_extra_space = false # true/false
2524
2525# Whether to align variable definitions in prototypes and functions.
Michal Vasko69730152020-10-09 16:30:07 +02002526align_func_params = false # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002527
2528# The span for aligning parameter definitions in function on parameter name.
2529#
2530# 0: Don't align (default).
Michal Vasko69730152020-10-09 16:30:07 +02002531align_func_params_span = 0 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02002532
2533# The threshold for aligning function parameter definitions.
2534# Use a negative number for absolute thresholds.
2535#
2536# 0: No limit (default).
2537align_func_params_thresh = 0 # number
2538
2539# The gap for aligning function parameter definitions.
2540align_func_params_gap = 1 # unsigned number
2541
2542# The span for aligning constructor value.
2543#
2544# 0: Don't align (default).
2545align_constr_value_span = 0 # unsigned number
2546
2547# The threshold for aligning constructor value.
2548# Use a negative number for absolute thresholds.
2549#
2550# 0: No limit (default).
2551align_constr_value_thresh = 0 # number
2552
2553# The gap for aligning constructor value.
2554align_constr_value_gap = 0 # unsigned number
2555
2556# Whether to align parameters in single-line functions that have the same
2557# name. The function names must already be aligned with each other.
2558align_same_func_call_params = false # true/false
2559
2560# The span for aligning function-call parameters for single line functions.
2561#
2562# 0: Don't align (default).
2563align_same_func_call_params_span = 1 # unsigned number
2564
2565# The threshold for aligning function-call parameters for single line
2566# functions.
2567# Use a negative number for absolute thresholds.
2568#
2569# 0: No limit (default).
2570align_same_func_call_params_thresh = 0 # number
2571
2572# The span for aligning variable definitions.
2573#
2574# 0: Don't align (default).
2575align_var_def_span = 0 # unsigned number
2576
2577# How to consider (or treat) the '*' in the alignment of variable definitions.
2578#
2579# 0: Part of the type 'void * foo;' (default)
2580# 1: Part of the variable 'void *foo;'
2581# 2: Dangling 'void *foo;'
2582# Dangling: the '*' will not be taken into account when aligning.
2583align_var_def_star_style = 1 # unsigned number
2584
2585# How to consider (or treat) the '&' in the alignment of variable definitions.
2586#
2587# 0: Part of the type 'long & foo;' (default)
2588# 1: Part of the variable 'long &foo;'
2589# 2: Dangling 'long &foo;'
2590# Dangling: the '&' will not be taken into account when aligning.
2591align_var_def_amp_style = 1 # unsigned number
2592
2593# The threshold for aligning variable definitions.
2594# Use a negative number for absolute thresholds.
2595#
2596# 0: No limit (default).
2597align_var_def_thresh = 0 # number
2598
2599# The gap for aligning variable definitions.
2600align_var_def_gap = 0 # unsigned number
2601
2602# Whether to align the colon in struct bit fields.
2603align_var_def_colon = false # true/false
2604
2605# The gap for aligning the colon in struct bit fields.
2606align_var_def_colon_gap = 0 # unsigned number
2607
2608# Whether to align any attribute after the variable name.
2609align_var_def_attribute = false # true/false
2610
2611# Whether to align inline struct/enum/union variable definitions.
Michal Vasko26bbb272022-08-02 14:54:33 +02002612align_var_def_inline = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002613
2614# The span for aligning on '=' in assignments.
2615#
2616# 0: Don't align (default).
2617align_assign_span = 0 # unsigned number
2618
Michal Vasko26bbb272022-08-02 14:54:33 +02002619# The span for aligning on '{' in braced init list.
2620#
2621# 0: Don't align (default).
2622align_braced_init_list_span = 0 # unsigned number
2623
Radek Krejcia198c962020-08-16 10:32:10 +02002624# The span for aligning on '=' in function prototype modifier.
2625#
2626# 0: Don't align (default).
2627align_assign_func_proto_span = 0 # unsigned number
2628
2629# The threshold for aligning on '=' in assignments.
2630# Use a negative number for absolute thresholds.
2631#
2632# 0: No limit (default).
2633align_assign_thresh = 0 # number
2634
Michal Vasko26bbb272022-08-02 14:54:33 +02002635# Whether to align on the left most assignment when multiple
2636# definitions are found on the same line.
2637# Depends on 'align_assign_span' and 'align_assign_thresh' settings.
2638align_assign_on_multi_var_defs = false # true/false
2639
2640# The threshold for aligning on '{' in braced init list.
2641# Use a negative number for absolute thresholds.
2642#
2643# 0: No limit (default).
2644align_braced_init_list_thresh = 0 # number
2645
Radek Krejcia198c962020-08-16 10:32:10 +02002646# How to apply align_assign_span to function declaration "assignments", i.e.
2647# 'virtual void foo() = 0' or '~foo() = {default|delete}'.
2648#
2649# 0: Align with other assignments (default)
2650# 1: Align with each other, ignoring regular assignments
2651# 2: Don't align
2652align_assign_decl_func = 0 # unsigned number
2653
2654# The span for aligning on '=' in enums.
2655#
2656# 0: Don't align (default).
2657align_enum_equ_span = 0 # unsigned number
2658
2659# The threshold for aligning on '=' in enums.
2660# Use a negative number for absolute thresholds.
2661#
2662# 0: no limit (default).
2663align_enum_equ_thresh = 0 # number
2664
2665# The span for aligning class member definitions.
2666#
2667# 0: Don't align (default).
2668align_var_class_span = 0 # unsigned number
2669
2670# The threshold for aligning class member definitions.
2671# Use a negative number for absolute thresholds.
2672#
2673# 0: No limit (default).
2674align_var_class_thresh = 0 # number
2675
2676# The gap for aligning class member definitions.
2677align_var_class_gap = 0 # unsigned number
2678
2679# The span for aligning struct/union member definitions.
2680#
2681# 0: Don't align (default).
2682align_var_struct_span = 0 # unsigned number
2683
2684# The threshold for aligning struct/union member definitions.
2685# Use a negative number for absolute thresholds.
2686#
2687# 0: No limit (default).
2688align_var_struct_thresh = 0 # number
2689
2690# The gap for aligning struct/union member definitions.
2691align_var_struct_gap = 0 # unsigned number
2692
2693# The span for aligning struct initializer values.
2694#
2695# 0: Don't align (default).
2696align_struct_init_span = 0 # unsigned number
2697
2698# The span for aligning single-line typedefs.
2699#
2700# 0: Don't align (default).
2701align_typedef_span = 0 # unsigned number
2702
2703# The minimum space between the type and the synonym of a typedef.
2704align_typedef_gap = 1 # unsigned number
2705
2706# How to align typedef'd functions with other typedefs.
2707#
2708# 0: Don't mix them at all (default)
2709# 1: Align the open parenthesis with the types
2710# 2: Align the function type name with the other type names
2711align_typedef_func = 0 # unsigned number
2712
2713# How to consider (or treat) the '*' in the alignment of typedefs.
2714#
2715# 0: Part of the typedef type, 'typedef int * pint;' (default)
2716# 1: Part of type name: 'typedef int *pint;'
2717# 2: Dangling: 'typedef int *pint;'
2718# Dangling: the '*' will not be taken into account when aligning.
2719align_typedef_star_style = 1 # unsigned number
2720
2721# How to consider (or treat) the '&' in the alignment of typedefs.
2722#
2723# 0: Part of the typedef type, 'typedef int & intref;' (default)
2724# 1: Part of type name: 'typedef int &intref;'
2725# 2: Dangling: 'typedef int &intref;'
2726# Dangling: the '&' will not be taken into account when aligning.
2727align_typedef_amp_style = 1 # unsigned number
2728
2729# The span for aligning comments that end lines.
2730#
2731# 0: Don't align (default).
2732align_right_cmt_span = 0 # unsigned number
2733
2734# Minimum number of columns between preceding text and a trailing comment in
2735# order for the comment to qualify for being aligned. Must be non-zero to have
2736# an effect.
2737align_right_cmt_gap = 0 # unsigned number
2738
2739# If aligning comments, whether to mix with comments after '}' and #endif with
2740# less than three spaces before the comment.
2741align_right_cmt_mix = false # true/false
2742
2743# Whether to only align trailing comments that are at the same brace level.
2744align_right_cmt_same_level = false # true/false
2745
2746# Minimum column at which to align trailing comments. Comments which are
2747# aligned beyond this column, but which can be aligned in a lesser column,
2748# may be "pulled in".
2749#
2750# 0: Ignore (default).
2751align_right_cmt_at_col = 0 # unsigned number
2752
2753# The span for aligning function prototypes.
2754#
2755# 0: Don't align (default).
2756align_func_proto_span = 0 # unsigned number
2757
Michal Vasko26bbb272022-08-02 14:54:33 +02002758# How to consider (or treat) the '*' in the alignment of function prototypes.
2759#
2760# 0: Part of the type 'void * foo();' (default)
2761# 1: Part of the function 'void *foo();'
2762# 2: Dangling 'void *foo();'
2763# Dangling: the '*' will not be taken into account when aligning.
2764align_func_proto_star_style = 0 # unsigned number
2765
2766# How to consider (or treat) the '&' in the alignment of function prototypes.
2767#
2768# 0: Part of the type 'long & foo();' (default)
2769# 1: Part of the function 'long &foo();'
2770# 2: Dangling 'long &foo();'
2771# Dangling: the '&' will not be taken into account when aligning.
2772align_func_proto_amp_style = 0 # unsigned number
2773
Radek Krejcia198c962020-08-16 10:32:10 +02002774# The threshold for aligning function prototypes.
2775# Use a negative number for absolute thresholds.
2776#
2777# 0: No limit (default).
2778align_func_proto_thresh = 0 # number
2779
2780# Minimum gap between the return type and the function name.
2781align_func_proto_gap = 1 # unsigned number
2782
2783# Whether to align function prototypes on the 'operator' keyword instead of
2784# what follows.
2785align_on_operator = false # true/false
2786
2787# Whether to mix aligning prototype and variable declarations. If true,
2788# align_var_def_XXX options are used instead of align_func_proto_XXX options.
2789align_mix_var_proto = false # true/false
2790
2791# Whether to align single-line functions with function prototypes.
2792# Uses align_func_proto_span.
Michal Vasko69730152020-10-09 16:30:07 +02002793align_single_line_func = false # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002794
2795# Whether to align the open brace of single-line functions.
2796# Requires align_single_line_func=true. Uses align_func_proto_span.
Michal Vasko69730152020-10-09 16:30:07 +02002797align_single_line_brace = false # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002798
2799# Gap for align_single_line_brace.
2800align_single_line_brace_gap = 1 # unsigned number
2801
2802# (OC) The span for aligning Objective-C message specifications.
2803#
2804# 0: Don't align (default).
2805align_oc_msg_spec_span = 0 # unsigned number
2806
2807# Whether to align macros wrapped with a backslash and a newline. This will
2808# not work right if the macro contains a multi-line comment.
2809align_nl_cont = false # true/false
2810
2811# Whether to align macro functions and variables together.
2812align_pp_define_together = false # true/false
2813
2814# The span for aligning on '#define' bodies.
2815#
2816# =0: Don't align (default)
2817# >0: Number of lines (including comments) between blocks
2818align_pp_define_span = 0 # unsigned number
2819
2820# The minimum space between label and value of a preprocessor define.
2821align_pp_define_gap = 1 # unsigned number
2822
2823# Whether to align lines that start with '<<' with previous '<<'.
2824#
2825# Default: true
2826align_left_shift = false # true/false
2827
Michal Vasko26bbb272022-08-02 14:54:33 +02002828# Whether to align comma-separated statements following '<<' (as used to
2829# initialize Eigen matrices).
2830align_eigen_comma_init = false # true/false
2831
Radek Krejcia198c962020-08-16 10:32:10 +02002832# Whether to align text after 'asm volatile ()' colons.
2833align_asm_colon = false # true/false
2834
2835# (OC) Span for aligning parameters in an Objective-C message call
2836# on the ':'.
2837#
2838# 0: Don't align.
2839align_oc_msg_colon_span = 0 # unsigned number
2840
2841# (OC) Whether to always align with the first parameter, even if it is too
2842# short.
2843align_oc_msg_colon_first = false # true/false
2844
2845# (OC) Whether to align parameters in an Objective-C '+' or '-' declaration
2846# on the ':'.
2847align_oc_decl_colon = false # true/false
2848
2849# (OC) Whether to not align parameters in an Objectve-C message call if first
2850# colon is not on next line of the message call (the same way Xcode does
2851# aligment)
2852align_oc_msg_colon_xcode_like = false # true/false
2853
2854#
2855# Comment modification options
2856#
2857
2858# Try to wrap comments at N columns.
2859cmt_width = 256 # unsigned number
2860
2861# How to reflow comments.
2862#
2863# 0: No reflowing (apart from the line wrapping due to cmt_width) (default)
2864# 1: No touching at all
2865# 2: Full reflow
2866cmt_reflow_mode = 1 # unsigned number
2867
Michal Vasko26bbb272022-08-02 14:54:33 +02002868# Path to a file that contains regular expressions describing patterns for
2869# which the end of one line and the beginning of the next will be folded into
2870# the same sentence or paragraph during full comment reflow. The regular
2871# expressions are described using ECMAScript syntax. The syntax for this
2872# specification is as follows, where "..." indicates the custom regular
2873# expression and "n" indicates the nth end_of_prev_line_regex and
2874# beg_of_next_line_regex regular expression pair:
2875#
2876# end_of_prev_line_regex[1] = "...$"
2877# beg_of_next_line_regex[1] = "^..."
2878# end_of_prev_line_regex[2] = "...$"
2879# beg_of_next_line_regex[2] = "^..."
2880# .
2881# .
2882# .
2883# end_of_prev_line_regex[n] = "...$"
2884# beg_of_next_line_regex[n] = "^..."
2885#
2886# Note that use of this option overrides the default reflow fold regular
2887# expressions, which are internally defined as follows:
2888#
2889# end_of_prev_line_regex[1] = "[\w,\]\)]$"
2890# beg_of_next_line_regex[1] = "^[\w,\[\(]"
2891# end_of_prev_line_regex[2] = "\.$"
2892# beg_of_next_line_regex[2] = "^[A-Z]"
2893cmt_reflow_fold_regex_file = "" # string
2894
2895# Whether to indent wrapped lines to the start of the encompassing paragraph
2896# during full comment reflow (cmt_reflow_mode = 2). Overrides the value
2897# specified by cmt_sp_after_star_cont.
2898#
2899# Note that cmt_align_doxygen_javadoc_tags overrides this option for
2900# paragraphs associated with javadoc tags
2901cmt_reflow_indent_to_paragraph_start = false # true/false
2902
Radek Krejcia198c962020-08-16 10:32:10 +02002903# Whether to convert all tabs to spaces in comments. If false, tabs in
2904# comments are left alone, unless used for indenting.
2905cmt_convert_tab_to_spaces = false # true/false
2906
2907# Whether to apply changes to multi-line comments, including cmt_width,
2908# keyword substitution and leading chars.
2909#
2910# Default: true
2911cmt_indent_multi = false # true/false
2912
Michal Vasko26bbb272022-08-02 14:54:33 +02002913# Whether to align doxygen javadoc-style tags ('@param', '@return', etc.)
2914# and corresponding fields such that groups of consecutive block tags,
2915# parameter names, and descriptions align with one another. Overrides that
2916# which is specified by the cmt_sp_after_star_cont. If cmt_width > 0, it may
2917# be necessary to enable cmt_indent_multi and set cmt_reflow_mode = 2
2918# in order to achieve the desired alignment for line-wrapping.
2919cmt_align_doxygen_javadoc_tags = false # true/false
2920
2921# The number of spaces to insert after the star and before doxygen
2922# javadoc-style tags (@param, @return, etc). Requires enabling
2923# cmt_align_doxygen_javadoc_tags. Overrides that which is specified by the
2924# cmt_sp_after_star_cont.
2925#
2926# Default: 1
2927cmt_sp_before_doxygen_javadoc_tags = 1 # unsigned number
2928
2929# Whether to change trailing, single-line c-comments into cpp-comments.
2930cmt_trailing_single_line_c_to_cpp = false # true/false
2931
Radek Krejcia198c962020-08-16 10:32:10 +02002932# Whether to group c-comments that look like they are in a block.
2933cmt_c_group = false # true/false
2934
2935# Whether to put an empty '/*' on the first line of the combined c-comment.
2936cmt_c_nl_start = false # true/false
2937
2938# Whether to add a newline before the closing '*/' of the combined c-comment.
2939cmt_c_nl_end = false # true/false
2940
2941# Whether to change cpp-comments into c-comments.
2942cmt_cpp_to_c = false # true/false
2943
2944# Whether to group cpp-comments that look like they are in a block. Only
2945# meaningful if cmt_cpp_to_c=true.
2946cmt_cpp_group = false # true/false
2947
2948# Whether to put an empty '/*' on the first line of the combined cpp-comment
2949# when converting to a c-comment.
2950#
2951# Requires cmt_cpp_to_c=true and cmt_cpp_group=true.
2952cmt_cpp_nl_start = false # true/false
2953
2954# Whether to add a newline before the closing '*/' of the combined cpp-comment
2955# when converting to a c-comment.
2956#
2957# Requires cmt_cpp_to_c=true and cmt_cpp_group=true.
2958cmt_cpp_nl_end = false # true/false
2959
2960# Whether to put a star on subsequent comment lines.
2961cmt_star_cont = false # true/false
2962
2963# The number of spaces to insert at the start of subsequent comment lines.
2964cmt_sp_before_star_cont = 0 # unsigned number
2965
2966# The number of spaces to insert after the star on subsequent comment lines.
2967cmt_sp_after_star_cont = 3 # unsigned number
2968
2969# For multi-line comments with a '*' lead, remove leading spaces if the first
2970# and last lines of the comment are the same length.
2971#
2972# Default: true
2973cmt_multi_check_last = false # true/false
2974
2975# For multi-line comments with a '*' lead, remove leading spaces if the first
2976# and last lines of the comment are the same length AND if the length is
2977# bigger as the first_len minimum.
2978#
2979# Default: 4
2980cmt_multi_first_len_minimum = 4 # unsigned number
2981
2982# Path to a file that contains text to insert at the beginning of a file if
2983# the file doesn't start with a C/C++ comment. If the inserted text contains
2984# '$(filename)', that will be replaced with the current file's name.
2985cmt_insert_file_header = "" # string
2986
2987# Path to a file that contains text to insert at the end of a file if the
2988# file doesn't end with a C/C++ comment. If the inserted text contains
2989# '$(filename)', that will be replaced with the current file's name.
2990cmt_insert_file_footer = "" # string
2991
2992# Path to a file that contains text to insert before a function definition if
2993# the function isn't preceded by a C/C++ comment. If the inserted text
2994# contains '$(function)', '$(javaparam)' or '$(fclass)', these will be
2995# replaced with, respectively, the name of the function, the javadoc '@param'
2996# and '@return' stuff, or the name of the class to which the member function
2997# belongs.
2998cmt_insert_func_header = "" # string
2999
3000# Path to a file that contains text to insert before a class if the class
3001# isn't preceded by a C/C++ comment. If the inserted text contains '$(class)',
3002# that will be replaced with the class name.
3003cmt_insert_class_header = "" # string
3004
3005# Path to a file that contains text to insert before an Objective-C message
3006# specification, if the method isn't preceded by a C/C++ comment. If the
3007# inserted text contains '$(message)' or '$(javaparam)', these will be
3008# replaced with, respectively, the name of the function, or the javadoc
3009# '@param' and '@return' stuff.
3010cmt_insert_oc_msg_header = "" # string
3011
3012# Whether a comment should be inserted if a preprocessor is encountered when
3013# stepping backwards from a function name.
3014#
3015# Applies to cmt_insert_oc_msg_header, cmt_insert_func_header and
3016# cmt_insert_class_header.
3017cmt_insert_before_preproc = false # true/false
3018
3019# Whether a comment should be inserted if a function is declared inline to a
3020# class definition.
3021#
3022# Applies to cmt_insert_func_header.
3023#
3024# Default: true
3025cmt_insert_before_inlines = false # true/false
3026
3027# Whether a comment should be inserted if the function is a class constructor
3028# or destructor.
3029#
3030# Applies to cmt_insert_func_header.
3031cmt_insert_before_ctor_dtor = false # true/false
3032
3033#
3034# Code modifying options (non-whitespace)
3035#
3036
3037# Add or remove braces on a single-line 'do' statement.
Michal Vasko69730152020-10-09 16:30:07 +02003038mod_full_brace_do = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02003039
3040# Add or remove braces on a single-line 'for' statement.
Michal Vasko69730152020-10-09 16:30:07 +02003041mod_full_brace_for = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02003042
3043# (Pawn) Add or remove braces on a single-line function definition.
Michal Vasko69730152020-10-09 16:30:07 +02003044mod_full_brace_function = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02003045
3046# Add or remove braces on a single-line 'if' statement. Braces will not be
3047# removed if the braced statement contains an 'else'.
Michal Vasko69730152020-10-09 16:30:07 +02003048mod_full_brace_if = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02003049
3050# Whether to enforce that all blocks of an 'if'/'else if'/'else' chain either
Michal Vasko26bbb272022-08-02 14:54:33 +02003051# have, or do not have, braces. Overrides mod_full_brace_if.
Radek Krejcia198c962020-08-16 10:32:10 +02003052#
Michal Vasko26bbb272022-08-02 14:54:33 +02003053# 0: Don't override mod_full_brace_if
3054# 1: Add braces to all blocks if any block needs braces and remove braces if
3055# they can be removed from all blocks
3056# 2: Add braces to all blocks if any block already has braces, regardless of
3057# whether it needs them
3058# 3: Add braces to all blocks if any block needs braces and remove braces if
3059# they can be removed from all blocks, except if all blocks have braces
3060# despite none needing them
3061mod_full_brace_if_chain = 0 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02003062
3063# Whether to add braces to all blocks of an 'if'/'else if'/'else' chain.
3064# If true, mod_full_brace_if_chain will only remove braces from an 'if' that
3065# does not have an 'else if' or 'else'.
Michal Vasko69730152020-10-09 16:30:07 +02003066mod_full_brace_if_chain_only = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003067
3068# Add or remove braces on single-line 'while' statement.
Michal Vasko69730152020-10-09 16:30:07 +02003069mod_full_brace_while = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02003070
3071# Add or remove braces on single-line 'using ()' statement.
3072mod_full_brace_using = ignore # ignore/add/remove/force
3073
3074# Don't remove braces around statements that span N newlines
3075mod_full_brace_nl = 0 # unsigned number
3076
3077# Whether to prevent removal of braces from 'if'/'for'/'while'/etc. blocks
3078# which span multiple lines.
3079#
3080# Affects:
3081# mod_full_brace_for
3082# mod_full_brace_if
3083# mod_full_brace_if_chain
3084# mod_full_brace_if_chain_only
3085# mod_full_brace_while
3086# mod_full_brace_using
3087#
3088# Does not affect:
3089# mod_full_brace_do
3090# mod_full_brace_function
3091mod_full_brace_nl_block_rem_mlcond = false # true/false
3092
3093# Add or remove unnecessary parenthesis on 'return' statement.
Michal Vasko69730152020-10-09 16:30:07 +02003094mod_paren_on_return = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02003095
Michal Vasko2bf4af42023-01-04 12:08:38 +01003096# Add or remove unnecessary parentheses on 'throw' statement.
3097mod_paren_on_throw = ignore # ignore/add/remove/force/not_defined
3098
Radek Krejcia198c962020-08-16 10:32:10 +02003099# (Pawn) Whether to change optional semicolons to real semicolons.
3100mod_pawn_semicolon = false # true/false
3101
3102# Whether to fully parenthesize Boolean expressions in 'while' and 'if'
3103# statement, as in 'if (a && b > c)' => 'if (a && (b > c))'.
Michal Vasko69730152020-10-09 16:30:07 +02003104mod_full_paren_if_bool = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003105
Michal Vasko26bbb272022-08-02 14:54:33 +02003106# Whether to fully parenthesize Boolean expressions after '='
3107# statement, as in 'x = a && b > c;' => 'x = (a && (b > c));'.
3108mod_full_paren_assign_bool = false # true/false
3109
3110# Whether to fully parenthesize Boolean expressions after '='
3111# statement, as in 'return a && b > c;' => 'return (a && (b > c));'.
3112mod_full_paren_return_bool = false # true/false
3113
Radek Krejcia198c962020-08-16 10:32:10 +02003114# Whether to remove superfluous semicolons.
Michal Vasko69730152020-10-09 16:30:07 +02003115mod_remove_extra_semicolon = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003116
Michal Vasko26bbb272022-08-02 14:54:33 +02003117# Whether to remove duplicate include.
3118mod_remove_duplicate_include = true # true/false
3119
Radek Krejcia198c962020-08-16 10:32:10 +02003120# If a function body exceeds the specified number of newlines and doesn't have
3121# a comment after the close brace, a comment will be added.
3122mod_add_long_function_closebrace_comment = 0 # unsigned number
3123
3124# If a namespace body exceeds the specified number of newlines and doesn't
3125# have a comment after the close brace, a comment will be added.
3126mod_add_long_namespace_closebrace_comment = 0 # unsigned number
3127
3128# If a class body exceeds the specified number of newlines and doesn't have a
3129# comment after the close brace, a comment will be added.
3130mod_add_long_class_closebrace_comment = 0 # unsigned number
3131
3132# If a switch body exceeds the specified number of newlines and doesn't have a
3133# comment after the close brace, a comment will be added.
3134mod_add_long_switch_closebrace_comment = 0 # unsigned number
3135
3136# If an #ifdef body exceeds the specified number of newlines and doesn't have
3137# a comment after the #endif, a comment will be added.
3138mod_add_long_ifdef_endif_comment = 0 # unsigned number
3139
3140# If an #ifdef or #else body exceeds the specified number of newlines and
3141# doesn't have a comment after the #else, a comment will be added.
3142mod_add_long_ifdef_else_comment = 0 # unsigned number
3143
3144# Whether to take care of the case by the mod_sort_xx options.
3145mod_sort_case_sensitive = false # true/false
3146
3147# Whether to sort consecutive single-line 'import' statements.
3148mod_sort_import = false # true/false
3149
3150# (C#) Whether to sort consecutive single-line 'using' statements.
3151mod_sort_using = false # true/false
3152
3153# Whether to sort consecutive single-line '#include' statements (C/C++) and
3154# '#import' statements (Objective-C). Be aware that this has the potential to
3155# break your code if your includes/imports have ordering dependencies.
Michal Vasko69730152020-10-09 16:30:07 +02003156mod_sort_include = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003157
3158# Whether to prioritize '#include' and '#import' statements that contain
3159# filename without extension when sorting is enabled.
3160mod_sort_incl_import_prioritize_filename = false # true/false
3161
3162# Whether to prioritize '#include' and '#import' statements that does not
3163# contain extensions when sorting is enabled.
3164mod_sort_incl_import_prioritize_extensionless = false # true/false
3165
3166# Whether to prioritize '#include' and '#import' statements that contain
3167# angle over quotes when sorting is enabled.
3168mod_sort_incl_import_prioritize_angle_over_quotes = true # true/false
3169
3170# Whether to ignore file extension in '#include' and '#import' statements
3171# for sorting comparison.
3172mod_sort_incl_import_ignore_extension = true # true/false
3173
3174# Whether to group '#include' and '#import' statements when sorting is enabled.
3175mod_sort_incl_import_grouping_enabled = false # true/false
3176
3177# Whether to move a 'break' that appears after a fully braced 'case' before
3178# the close brace, as in 'case X: { ... } break;' => 'case X: { ... break; }'.
Michal Vasko69730152020-10-09 16:30:07 +02003179mod_move_case_break = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003180
Michal Vasko26bbb272022-08-02 14:54:33 +02003181# Whether to move a 'return' that appears after a fully braced 'case' before
3182# the close brace, as in 'case X: { ... } return;' => 'case X: { ... return; }'.
3183mod_move_case_return = true # true/false
3184
Radek Krejcia198c962020-08-16 10:32:10 +02003185# Add or remove braces around a fully braced case statement. Will only remove
3186# braces if there are no variable declarations in the block.
Michal Vasko69730152020-10-09 16:30:07 +02003187mod_case_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02003188
3189# Whether to remove a void 'return;' that appears as the last statement in a
3190# function.
Michal Vasko69730152020-10-09 16:30:07 +02003191mod_remove_empty_return = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003192
3193# Add or remove the comma after the last value of an enumeration.
Michal Vasko69730152020-10-09 16:30:07 +02003194mod_enum_last_comma = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02003195
Michal Vasko2bf4af42023-01-04 12:08:38 +01003196# Syntax to use for infinite loops.
3197#
3198# 0: Leave syntax alone (default)
3199# 1: Rewrite as `for(;;)`
3200# 2: Rewrite as `while(true)`
3201# 3: Rewrite as `do`...`while(true);`
3202# 4: Rewrite as `while(1)`
3203# 5: Rewrite as `do`...`while(1);`
3204#
3205# Infinite loops that do not already match one of these syntaxes are ignored.
3206# Other options that affect loop formatting will be applied after transforming
3207# the syntax.
3208mod_infinite_loop = 0 # unsigned number
3209
3210# Add or remove the 'int' keyword in 'int short'.
3211mod_int_short = remove # ignore/add/remove/force/not_defined
3212
3213# Add or remove the 'int' keyword in 'short int'.
3214mod_short_int = remove # ignore/add/remove/force/not_defined
3215
3216# Add or remove the 'int' keyword in 'int long'.
3217mod_int_long = remove # ignore/add/remove/force/not_defined
3218
3219# Add or remove the 'int' keyword in 'long int'.
3220mod_long_int = remove # ignore/add/remove/force/not_defined
3221
3222# Add or remove the 'int' keyword in 'int signed'.
3223mod_int_signed = ignore # ignore/add/remove/force/not_defined
3224
3225# Add or remove the 'int' keyword in 'signed int'.
3226mod_signed_int = ignore # ignore/add/remove/force/not_defined
3227
3228# Add or remove the 'int' keyword in 'int unsigned'.
3229mod_int_unsigned = ignore # ignore/add/remove/force/not_defined
3230
3231# Add or remove the 'int' keyword in 'unsigned int'.
3232mod_unsigned_int = ignore # ignore/add/remove/force/not_defined
3233
3234# If there is a situation where mod_int_* and mod_*_int would result in
3235# multiple int keywords, whether to keep the rightmost int (the default) or the
3236# leftmost int.
3237mod_int_prefer_int_on_left = false # true/false
3238
Radek Krejcia198c962020-08-16 10:32:10 +02003239# (OC) Whether to organize the properties. If true, properties will be
3240# rearranged according to the mod_sort_oc_property_*_weight factors.
3241mod_sort_oc_properties = false # true/false
3242
3243# (OC) Weight of a class property modifier.
3244mod_sort_oc_property_class_weight = 0 # number
3245
3246# (OC) Weight of 'atomic' and 'nonatomic'.
3247mod_sort_oc_property_thread_safe_weight = 0 # number
3248
3249# (OC) Weight of 'readwrite' when organizing properties.
3250mod_sort_oc_property_readwrite_weight = 0 # number
3251
3252# (OC) Weight of a reference type specifier ('retain', 'copy', 'assign',
3253# 'weak', 'strong') when organizing properties.
3254mod_sort_oc_property_reference_weight = 0 # number
3255
3256# (OC) Weight of getter type ('getter=') when organizing properties.
3257mod_sort_oc_property_getter_weight = 0 # number
3258
3259# (OC) Weight of setter type ('setter=') when organizing properties.
3260mod_sort_oc_property_setter_weight = 0 # number
3261
3262# (OC) Weight of nullability type ('nullable', 'nonnull', 'null_unspecified',
3263# 'null_resettable') when organizing properties.
3264mod_sort_oc_property_nullability_weight = 0 # number
3265
3266#
3267# Preprocessor options
3268#
3269
Michal Vasko2bf4af42023-01-04 12:08:38 +01003270# How to use tabs when indenting preprocessor code.
3271#
3272# -1: Use 'indent_with_tabs' setting (default)
3273# 0: Spaces only
3274# 1: Indent with tabs to brace level, align with spaces
3275# 2: Indent and align with tabs, using spaces when not on a tabstop
3276#
3277# Default: -1
3278pp_indent_with_tabs = 0 # number
3279
Radek Krejcia198c962020-08-16 10:32:10 +02003280# Add or remove indentation of preprocessor directives inside #if blocks
3281# at brace level 0 (file-level).
3282pp_indent = ignore # ignore/add/remove/force
3283
3284# Whether to indent #if/#else/#endif at the brace level. If false, these are
3285# indented from column 1.
3286pp_indent_at_level = false # true/false
3287
Michal Vasko26bbb272022-08-02 14:54:33 +02003288# Whether to indent #if/#else/#endif at the parenthesis level if the brace
3289# level is 0. If false, these are indented from column 1.
3290pp_indent_at_level0 = false # true/false
3291
Radek Krejcia198c962020-08-16 10:32:10 +02003292# Specifies the number of columns to indent preprocessors per level
3293# at brace level 0 (file-level). If pp_indent_at_level=false, also specifies
3294# the number of columns to indent preprocessors per level
3295# at brace level > 0 (function-level).
3296#
3297# Default: 1
3298pp_indent_count = 0 # unsigned number
3299
Michal Vasko2bf4af42023-01-04 12:08:38 +01003300# Add or remove space after # based on pp level of #if blocks.
3301pp_space_after = ignore # ignore/add/remove/force/not_defined
Radek Krejcia198c962020-08-16 10:32:10 +02003302
3303# Sets the number of spaces per level added with pp_space.
3304pp_space_count = 0 # unsigned number
3305
3306# The indent for '#region' and '#endregion' in C# and '#pragma region' in
3307# C/C++. Negative values decrease indent down to the first column.
3308pp_indent_region = 0 # number
3309
3310# Whether to indent the code between #region and #endregion.
3311pp_region_indent_code = false # true/false
3312
3313# If pp_indent_at_level=true, sets the indent for #if, #else and #endif when
3314# not at file-level. Negative values decrease indent down to the first column.
3315#
3316# =0: Indent preprocessors using output_tab_size
3317# >0: Column at which all preprocessors will be indented
3318pp_indent_if = 0 # number
3319
3320# Whether to indent the code between #if, #else and #endif.
3321pp_if_indent_code = false # true/false
3322
Michal Vasko26bbb272022-08-02 14:54:33 +02003323# Whether to indent the body of an #if that encompasses all the code in the file.
3324pp_indent_in_guard = false # true/false
3325
Radek Krejcia198c962020-08-16 10:32:10 +02003326# Whether to indent '#define' at the brace level. If false, these are
3327# indented from column 1.
3328pp_define_at_level = false # true/false
3329
Michal Vasko26bbb272022-08-02 14:54:33 +02003330# Whether to indent '#include' at the brace level.
3331pp_include_at_level = false # true/false
3332
Radek Krejcia198c962020-08-16 10:32:10 +02003333# Whether to ignore the '#define' body while formatting.
3334pp_ignore_define_body = true # true/false
3335
Michal Vasko2bf4af42023-01-04 12:08:38 +01003336# An offset value that controls the indentation of the body of a multiline #define.
3337# 'body' refers to all the lines of a multiline #define except the first line.
3338# Requires 'pp_ignore_define_body = false'.
3339#
3340# <0: Absolute column: the body indentation starts off at the specified column
3341# (ex. -3 ==> the body is indented starting from column 3)
3342# >=0: Relative to the column of the '#' of '#define'
3343# (ex. 3 ==> the body is indented starting 3 columns at the right of '#')
3344#
3345# Default: 8
3346pp_multiline_define_body_indent = 8 # number
3347
Radek Krejcia198c962020-08-16 10:32:10 +02003348# Whether to indent case statements between #if, #else, and #endif.
3349# Only applies to the indent of the preprocesser that the case statements
3350# directly inside of.
3351#
3352# Default: true
3353pp_indent_case = false # true/false
3354
3355# Whether to indent whole function definitions between #if, #else, and #endif.
3356# Only applies to the indent of the preprocesser that the function definition
3357# is directly inside of.
3358#
3359# Default: true
3360pp_indent_func_def = false # true/false
3361
3362# Whether to indent extern C blocks between #if, #else, and #endif.
3363# Only applies to the indent of the preprocesser that the extern block is
3364# directly inside of.
3365#
3366# Default: true
3367pp_indent_extern = false # true/false
3368
Michal Vasko26bbb272022-08-02 14:54:33 +02003369# How to indent braces directly inside #if, #else, and #endif.
3370# Requires pp_if_indent_code=true and only applies to the indent of the
3371# preprocesser that the braces are directly inside of.
3372# 0: No extra indent
3373# 1: Indent by one level
3374# -1: Preserve original indentation
Radek Krejcia198c962020-08-16 10:32:10 +02003375#
Michal Vasko26bbb272022-08-02 14:54:33 +02003376# Default: 1
3377pp_indent_brace = 0 # number
3378
3379# Whether to print warning messages for unbalanced #if and #else blocks.
3380# This will print a message in the following cases:
3381# - if an #ifdef block ends on a different indent level than
3382# where it started from. Example:
3383#
3384# #ifdef TEST
3385# int i;
3386# {
3387# int j;
3388# #endif
3389#
3390# - an #elif/#else block ends on a different indent level than
3391# the corresponding #ifdef block. Example:
3392#
3393# #ifdef TEST
3394# int i;
3395# #else
3396# }
3397# int j;
3398# #endif
3399pp_warn_unbalanced_if = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003400
3401#
3402# Sort includes options
3403#
3404
3405# The regex for include category with priority 0.
3406include_category_0 = "" # string
3407
3408# The regex for include category with priority 1.
3409include_category_1 = "" # string
3410
3411# The regex for include category with priority 2.
3412include_category_2 = "" # string
3413
3414#
3415# Use or Do not Use options
3416#
3417
3418# true: indent_func_call_param will be used (default)
3419# false: indent_func_call_param will NOT be used
3420#
3421# Default: true
Michal Vasko69730152020-10-09 16:30:07 +02003422use_indent_func_call_param = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003423
3424# The value of the indentation for a continuation line is calculated
3425# differently if the statement is:
3426# - a declaration: your case with QString fileName ...
3427# - an assignment: your case with pSettings = new QSettings( ...
3428#
3429# At the second case the indentation value might be used twice:
3430# - at the assignment
3431# - at the function call (if present)
3432#
3433# To prevent the double use of the indentation value, use this option with the
3434# value 'true'.
3435#
3436# true: indent_continue will be used only once
3437# false: indent_continue will be used every time (default)
Michal Vasko69730152020-10-09 16:30:07 +02003438use_indent_continue_only_once = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003439
3440# The value might be used twice:
3441# - at the assignment
3442# - at the opening brace
3443#
3444# To prevent the double use of the indentation value, use this option with the
3445# value 'true'.
3446#
3447# true: indentation will be used only once
3448# false: indentation will be used every time (default)
Michal Vasko69730152020-10-09 16:30:07 +02003449indent_cpp_lambda_only_once = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003450
3451# Whether sp_after_angle takes precedence over sp_inside_fparen. This was the
3452# historic behavior, but is probably not the desired behavior, so this is off
3453# by default.
3454use_sp_after_angle_always = false # true/false
3455
3456# Whether to apply special formatting for Qt SIGNAL/SLOT macros. Essentially,
3457# this tries to format these so that they match Qt's normalized form (i.e. the
3458# result of QMetaObject::normalizedSignature), which can slightly improve the
3459# performance of the QObject::connect call, rather than how they would
3460# otherwise be formatted.
3461#
3462# See options_for_QT.cpp for details.
3463#
3464# Default: true
3465use_options_overriding_for_qt_macros = false # true/false
3466
3467# If true: the form feed character is removed from the list
3468# of whitespace characters.
3469# See https://en.cppreference.com/w/cpp/string/byte/isspace
3470use_form_feed_no_more_as_whitespace_character = false # true/false
3471
3472#
3473# Warn levels - 1: error, 2: warning (default), 3: note
3474#
3475
3476# (C#) Warning is given if doing tab-to-\t replacement and we have found one
3477# in a C# verbatim string literal.
3478#
3479# Default: 2
3480warn_level_tabs_found_in_verbatim_string_literals = 2 # unsigned number
3481
3482# Limit the number of loops.
3483# Used by uncrustify.cpp to exit from infinite loop.
3484# 0: no limit.
3485debug_max_number_of_loops = 0 # number
3486
3487# Set the number of the line to protocol;
3488# Used in the function prot_the_line if the 2. parameter is zero.
3489# 0: nothing protocol.
3490debug_line_number_to_protocol = 0 # number
3491
Michal Vasko26bbb272022-08-02 14:54:33 +02003492# Set the number of second(s) before terminating formatting the current file,
3493# 0: no timeout.
3494# only for linux
3495debug_timeout = 0 # number
3496
3497# Set the number of characters to be printed if the text is too long,
3498# 0: do not truncate.
3499debug_truncate = 0 # unsigned number
3500
Michal Vasko2bf4af42023-01-04 12:08:38 +01003501# sort (or not) the tracking info.
3502#
3503# Default: true
3504debug_sort_the_tracks = true # true/false
3505
3506# decode (or not) the flags as a new line.
3507# only if the -p option is set.
3508debug_decode_the_flags = false # true/false
3509
3510# insert the number of the line at the beginning of each line
3511set_numbering_for_html_output = false # true/false
3512
Radek Krejcia198c962020-08-16 10:32:10 +02003513# Meaning of the settings:
3514# Ignore - do not do any changes
3515# Add - makes sure there is 1 or more space/brace/newline/etc
3516# Force - makes sure there is exactly 1 space/brace/newline/etc,
3517# behaves like Add in some contexts
3518# Remove - removes space/brace/newline/etc
3519#
3520#
3521# - Token(s) can be treated as specific type(s) with the 'set' option:
3522# `set tokenType tokenString [tokenString...]`
3523#
3524# Example:
3525# `set BOOL __AND__ __OR__`
3526#
3527# tokenTypes are defined in src/token_enum.h, use them without the
3528# 'CT_' prefix: 'CT_BOOL' => 'BOOL'
3529#
3530#
3531# - Token(s) can be treated as type(s) with the 'type' option.
3532# `type tokenString [tokenString...]`
3533#
3534# Example:
3535# `type int c_uint_8 Rectangle`
3536#
3537# This can also be achieved with `set TYPE int c_uint_8 Rectangle`
3538#
3539#
3540# To embed whitespace in tokenStrings use the '\' escape character, or quote
3541# the tokenStrings. These quotes are supported: "'`
3542#
3543#
3544# - Support for the auto detection of languages through the file ending can be
3545# added using the 'file_ext' command.
3546# `file_ext langType langString [langString..]`
3547#
3548# Example:
3549# `file_ext CPP .ch .cxx .cpp.in`
3550#
3551# langTypes are defined in uncrusify_types.h in the lang_flag_e enum, use
3552# them without the 'LANG_' prefix: 'LANG_CPP' => 'CPP'
3553#
3554#
3555# - Custom macro-based indentation can be set up using 'macro-open',
3556# 'macro-else' and 'macro-close'.
3557# `(macro-open | macro-else | macro-close) tokenString`
3558#
3559# Example:
3560# `macro-open BEGIN_TEMPLATE_MESSAGE_MAP`
3561# `macro-open BEGIN_MESSAGE_MAP`
3562# `macro-close END_MESSAGE_MAP`
3563#
3564#
3565# option(s) with 'not default' value: 232
3566#