blob: 80d95e9101a8a47a2b6fe6d040c1a2443395c661 [file] [log] [blame]
Michal Vasko84bf6f42023-05-19 11:09:48 +02001# Uncrustify-0.77.1_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
Michal Vasko84bf6f42023-05-19 11:09:48 +0200213# Add or remove space between a qualifier and a pointer star '*' that isn't
214# followed by a variable name, as in '(char const *)'. If set to ignore,
215# sp_before_ptr_star is used instead.
216sp_qualifier_unnamed_ptr_star = ignore # ignore/add/remove/force/not_defined
217
Radek Krejcia198c962020-08-16 10:32:10 +0200218# Add or remove space between pointer stars '*'.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200219sp_between_ptr_star = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200220
221# Add or remove space after pointer star '*', if followed by a word.
222#
223# Overrides sp_type_func.
Michal Vasko22df3f02020-08-24 13:29:22 +0200224sp_after_ptr_star = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200225
226# Add or remove space after pointer caret '^', if followed by a word.
227#sp_after_ptr_block_caret = ignore # ignore/add/remove/force
228
229# Add or remove space after pointer star '*', if followed by a qualifier.
Michal Vasko22df3f02020-08-24 13:29:22 +0200230sp_after_ptr_star_qualifier = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200231
232# Add or remove space after a pointer star '*', if followed by a function
233# prototype or function definition.
234#
235# Overrides sp_after_ptr_star and sp_type_func.
236sp_after_ptr_star_func = ignore # ignore/add/remove/force
237
Michal Vasko26bbb272022-08-02 14:54:33 +0200238# Add or remove space after a pointer star '*' in the trailing return of a
239# function prototype or function definition.
240sp_after_ptr_star_trailing = ignore # ignore/add/remove/force/not_defined
241
242# Add or remove space between the pointer star '*' and the name of the variable
243# in a function pointer definition.
244sp_ptr_star_func_var = remove # ignore/add/remove/force/not_defined
245
246# Add or remove space between the pointer star '*' and the name of the type
247# in a function pointer type definition.
248sp_ptr_star_func_type = remove # ignore/add/remove/force/not_defined
249
Radek Krejcia198c962020-08-16 10:32:10 +0200250# Add or remove space after a pointer star '*', if followed by an open
251# parenthesis, as in 'void* (*)().
Michal Vaskoe29489b2020-08-24 10:43:54 +0200252sp_ptr_star_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200253
254# Add or remove space before a pointer star '*', if followed by a function
255# prototype or function definition.
Michal Vasko22df3f02020-08-24 13:29:22 +0200256sp_before_ptr_star_func = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200257
Michal Vasko84bf6f42023-05-19 11:09:48 +0200258# Add or remove space between a qualifier and a pointer star '*' followed by
259# the name of the function in a function prototype or definition, as in
260# 'char const *foo()`. If set to ignore, sp_before_ptr_star is used instead.
261sp_qualifier_ptr_star_func = ignore # ignore/add/remove/force/not_defined
262
Michal Vasko26bbb272022-08-02 14:54:33 +0200263# Add or remove space before a pointer star '*' in the trailing return of a
264# function prototype or function definition.
265sp_before_ptr_star_trailing = ignore # ignore/add/remove/force/not_defined
266
Michal Vasko84bf6f42023-05-19 11:09:48 +0200267# Add or remove space between a qualifier and a pointer star '*' in the
268# trailing return of a function prototype or function definition, as in
269# 'auto foo() -> char const *'.
270sp_qualifier_ptr_star_trailing = force # ignore/add/remove/force/not_defined
271
Radek Krejcia198c962020-08-16 10:32:10 +0200272# Add or remove space before a reference sign '&'.
273sp_before_byref = ignore # ignore/add/remove/force
274
275# Add or remove space before a reference sign '&' that isn't followed by a
276# variable name. If set to ignore, sp_before_byref is used instead.
277sp_before_unnamed_byref = ignore # ignore/add/remove/force
278
279# Add or remove space after reference sign '&', if followed by a word.
280#
281# Overrides sp_type_func.
282sp_after_byref = ignore # ignore/add/remove/force
283
284# Add or remove space after a reference sign '&', if followed by a function
285# prototype or function definition.
286#
287# Overrides sp_after_byref and sp_type_func.
288sp_after_byref_func = ignore # ignore/add/remove/force
289
290# Add or remove space before a reference sign '&', if followed by a function
291# prototype or function definition.
292sp_before_byref_func = ignore # ignore/add/remove/force
293
Michal Vasko26bbb272022-08-02 14:54:33 +0200294# Add or remove space after a reference sign '&', if followed by an open
295# parenthesis, as in 'char& (*)()'.
296sp_byref_paren = ignore # ignore/add/remove/force/not_defined
297
Radek Krejcia198c962020-08-16 10:32:10 +0200298# Add or remove space between type and word.
299#
300# Default: force
301sp_after_type = ignore # ignore/add/remove/force
302
303# Add or remove space between 'decltype(...)' and word.
304sp_after_decltype = ignore # ignore/add/remove/force
305
306# (D) Add or remove space before the parenthesis in the D constructs
307# 'template Foo(' and 'class Foo('.
308sp_before_template_paren = ignore # ignore/add/remove/force
309
310# Add or remove space between 'template' and '<'.
311# If set to ignore, sp_before_angle is used.
312sp_template_angle = ignore # ignore/add/remove/force
313
314# Add or remove space before '<'.
315sp_before_angle = ignore # ignore/add/remove/force
316
317# Add or remove space inside '<' and '>'.
318sp_inside_angle = ignore # ignore/add/remove/force
319
320# Add or remove space inside '<>'.
321sp_inside_angle_empty = ignore # ignore/add/remove/force
322
323# Add or remove space between '>' and ':'.
324sp_angle_colon = ignore # ignore/add/remove/force
325
326# Add or remove space after '>'.
327sp_after_angle = ignore # ignore/add/remove/force
328
329# Add or remove space between '>' and '(' as found in 'new List<byte>(foo);'.
330sp_angle_paren = ignore # ignore/add/remove/force
331
332# Add or remove space between '>' and '()' as found in 'new List<byte>();'.
333sp_angle_paren_empty = ignore # ignore/add/remove/force
334
335# Add or remove space between '>' and a word as in 'List<byte> m;' or
336# 'template <typename T> static ...'.
337sp_angle_word = ignore # ignore/add/remove/force
338
339# Add or remove space between '>' and '>' in '>>' (template stuff).
340#
341# Default: add
342sp_angle_shift = ignore # ignore/add/remove/force
343
344# (C++11) Permit removal of the space between '>>' in 'foo<bar<int> >'. Note
345# that sp_angle_shift cannot remove the space without this option.
346sp_permit_cpp11_shift = false # true/false
347
348# Add or remove space before '(' of control statements ('if', 'for', 'switch',
349# 'while', etc.).
Michal Vaskod989ba02020-08-24 10:59:24 +0200350sp_before_sparen = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200351
352# Add or remove space inside '(' and ')' of control statements.
Michal Vaskod989ba02020-08-24 10:59:24 +0200353sp_inside_sparen = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200354
355# Add or remove space after '(' of control statements.
356#
357# Overrides sp_inside_sparen.
358sp_inside_sparen_open = ignore # ignore/add/remove/force
359
360# Add or remove space before ')' of control statements.
361#
362# Overrides sp_inside_sparen.
363sp_inside_sparen_close = ignore # ignore/add/remove/force
364
Michal Vasko26bbb272022-08-02 14:54:33 +0200365# Add or remove space inside '(' and ')' of 'for' statements.
366sp_inside_for = remove # ignore/add/remove/force/not_defined
367
368# Add or remove space after '(' of 'for' statements.
369#
370# Overrides sp_inside_for.
371sp_inside_for_open = ignore # ignore/add/remove/force/not_defined
372
373# Add or remove space before ')' of 'for' statements.
374#
375# Overrides sp_inside_for.
376sp_inside_for_close = ignore # ignore/add/remove/force/not_defined
377
378# Add or remove space between '((' or '))' of control statements.
379sp_sparen_paren = ignore # ignore/add/remove/force/not_defined
380
Radek Krejcia198c962020-08-16 10:32:10 +0200381# Add or remove space after ')' of control statements.
Michal Vaskod989ba02020-08-24 10:59:24 +0200382sp_after_sparen = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200383
384# Add or remove space between ')' and '{' of of control statements.
Michal Vaskod989ba02020-08-24 10:59:24 +0200385sp_sparen_brace = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200386
387# (D) Add or remove space between 'invariant' and '('.
388sp_invariant_paren = ignore # ignore/add/remove/force
389
390# (D) Add or remove space after the ')' in 'invariant (C) c'.
391sp_after_invariant_paren = ignore # ignore/add/remove/force
392
393# Add or remove space before empty statement ';' on 'if', 'for' and 'while'.
394sp_special_semi = ignore # ignore/add/remove/force
395
396# Add or remove space before ';'.
397#
398# Default: remove
Michal Vaskod989ba02020-08-24 10:59:24 +0200399sp_before_semi = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200400
401# Add or remove space before ';' in non-empty 'for' statements.
Michal Vaskod989ba02020-08-24 10:59:24 +0200402sp_before_semi_for = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200403
404# Add or remove space before a semicolon of an empty part of a for statement.
Michal Vaskod989ba02020-08-24 10:59:24 +0200405sp_before_semi_for_empty = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200406
Michal Vasko26bbb272022-08-02 14:54:33 +0200407# Add or remove space between the semicolons of an empty middle part of a for
408# statement, as in 'for ( ; <here> ; )'.
409sp_between_semi_for_empty = ignore # ignore/add/remove/force/not_defined
410
Radek Krejcia198c962020-08-16 10:32:10 +0200411# Add or remove space after ';', except when followed by a comment.
412#
413# Default: add
Michal Vaskod989ba02020-08-24 10:59:24 +0200414sp_after_semi = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200415
416# Add or remove space after ';' in non-empty 'for' statements.
417#
418# Default: force
Michal Vaskod989ba02020-08-24 10:59:24 +0200419sp_after_semi_for = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200420
421# Add or remove space after the final semicolon of an empty part of a for
422# statement, as in 'for ( ; ; <here> )'.
Michal Vaskod989ba02020-08-24 10:59:24 +0200423sp_after_semi_for_empty = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200424
425# Add or remove space before '[' (except '[]').
426sp_before_square = ignore # ignore/add/remove/force
427
428# Add or remove space before '[' for a variable definition.
429#
430# Default: remove
431sp_before_vardef_square = ignore # ignore/add/remove/force
432
433# Add or remove space before '[' for asm block.
434sp_before_square_asm_block = ignore # ignore/add/remove/force
435
436# Add or remove space before '[]'.
437sp_before_squares = ignore # ignore/add/remove/force
438
439# Add or remove space before C++17 structured bindings.
440sp_cpp_before_struct_binding = ignore # ignore/add/remove/force
441
442# Add or remove space inside a non-empty '[' and ']'.
443sp_inside_square = ignore # ignore/add/remove/force
444
Michal Vasko26bbb272022-08-02 14:54:33 +0200445# Add or remove space inside '[]'.
446sp_inside_square_empty = remove # ignore/add/remove/force/not_defined
447
Radek Krejcia198c962020-08-16 10:32:10 +0200448# (OC) Add or remove space inside a non-empty Objective-C boxed array '@[' and
449# ']'. If set to ignore, sp_inside_square is used.
450sp_inside_square_oc_array = ignore # ignore/add/remove/force
451
452# Add or remove space after ',', i.e. 'a,b' vs. 'a, b'.
Michal Vaskod989ba02020-08-24 10:59:24 +0200453sp_after_comma = add # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200454
455# Add or remove space before ','.
456#
457# Default: remove
Michal Vaskod989ba02020-08-24 10:59:24 +0200458sp_before_comma = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200459
460# (C#) Add or remove space between ',' and ']' in multidimensional array type
461# like 'int[,,]'.
462sp_after_mdatype_commas = ignore # ignore/add/remove/force
463
464# (C#) Add or remove space between '[' and ',' in multidimensional array type
465# like 'int[,,]'.
466sp_before_mdatype_commas = ignore # ignore/add/remove/force
467
468# (C#) Add or remove space between ',' in multidimensional array type
469# like 'int[,,]'.
470sp_between_mdatype_commas = ignore # ignore/add/remove/force
471
472# Add or remove space between an open parenthesis and comma,
473# i.e. '(,' vs. '( ,'.
474#
475# Default: force
Michal Vaskod989ba02020-08-24 10:59:24 +0200476sp_paren_comma = 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 type and ':'.
479sp_type_colon = ignore # ignore/add/remove/force/not_defined
480
481# Add or remove space after the variadic '...' when preceded by a
482# non-punctuator.
483# The value REMOVE will be overriden with FORCE
484sp_after_ellipsis = ignore # ignore/add/remove/force/not_defined
485
Radek Krejcia198c962020-08-16 10:32:10 +0200486# Add or remove space before the variadic '...' when preceded by a
487# non-punctuator.
Michal Vaskoe1445952020-08-24 11:19:42 +0200488sp_before_ellipsis = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200489
490# Add or remove space between a type and '...'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200491sp_type_ellipsis = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200492
Michal Vasko26bbb272022-08-02 14:54:33 +0200493# Add or remove space between a '*' and '...'.
494sp_ptr_type_ellipsis = ignore # ignore/add/remove/force/not_defined
Radek Krejcia198c962020-08-16 10:32:10 +0200495
496# Add or remove space between ')' and '...'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200497sp_paren_ellipsis = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200498
Michal Vasko26bbb272022-08-02 14:54:33 +0200499# Add or remove space between '&&' and '...'.
500sp_byref_ellipsis = ignore # ignore/add/remove/force/not_defined
501
Radek Krejcia198c962020-08-16 10:32:10 +0200502# Add or remove space between ')' and a qualifier such as 'const'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200503sp_paren_qualifier = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200504
505# Add or remove space between ')' and 'noexcept'.
506sp_paren_noexcept = ignore # ignore/add/remove/force
507
508# Add or remove space after class ':'.
509sp_after_class_colon = ignore # ignore/add/remove/force
510
511# Add or remove space before class ':'.
512sp_before_class_colon = ignore # ignore/add/remove/force
513
514# Add or remove space after class constructor ':'.
515sp_after_constr_colon = ignore # ignore/add/remove/force
516
517# Add or remove space before class constructor ':'.
518sp_before_constr_colon = ignore # ignore/add/remove/force
519
520# Add or remove space before case ':'.
521#
522# Default: remove
523sp_before_case_colon = remove # ignore/add/remove/force
524
525# Add or remove space between 'operator' and operator sign.
526sp_after_operator = ignore # ignore/add/remove/force
527
528# Add or remove space between the operator symbol and the open parenthesis, as
529# in 'operator ++('.
530sp_after_operator_sym = ignore # ignore/add/remove/force
531
532# Overrides sp_after_operator_sym when the operator has no arguments, as in
533# 'operator *()'.
534sp_after_operator_sym_empty = ignore # ignore/add/remove/force
535
536# Add or remove space after C/D cast, i.e. 'cast(int)a' vs. 'cast(int) a' or
537# '(int)a' vs. '(int) a'.
538sp_after_cast = ignore # ignore/add/remove/force
539
540# Add or remove spaces inside cast parentheses.
Michal Vaskoe1445952020-08-24 11:19:42 +0200541sp_inside_paren_cast = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200542
543# Add or remove space between the type and open parenthesis in a C++ cast,
544# i.e. 'int(exp)' vs. 'int (exp)'.
545sp_cpp_cast_paren = ignore # ignore/add/remove/force
546
547# Add or remove space between 'sizeof' and '('.
548sp_sizeof_paren = ignore # ignore/add/remove/force
549
550# Add or remove space between 'sizeof' and '...'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200551sp_sizeof_ellipsis = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200552
553# Add or remove space between 'sizeof...' and '('.
Michal Vaskoe1445952020-08-24 11:19:42 +0200554sp_sizeof_ellipsis_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200555
Michal Vasko26bbb272022-08-02 14:54:33 +0200556# Add or remove space between '...' and a parameter pack.
557sp_ellipsis_parameter_pack = ignore # ignore/add/remove/force/not_defined
558
559# Add or remove space between a parameter pack and '...'.
560sp_parameter_pack_ellipsis = ignore # ignore/add/remove/force/not_defined
561
Radek Krejcia198c962020-08-16 10:32:10 +0200562# Add or remove space between 'decltype' and '('.
563sp_decltype_paren = ignore # ignore/add/remove/force
564
565# (Pawn) Add or remove space after the tag keyword.
566#sp_after_tag = ignore # ignore/add/remove/force
567
568# Add or remove space inside enum '{' and '}'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200569sp_inside_braces_enum = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200570
571# Add or remove space inside struct/union '{' and '}'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200572sp_inside_braces_struct = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200573
574# (OC) Add or remove space inside Objective-C boxed dictionary '{' and '}'
575#sp_inside_braces_oc_dict = ignore # ignore/add/remove/force
576
577# Add or remove space after open brace in an unnamed temporary
578# direct-list-initialization.
579sp_after_type_brace_init_lst_open = ignore # ignore/add/remove/force
580
581# Add or remove space before close brace in an unnamed temporary
582# direct-list-initialization.
583sp_before_type_brace_init_lst_close = ignore # ignore/add/remove/force
584
585# Add or remove space inside an unnamed temporary direct-list-initialization.
586sp_inside_type_brace_init_lst = ignore # ignore/add/remove/force
587
588# Add or remove space inside '{' and '}'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200589sp_inside_braces = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200590
591# Add or remove space inside '{}'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200592sp_inside_braces_empty = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200593
594# Add or remove space around trailing return operator '->'.
595sp_trailing_return = ignore # ignore/add/remove/force
596
597# Add or remove space between return type and function name. A minimum of 1
598# is forced except for pointer return types.
Michal Vaskoe1445952020-08-24 11:19:42 +0200599sp_type_func = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200600
601# Add or remove space between type and open brace of an unnamed temporary
602# direct-list-initialization.
Michal Vaskoe1445952020-08-24 11:19:42 +0200603sp_type_brace_init_lst = ignore # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200604
605# Add or remove space between function name and '(' on function declaration.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200606sp_func_proto_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200607
608# Add or remove space between function name and '()' on function declaration
609# without parameters.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200610sp_func_proto_paren_empty = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200611
612# Add or remove space between function name and '(' with a typedef specifier.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200613sp_func_type_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200614
615# Add or remove space between alias name and '(' of a non-pointer function type typedef.
616sp_func_def_paren = ignore # ignore/add/remove/force
617
618# Add or remove space between function name and '()' on function definition
619# without parameters.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200620sp_func_def_paren_empty = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200621
622# Add or remove space inside empty function '()'.
623# Overrides sp_after_angle unless use_sp_after_angle_always is set to true.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200624sp_inside_fparens = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200625
626# Add or remove space inside function '(' and ')'.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200627sp_inside_fparen = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200628
Michal Vasko84bf6f42023-05-19 11:09:48 +0200629# Add or remove space inside user functor '(' and ')'.
630sp_func_call_user_inside_rparen = ignore # ignore/add/remove/force/not_defined
631
632# Add or remove space inside empty functor '()'.
633# Overrides sp_after_angle unless use_sp_after_angle_always is set to true.
634sp_inside_rparens = ignore # ignore/add/remove/force/not_defined
635
636# Add or remove space inside functor '(' and ')'.
637sp_inside_rparen = ignore # ignore/add/remove/force/not_defined
638
Radek Krejcia198c962020-08-16 10:32:10 +0200639# Add or remove space inside the first parentheses in a function type, as in
640# 'void (*x)(...)'.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200641sp_inside_tparen = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200642
643# Add or remove space between the ')' and '(' in a function type, as in
644# 'void (*x)(...)'.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200645sp_after_tparen_close = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200646
647# Add or remove space between ']' and '(' when part of a function call.
648sp_square_fparen = ignore # ignore/add/remove/force
649
650# Add or remove space between ')' and '{' of function.
651sp_fparen_brace = ignore # ignore/add/remove/force
652
653# Add or remove space between ')' and '{' of s function call in object
654# initialization.
655#
656# Overrides sp_fparen_brace.
657sp_fparen_brace_initializer = ignore # ignore/add/remove/force
658
659# (Java) Add or remove space between ')' and '{{' of double brace initializer.
660sp_fparen_dbrace = ignore # ignore/add/remove/force
661
662# Add or remove space between function name and '(' on function calls.
663sp_func_call_paren = ignore # ignore/add/remove/force
664
665# Add or remove space between function name and '()' on function calls without
666# parameters. If set to ignore (the default), sp_func_call_paren is used.
667sp_func_call_paren_empty = ignore # ignore/add/remove/force
668
669# Add or remove space between the user function name and '(' on function
670# calls. You need to set a keyword to be a user function in the config file,
671# like:
672# set func_call_user tr _ i18n
673sp_func_call_user_paren = ignore # ignore/add/remove/force
674
675# Add or remove space inside user function '(' and ')'.
676sp_func_call_user_inside_fparen = ignore # ignore/add/remove/force
677
678# Add or remove space between nested parentheses with user functions,
679# i.e. '((' vs. '( ('.
680sp_func_call_user_paren_paren = ignore # ignore/add/remove/force
681
682# Add or remove space between a constructor/destructor and the open
683# parenthesis.
684sp_func_class_paren = ignore # ignore/add/remove/force
685
686# Add or remove space between a constructor without parameters or destructor
687# and '()'.
688sp_func_class_paren_empty = ignore # ignore/add/remove/force
689
Michal Vasko26bbb272022-08-02 14:54:33 +0200690# Add or remove space after 'return'.
691#
692# Default: force
693sp_return = force # ignore/add/remove/force/not_defined
694
Radek Krejcia198c962020-08-16 10:32:10 +0200695# Add or remove space between 'return' and '('.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200696sp_return_paren = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200697
698# Add or remove space between 'return' and '{'.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200699sp_return_brace = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200700
701# Add or remove space between '__attribute__' and '('.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200702sp_attribute_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200703
704# Add or remove space between 'defined' and '(' in '#if defined (FOO)'.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200705sp_defined_paren = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200706
707# Add or remove space between 'throw' and '(' in 'throw (something)'.
708sp_throw_paren = ignore # ignore/add/remove/force
709
710# Add or remove space between 'throw' and anything other than '(' as in
711# '@throw [...];'.
712sp_after_throw = ignore # ignore/add/remove/force
713
714# Add or remove space between 'catch' and '(' in 'catch (something) { }'.
715# If set to ignore, sp_before_sparen is used.
716sp_catch_paren = ignore # ignore/add/remove/force
717
718# (OC) Add or remove space between '@catch' and '('
719# in '@catch (something) { }'. If set to ignore, sp_catch_paren is used.
720sp_oc_catch_paren = ignore # ignore/add/remove/force
721
722# (OC) Add or remove space before Objective-C protocol list
723# as in '@protocol Protocol<here><Protocol_A>' or '@interface MyClass : NSObject<here><MyProtocol>'.
724sp_before_oc_proto_list = ignore # ignore/add/remove/force
725
726# (OC) Add or remove space between class name and '('
727# in '@interface className(categoryName)<ProtocolName>:BaseClass'
728sp_oc_classname_paren = ignore # ignore/add/remove/force
729
730# (D) Add or remove space between 'version' and '('
731# in 'version (something) { }'. If set to ignore, sp_before_sparen is used.
732sp_version_paren = ignore # ignore/add/remove/force
733
734# (D) Add or remove space between 'scope' and '('
735# in 'scope (something) { }'. If set to ignore, sp_before_sparen is used.
736sp_scope_paren = ignore # ignore/add/remove/force
737
738# Add or remove space between 'super' and '(' in 'super (something)'.
739#
740# Default: remove
741sp_super_paren = ignore # ignore/add/remove/force
742
743# Add or remove space between 'this' and '(' in 'this (something)'.
744#
745# Default: remove
746sp_this_paren = ignore # ignore/add/remove/force
747
748# Add or remove space between a macro name and its definition.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200749sp_macro = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200750
751# Add or remove space between a macro function ')' and its definition.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200752sp_macro_func = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200753
754# Add or remove space between 'else' and '{' if on the same line.
Michal Vaskod989ba02020-08-24 10:59:24 +0200755sp_else_brace = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200756
757# Add or remove space between '}' and 'else' if on the same line.
Michal Vaskoe29489b2020-08-24 10:43:54 +0200758sp_brace_else = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200759
760# Add or remove space between '}' and the name of a typedef on the same line.
Michal Vaskoe1445952020-08-24 11:19:42 +0200761sp_brace_typedef = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200762
763# Add or remove space before the '{' of a 'catch' statement, if the '{' and
764# 'catch' are on the same line, as in 'catch (decl) <here> {'.
765sp_catch_brace = ignore # ignore/add/remove/force
766
767# (OC) Add or remove space before the '{' of a '@catch' statement, if the '{'
768# and '@catch' are on the same line, as in '@catch (decl) <here> {'.
769# If set to ignore, sp_catch_brace is used.
770sp_oc_catch_brace = ignore # ignore/add/remove/force
771
772# Add or remove space between '}' and 'catch' if on the same line.
773sp_brace_catch = ignore # ignore/add/remove/force
774
775# (OC) Add or remove space between '}' and '@catch' if on the same line.
776# If set to ignore, sp_brace_catch is used.
777sp_oc_brace_catch = ignore # ignore/add/remove/force
778
779# Add or remove space between 'finally' and '{' if on the same line.
780sp_finally_brace = ignore # ignore/add/remove/force
781
782# Add or remove space between '}' and 'finally' if on the same line.
783sp_brace_finally = ignore # ignore/add/remove/force
784
785# Add or remove space between 'try' and '{' if on the same line.
786sp_try_brace = ignore # ignore/add/remove/force
787
788# Add or remove space between get/set and '{' if on the same line.
789sp_getset_brace = ignore # ignore/add/remove/force
790
791# Add or remove space between a variable and '{' for C++ uniform
792# initialization.
793sp_word_brace_init_lst = ignore # ignore/add/remove/force
794
795# Add or remove space between a variable and '{' for a namespace.
796#
797# Default: add
798sp_word_brace_ns = ignore # ignore/add/remove/force
799
800# Add or remove space before the '::' operator.
801sp_before_dc = ignore # ignore/add/remove/force
802
803# Add or remove space after the '::' operator.
804sp_after_dc = ignore # ignore/add/remove/force
805
806# (D) Add or remove around the D named array initializer ':' operator.
807sp_d_array_colon = remove # ignore/add/remove/force
808
809# Add or remove space after the '!' (not) unary operator.
810#
811# Default: remove
Michal Vaskoe1445952020-08-24 11:19:42 +0200812sp_not = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200813
Michal Vasko26bbb272022-08-02 14:54:33 +0200814# Add or remove space between two '!' (not) unary operators.
815# If set to ignore, sp_not will be used.
816sp_not_not = remove # ignore/add/remove/force/not_defined
817
Radek Krejcia198c962020-08-16 10:32:10 +0200818# Add or remove space after the '~' (invert) unary operator.
819#
820# Default: remove
Michal Vaskoe1445952020-08-24 11:19:42 +0200821sp_inv = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200822
823# Add or remove space after the '&' (address-of) unary operator. This does not
824# affect the spacing after a '&' that is part of a type.
825#
826# Default: remove
Michal Vaskoe1445952020-08-24 11:19:42 +0200827sp_addr = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200828
829# Add or remove space around the '.' or '->' operators.
830#
831# Default: remove
Michal Vaskoe1445952020-08-24 11:19:42 +0200832sp_member = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200833
834# Add or remove space after the '*' (dereference) unary operator. This does
835# not affect the spacing after a '*' that is part of a type.
836#
837# Default: remove
Michal Vaskoe1445952020-08-24 11:19:42 +0200838sp_deref = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200839
840# Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'.
841#
842# Default: remove
Michal Vaskoe1445952020-08-24 11:19:42 +0200843sp_sign = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200844
845# Add or remove space between '++' and '--' the word to which it is being
846# applied, as in '(--x)' or 'y++;'.
847#
848# Default: remove
Michal Vaskoe1445952020-08-24 11:19:42 +0200849sp_incdec = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200850
851# Add or remove space before a backslash-newline at the end of a line.
852#
853# Default: add
854sp_before_nl_cont = ignore # ignore/add/remove/force
855
856# (OC) Add or remove space after the scope '+' or '-', as in '-(void) foo;'
857# or '+(int) bar;'.
858sp_after_oc_scope = ignore # ignore/add/remove/force
859
860# (OC) Add or remove space after the colon in message specs,
861# i.e. '-(int) f:(int) x;' vs. '-(int) f: (int) x;'.
862sp_after_oc_colon = ignore # ignore/add/remove/force
863
864# (OC) Add or remove space before the colon in message specs,
865# i.e. '-(int) f: (int) x;' vs. '-(int) f : (int) x;'.
866sp_before_oc_colon = ignore # ignore/add/remove/force
867
868# (OC) Add or remove space after the colon in immutable dictionary expression
869# 'NSDictionary *test = @{@"foo" :@"bar"};'.
870sp_after_oc_dict_colon = ignore # ignore/add/remove/force
871
872# (OC) Add or remove space before the colon in immutable dictionary expression
873# 'NSDictionary *test = @{@"foo" :@"bar"};'.
874sp_before_oc_dict_colon = ignore # ignore/add/remove/force
875
876# (OC) Add or remove space after the colon in message specs,
877# i.e. '[object setValue:1];' vs. '[object setValue: 1];'.
878sp_after_send_oc_colon = ignore # ignore/add/remove/force
879
880# (OC) Add or remove space before the colon in message specs,
881# i.e. '[object setValue:1];' vs. '[object setValue :1];'.
882sp_before_send_oc_colon = ignore # ignore/add/remove/force
883
884# (OC) Add or remove space after the (type) in message specs,
885# i.e. '-(int)f: (int) x;' vs. '-(int)f: (int)x;'.
886sp_after_oc_type = ignore # ignore/add/remove/force
887
888# (OC) Add or remove space after the first (type) in message specs,
889# i.e. '-(int) f:(int)x;' vs. '-(int)f:(int)x;'.
890sp_after_oc_return_type = ignore # ignore/add/remove/force
891
892# (OC) Add or remove space between '@selector' and '(',
893# i.e. '@selector(msgName)' vs. '@selector (msgName)'.
894# Also applies to '@protocol()' constructs.
895sp_after_oc_at_sel = ignore # ignore/add/remove/force
896
897# (OC) Add or remove space between '@selector(x)' and the following word,
898# i.e. '@selector(foo) a:' vs. '@selector(foo)a:'.
899sp_after_oc_at_sel_parens = ignore # ignore/add/remove/force
900
901# (OC) Add or remove space inside '@selector' parentheses,
902# i.e. '@selector(foo)' vs. '@selector( foo )'.
903# Also applies to '@protocol()' constructs.
904sp_inside_oc_at_sel_parens = ignore # ignore/add/remove/force
905
906# (OC) Add or remove space before a block pointer caret,
907# i.e. '^int (int arg){...}' vs. ' ^int (int arg){...}'.
908sp_before_oc_block_caret = ignore # ignore/add/remove/force
909
910# (OC) Add or remove space after a block pointer caret,
911# i.e. '^int (int arg){...}' vs. '^ int (int arg){...}'.
912sp_after_oc_block_caret = ignore # ignore/add/remove/force
913
914# (OC) Add or remove space between the receiver and selector in a message,
915# as in '[receiver selector ...]'.
916sp_after_oc_msg_receiver = ignore # ignore/add/remove/force
917
918# (OC) Add or remove space after '@property'.
919sp_after_oc_property = ignore # ignore/add/remove/force
920
921# (OC) Add or remove space between '@synchronized' and the open parenthesis,
922# i.e. '@synchronized(foo)' vs. '@synchronized (foo)'.
923sp_after_oc_synchronized = ignore # ignore/add/remove/force
924
925# Add or remove space around the ':' in 'b ? t : f'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200926sp_cond_colon = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200927
928# Add or remove space before the ':' in 'b ? t : f'.
929#
930# Overrides sp_cond_colon.
Michal Vaskoe1445952020-08-24 11:19:42 +0200931sp_cond_colon_before = ignore # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200932
933# Add or remove space after the ':' in 'b ? t : f'.
934#
935# Overrides sp_cond_colon.
Michal Vaskoe1445952020-08-24 11:19:42 +0200936sp_cond_colon_after = ignore # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200937
938# Add or remove space around the '?' in 'b ? t : f'.
Michal Vaskoe1445952020-08-24 11:19:42 +0200939sp_cond_question = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200940
941# Add or remove space before the '?' in 'b ? t : f'.
942#
943# Overrides sp_cond_question.
944sp_cond_question_before = ignore # ignore/add/remove/force
945
946# Add or remove space after the '?' in 'b ? t : f'.
947#
948# Overrides sp_cond_question.
949sp_cond_question_after = ignore # ignore/add/remove/force
950
951# In the abbreviated ternary form '(a ?: b)', add or remove space between '?'
952# and ':'.
953#
954# Overrides all other sp_cond_* options.
Michal Vaskoe1445952020-08-24 11:19:42 +0200955sp_cond_ternary_short = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200956
957# Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make
958# sense here.
Michal Vaskoe1445952020-08-24 11:19:42 +0200959sp_case_label = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200960
961# (D) Add or remove space around the D '..' operator.
962sp_range = ignore # ignore/add/remove/force
963
964# Add or remove space after ':' in a Java/C++11 range-based 'for',
965# as in 'for (Type var : expr)'.
966sp_after_for_colon = ignore # ignore/add/remove/force
967
968# Add or remove space before ':' in a Java/C++11 range-based 'for',
969# as in 'for (Type var : expr)'.
970sp_before_for_colon = ignore # ignore/add/remove/force
971
972# (D) Add or remove space between 'extern' and '(' as in 'extern (C)'.
973sp_extern_paren = ignore # ignore/add/remove/force
974
975# Add or remove space after the opening of a C++ comment,
976# i.e. '// A' vs. '//A'.
Michal Vasko033278d2020-08-24 11:24:52 +0200977sp_cmt_cpp_start = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +0200978
Michal Vasko84bf6f42023-05-19 11:09:48 +0200979# remove space after the '//' and the pvs command '-V1234',
980# only works with sp_cmt_cpp_start set to add or force.
981sp_cmt_cpp_pvs = false # true/false
982
983# remove space after the '//' and the command 'lint',
984# only works with sp_cmt_cpp_start set to add or force.
985sp_cmt_cpp_lint = false # true/false
986
Michal Vasko26bbb272022-08-02 14:54:33 +0200987# Add or remove space in a C++ region marker comment, as in '// <here> BEGIN'.
988# A region marker is defined as a comment which is not preceded by other text
989# (i.e. the comment is the first non-whitespace on the line), and which starts
990# with either 'BEGIN' or 'END'.
991#
992# Overrides sp_cmt_cpp_start.
993sp_cmt_cpp_region = ignore # ignore/add/remove/force/not_defined
994
Radek Krejcia198c962020-08-16 10:32:10 +0200995# If true, space is added with sp_cmt_cpp_start will be added after doxygen
996# sequences like '///', '///<', '//!' and '//!<'.
997sp_cmt_cpp_doxygen = true # true/false
998
999# If true, space is added with sp_cmt_cpp_start will be added after Qt
1000# translator or meta-data comments like '//:', '//=', and '//~'.
1001sp_cmt_cpp_qttr = true # true/false
1002
1003# Add or remove space between #else or #endif and a trailing comment.
Michal Vasko033278d2020-08-24 11:24:52 +02001004sp_endif_cmt = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001005
1006# Add or remove space after 'new', 'delete' and 'delete[]'.
1007sp_after_new = ignore # ignore/add/remove/force
1008
1009# Add or remove space between 'new' and '(' in 'new()'.
1010sp_between_new_paren = ignore # ignore/add/remove/force
1011
1012# Add or remove space between ')' and type in 'new(foo) BAR'.
1013sp_after_newop_paren = ignore # ignore/add/remove/force
1014
1015# Add or remove space inside parenthesis of the new operator
1016# as in 'new(foo) BAR'.
1017sp_inside_newop_paren = ignore # ignore/add/remove/force
1018
1019# Add or remove space after the open parenthesis of the new operator,
1020# as in 'new(foo) BAR'.
1021#
1022# Overrides sp_inside_newop_paren.
1023sp_inside_newop_paren_open = ignore # ignore/add/remove/force
1024
1025# Add or remove space before the close parenthesis of the new operator,
1026# as in 'new(foo) BAR'.
1027#
1028# Overrides sp_inside_newop_paren.
1029sp_inside_newop_paren_close = ignore # ignore/add/remove/force
1030
Michal Vasko26bbb272022-08-02 14:54:33 +02001031# Add or remove space before a trailing comment.
1032sp_before_tr_cmt = ignore # ignore/add/remove/force/not_defined
Radek Krejcia198c962020-08-16 10:32:10 +02001033
Michal Vasko26bbb272022-08-02 14:54:33 +02001034# Number of spaces before a trailing comment.
1035sp_num_before_tr_cmt = 0 # unsigned number
1036
1037# Add or remove space before an embedded comment.
1038#
1039# Default: force
1040sp_before_emb_cmt = force # ignore/add/remove/force/not_defined
1041
1042# Number of spaces before an embedded comment.
1043#
1044# Default: 1
1045sp_num_before_emb_cmt = 1 # unsigned number
1046
1047# Add or remove space after an embedded comment.
1048#
1049# Default: force
1050sp_after_emb_cmt = force # ignore/add/remove/force/not_defined
1051
1052# Number of spaces after an embedded comment.
1053#
1054# Default: 1
1055sp_num_after_emb_cmt = 1 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02001056
1057# (Java) Add or remove space between an annotation and the open parenthesis.
1058sp_annotation_paren = ignore # ignore/add/remove/force
1059
1060# If true, vbrace tokens are dropped to the previous token and skipped.
1061sp_skip_vbrace_tokens = false # true/false
1062
1063# Add or remove space after 'noexcept'.
1064sp_after_noexcept = ignore # ignore/add/remove/force
1065
1066# Add or remove space after '_'.
1067sp_vala_after_translation = ignore # ignore/add/remove/force
1068
1069# If true, a <TAB> is inserted after #define.
1070force_tab_after_define = false # true/false
1071
1072#
1073# Indenting options
1074#
1075
1076# The number of columns to indent per level. Usually 2, 3, 4, or 8.
1077#
1078# Default: 8
1079indent_columns = 4 # unsigned number
1080
Michal Vasko26bbb272022-08-02 14:54:33 +02001081# Whether to ignore indent for the first continuation line. Subsequent
1082# continuation lines will still be indented to match the first.
1083indent_ignore_first_continue = false # true/false
1084
Radek Krejcia198c962020-08-16 10:32:10 +02001085# The continuation indent. If non-zero, this overrides the indent of '(', '['
1086# and '=' continuation indents. Negative values are OK; negative value is
1087# absolute and not increased for each '(' or '[' level.
1088#
1089# For FreeBSD, this is set to 4.
1090indent_continue = 8 # number
1091
1092# The continuation indent, only for class header line(s). If non-zero, this
1093# overrides the indent of 'class' continuation indents.
1094indent_continue_class_head = 0 # unsigned number
1095
1096# Whether to indent empty lines (i.e. lines which contain only spaces before
1097# the newline character).
1098indent_single_newlines = false # true/false
1099
1100# The continuation indent for func_*_param if they are true. If non-zero, this
1101# overrides the indent.
Michal Vasko69730152020-10-09 16:30:07 +02001102indent_param = 4 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02001103
1104# How to use tabs when indenting code.
1105#
1106# 0: Spaces only
1107# 1: Indent with tabs to brace level, align with spaces (default)
1108# 2: Indent and align with tabs, using spaces when not on a tabstop
1109#
1110# Default: 1
1111indent_with_tabs = 0 # unsigned number
1112
1113# Whether to indent comments that are not at a brace level with tabs on a
1114# tabstop. Requires indent_with_tabs=2. If false, will use spaces.
1115indent_cmt_with_tabs = false # true/false
1116
1117# Whether to indent strings broken by '\' so that they line up.
1118indent_align_string = false # true/false
1119
1120# The number of spaces to indent multi-line XML strings.
1121# Requires indent_align_string=true.
Michal Vasko69730152020-10-09 16:30:07 +02001122indent_xml_string = 4 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02001123
1124# Spaces to indent '{' from level.
1125indent_brace = 0 # unsigned number
1126
1127# Whether braces are indented to the body level.
1128indent_braces = false # true/false
1129
1130# Whether to disable indenting function braces if indent_braces=true.
1131indent_braces_no_func = false # true/false
1132
1133# Whether to disable indenting class braces if indent_braces=true.
1134indent_braces_no_class = false # true/false
1135
1136# Whether to disable indenting struct braces if indent_braces=true.
1137indent_braces_no_struct = false # true/false
1138
1139# Whether to indent based on the size of the brace parent,
1140# i.e. 'if' => 3 spaces, 'for' => 4 spaces, etc.
1141indent_brace_parent = false # true/false
1142
1143# Whether to indent based on the open parenthesis instead of the open brace
1144# in '({\n'.
1145indent_paren_open_brace = false # true/false
1146
1147# (C#) Whether to indent the brace of a C# delegate by another level.
1148indent_cs_delegate_brace = false # true/false
1149
1150# (C#) Whether to indent a C# delegate (to handle delegates with no brace) by
1151# another level.
1152indent_cs_delegate_body = false # true/false
1153
1154# Whether to indent the body of a 'namespace'.
1155indent_namespace = false # true/false
1156
1157# Whether to indent only the first namespace, and not any nested namespaces.
1158# Requires indent_namespace=true.
1159indent_namespace_single_indent = false # true/false
1160
1161# The number of spaces to indent a namespace block.
1162# If set to zero, use the value indent_columns
1163indent_namespace_level = 0 # unsigned number
1164
1165# If the body of the namespace is longer than this number, it won't be
1166# indented. Requires indent_namespace=true. 0 means no limit.
1167indent_namespace_limit = 0 # unsigned number
1168
Michal Vasko26bbb272022-08-02 14:54:33 +02001169# Whether to indent only in inner namespaces (nested in other namespaces).
1170# Requires indent_namespace=true.
1171indent_namespace_inner_only = false # true/false
1172
Radek Krejcia198c962020-08-16 10:32:10 +02001173# Whether the 'extern "C"' body is indented.
1174indent_extern = false # true/false
1175
1176# Whether the 'class' body is indented.
1177indent_class = false # true/false
1178
Michal Vasko26bbb272022-08-02 14:54:33 +02001179# Whether to ignore indent for the leading base class colon.
1180indent_ignore_before_class_colon = false # true/false
1181
1182# Additional indent before the leading base class colon.
1183# Negative values decrease indent down to the first column.
1184# Requires a newline break before colon (see pos_class_colon
1185# and nl_class_colon)
1186indent_before_class_colon = 0 # number
1187
Radek Krejcia198c962020-08-16 10:32:10 +02001188# Whether to indent the stuff after a leading base class colon.
1189indent_class_colon = false # true/false
1190
1191# Whether to indent based on a class colon instead of the stuff after the
1192# colon. Requires indent_class_colon=true.
1193indent_class_on_colon = false # true/false
1194
Michal Vasko26bbb272022-08-02 14:54:33 +02001195# Whether to ignore indent for a leading class initializer colon.
1196indent_ignore_before_constr_colon = false # true/false
1197
Radek Krejcia198c962020-08-16 10:32:10 +02001198# Whether to indent the stuff after a leading class initializer colon.
1199indent_constr_colon = false # true/false
1200
1201# Virtual indent from the ':' for member initializers.
1202#
1203# Default: 2
1204indent_ctor_init_leading = 0 # unsigned number
1205
Michal Vasko26bbb272022-08-02 14:54:33 +02001206# Virtual indent from the ':' for following member initializers.
1207#
1208# Default: 2
1209indent_ctor_init_following = 2 # unsigned number
1210
Radek Krejcia198c962020-08-16 10:32:10 +02001211# Additional indent for constructor initializer list.
1212# Negative values decrease indent down to the first column.
1213indent_ctor_init = 0 # number
1214
1215# Whether to indent 'if' following 'else' as a new block under the 'else'.
1216# If false, 'else\nif' is treated as 'else if' for indenting purposes.
1217indent_else_if = false # true/false
1218
1219# Amount to indent variable declarations after a open brace.
1220#
1221# <0: Relative
1222# >=0: Absolute
1223indent_var_def_blk = 0 # number
1224
1225# Whether to indent continued variable declarations instead of aligning.
Michal Vasko69730152020-10-09 16:30:07 +02001226indent_var_def_cont = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001227
Michal Vasko26bbb272022-08-02 14:54:33 +02001228# How to indent continued shift expressions ('<<' and '>>').
1229# Set align_left_shift=false when using this.
1230# 0: Align shift operators instead of indenting them (default)
1231# 1: Indent by one level
1232# -1: Preserve original indentation
1233indent_shift = 1 # number
Radek Krejcia198c962020-08-16 10:32:10 +02001234
1235# Whether to force indentation of function definitions to start in column 1.
1236indent_func_def_force_col1 = false # true/false
1237
1238# Whether to indent continued function call parameters one indent level,
1239# rather than aligning parameters under the open parenthesis.
Michal Vasko69730152020-10-09 16:30:07 +02001240indent_func_call_param = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001241
1242# Whether to indent continued function definition parameters one indent level,
1243# rather than aligning parameters under the open parenthesis.
Michal Vasko69730152020-10-09 16:30:07 +02001244indent_func_def_param = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001245
1246# for function definitions, only if indent_func_def_param is false
1247# Allows to align params when appropriate and indent them when not
1248# behave as if it was true if paren position is more than this value
1249# if paren position is more than the option value
1250indent_func_def_param_paren_pos_threshold = 0 # unsigned number
1251
1252# Whether to indent continued function call prototype one indent level,
1253# rather than aligning parameters under the open parenthesis.
Michal Vasko69730152020-10-09 16:30:07 +02001254indent_func_proto_param = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001255
1256# Whether to indent continued function call declaration one indent level,
1257# rather than aligning parameters under the open parenthesis.
Michal Vasko69730152020-10-09 16:30:07 +02001258indent_func_class_param = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001259
1260# Whether to indent continued class variable constructors one indent level,
1261# rather than aligning parameters under the open parenthesis.
Michal Vasko69730152020-10-09 16:30:07 +02001262indent_func_ctor_var_param = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001263
1264# Whether to indent continued template parameter list one indent level,
1265# rather than aligning parameters under the open parenthesis.
Michal Vasko69730152020-10-09 16:30:07 +02001266indent_template_param = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001267
1268# Double the indent for indent_func_xxx_param options.
1269# Use both values of the options indent_columns and indent_param.
Michal Vasko69730152020-10-09 16:30:07 +02001270indent_func_param_double = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001271
1272# Indentation column for standalone 'const' qualifier on a function
1273# prototype.
1274indent_func_const = 0 # unsigned number
1275
1276# Indentation column for standalone 'throw' qualifier on a function
1277# prototype.
1278indent_func_throw = 0 # unsigned number
1279
1280# How to indent within a macro followed by a brace on the same line
1281# This allows reducing the indent in macros that have (for example)
1282# `do { ... } while (0)` blocks bracketing them.
1283#
1284# true: add an indent for the brace on the same line as the macro
1285# false: do not add an indent for the brace on the same line as the macro
1286#
1287# Default: true
1288indent_macro_brace = false # true/false
1289
1290# The number of spaces to indent a continued '->' or '.'.
1291# Usually set to 0, 1, or indent_columns.
1292indent_member = 0 # unsigned number
1293
1294# Whether lines broken at '.' or '->' should be indented by a single indent.
1295# The indent_member option will not be effective if this is set to true.
Michal Vasko69730152020-10-09 16:30:07 +02001296indent_member_single = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001297
1298# Spaces to indent single line ('//') comments on lines before code.
Michal Vasko26bbb272022-08-02 14:54:33 +02001299indent_single_line_comments_before = 0 # unsigned number
1300
1301# Spaces to indent single line ('//') comments on lines after code.
1302indent_single_line_comments_after = 0 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02001303
1304# When opening a paren for a control statement (if, for, while, etc), increase
1305# the indent level by this value. Negative values decrease the indent level.
1306indent_sparen_extra = 0 # number
1307
1308# Whether to indent trailing single line ('//') comments relative to the code
1309# instead of trying to keep the same absolute column.
1310indent_relative_single_line_comments = false # true/false
1311
1312# Spaces to indent 'case' from 'switch'. Usually 0 or indent_columns.
1313indent_switch_case = 0 # unsigned number
1314
Michal Vasko26bbb272022-08-02 14:54:33 +02001315# Spaces to indent the body of a 'switch' before any 'case'.
1316# Usually the same as indent_columns or indent_switch_case.
1317indent_switch_body = 0 # unsigned number
1318
1319# Whether to ignore indent for '{' following 'case'.
1320indent_ignore_case_brace = false # true/false
1321
Radek Krejcia198c962020-08-16 10:32:10 +02001322# indent 'break' with 'case' from 'switch'.
1323indent_switch_break_with_case = false # true/false
1324
1325# Whether to indent preprocessor statements inside of switch statements.
1326#
1327# Default: true
1328indent_switch_pp = false # true/false
1329
1330# Spaces to shift the 'case' line, without affecting any other lines.
1331# Usually 0.
1332indent_case_shift = 0 # unsigned number
1333
1334# Spaces to indent '{' from 'case'. By default, the brace will appear under
1335# the 'c' in case. Usually set to 0 or indent_columns. Negative values are OK.
1336indent_case_brace = 0 # number
1337
Michal Vasko26bbb272022-08-02 14:54:33 +02001338# Whether to indent comments not found in first column.
1339#
1340# Default: true
1341indent_comment = true # true/false
1342
Radek Krejcia198c962020-08-16 10:32:10 +02001343# Whether to indent comments found in first column.
1344indent_col1_comment = false # true/false
1345
1346# Whether to indent multi string literal in first column.
1347indent_col1_multi_string_literal = false # true/false
1348
Michal Vasko26bbb272022-08-02 14:54:33 +02001349# Align comments on adjacent lines that are this many columns apart or less.
1350#
1351# Default: 3
1352indent_comment_align_thresh = 3 # unsigned number
1353
1354# Whether to ignore indent for goto labels.
1355indent_ignore_label = true # true/false
1356
Radek Krejcia198c962020-08-16 10:32:10 +02001357# How to indent goto labels.
1358#
1359# >0: Absolute column where 1 is the leftmost column
1360# <=0: Subtract from brace indent
1361#
1362# Default: 1
1363indent_label = 1 # number
1364
1365# How to indent access specifiers that are followed by a
1366# colon.
1367#
1368# >0: Absolute column where 1 is the leftmost column
1369# <=0: Subtract from brace indent
1370#
1371# Default: 1
1372indent_access_spec = 1 # number
1373
1374# Whether to indent the code after an access specifier by one level.
1375# If true, this option forces 'indent_access_spec=0'.
1376indent_access_spec_body = false # true/false
1377
1378# If an open parenthesis is followed by a newline, whether to indent the next
1379# line so that it lines up after the open parenthesis (not recommended).
1380indent_paren_nl = false # true/false
1381
1382# How to indent a close parenthesis after a newline.
1383#
1384# 0: Indent to body level (default)
1385# 1: Align under the open parenthesis
1386# 2: Indent to the brace level
1387indent_paren_close = 1 # unsigned number
1388
1389# Whether to indent the open parenthesis of a function definition,
1390# if the parenthesis is on its own line.
1391indent_paren_after_func_def = false # true/false
1392
1393# Whether to indent the open parenthesis of a function declaration,
1394# if the parenthesis is on its own line.
1395indent_paren_after_func_decl = false # true/false
1396
1397# Whether to indent the open parenthesis of a function call,
1398# if the parenthesis is on its own line.
1399indent_paren_after_func_call = false # true/false
1400
Michal Vasko26bbb272022-08-02 14:54:33 +02001401# How to indent a comma when inside braces.
1402# 0: Indent by one level (default)
1403# 1: Align under the open brace
1404# -1: Preserve original indentation
1405indent_comma_brace = 0 # number
Radek Krejcia198c962020-08-16 10:32:10 +02001406
Michal Vasko26bbb272022-08-02 14:54:33 +02001407# How to indent a comma when inside parentheses.
1408# 0: Indent by one level (default)
1409# 1: Align under the open parenthesis
1410# -1: Preserve original indentation
1411indent_comma_paren = 0 # number
1412
1413# How to indent a Boolean operator when inside parentheses.
1414# 0: Indent by one level (default)
1415# 1: Align under the open parenthesis
1416# -1: Preserve original indentation
1417indent_bool_paren = 0 # number
1418
1419# Whether to ignore the indentation of a Boolean operator when outside
1420# parentheses.
1421indent_ignore_bool = false # true/false
1422
1423# Whether to ignore the indentation of an arithmetic operator.
1424indent_ignore_arith = false # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001425
1426# Whether to indent a semicolon when inside a for parenthesis.
1427# If true, aligns under the open for parenthesis.
1428indent_semicolon_for_paren = false # true/false
1429
Michal Vasko26bbb272022-08-02 14:54:33 +02001430# Whether to ignore the indentation of a semicolon outside of a 'for'
1431# statement.
1432indent_ignore_semicolon = false # true/false
1433
Radek Krejcia198c962020-08-16 10:32:10 +02001434# Whether to align the first expression to following ones
1435# if indent_bool_paren=true.
1436indent_first_bool_expr = false # true/false
1437
1438# Whether to align the first expression to following ones
1439# if indent_semicolon_for_paren=true.
1440indent_first_for_expr = false # true/false
1441
1442# If an open square is followed by a newline, whether to indent the next line
1443# so that it lines up after the open square (not recommended).
1444indent_square_nl = false # true/false
1445
1446# (ESQL/C) Whether to preserve the relative indent of 'EXEC SQL' bodies.
1447indent_preserve_sql = false # true/false
1448
Michal Vasko26bbb272022-08-02 14:54:33 +02001449# Whether to ignore the indentation of an assignment operator.
1450indent_ignore_assign = false # true/false
1451
Radek Krejcia198c962020-08-16 10:32:10 +02001452# Whether to align continued statements at the '='. If false or if the '=' is
1453# followed by a newline, the next line is indent one tab.
1454#
1455# Default: true
Michal Vasko69730152020-10-09 16:30:07 +02001456indent_align_assign = false # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001457
1458# If true, the indentation of the chunks after a '=' sequence will be set at
1459# LHS token indentation column before '='.
1460indent_off_after_assign = false # true/false
1461
1462# Whether to align continued statements at the '('. If false or the '(' is
1463# followed by a newline, the next line indent is one tab.
1464#
1465# Default: true
1466indent_align_paren = true # true/false
1467
1468# (OC) Whether to indent Objective-C code inside message selectors.
1469indent_oc_inside_msg_sel = false # true/false
1470
1471# (OC) Whether to indent Objective-C blocks at brace level instead of usual
1472# rules.
1473indent_oc_block = false # true/false
1474
1475# (OC) Indent for Objective-C blocks in a message relative to the parameter
1476# name.
1477#
1478# =0: Use indent_oc_block rules
1479# >0: Use specified number of spaces to indent
1480indent_oc_block_msg = 0 # unsigned number
1481
1482# (OC) Minimum indent for subsequent parameters
1483indent_oc_msg_colon = 0 # unsigned number
1484
1485# (OC) Whether to prioritize aligning with initial colon (and stripping spaces
1486# from lines, if necessary).
1487#
1488# Default: true
1489indent_oc_msg_prioritize_first_colon = true # true/false
1490
1491# (OC) Whether to indent blocks the way that Xcode does by default
1492# (from the keyword if the parameter is on its own line; otherwise, from the
1493# previous indentation level). Requires indent_oc_block_msg=true.
1494indent_oc_block_msg_xcode_style = false # true/false
1495
1496# (OC) Whether to indent blocks from where the brace is, relative to a
1497# message keyword. Requires indent_oc_block_msg=true.
1498indent_oc_block_msg_from_keyword = false # true/false
1499
1500# (OC) Whether to indent blocks from where the brace is, relative to a message
1501# colon. Requires indent_oc_block_msg=true.
1502indent_oc_block_msg_from_colon = false # true/false
1503
1504# (OC) Whether to indent blocks from where the block caret is.
1505# Requires indent_oc_block_msg=true.
1506indent_oc_block_msg_from_caret = false # true/false
1507
1508# (OC) Whether to indent blocks from where the brace caret is.
1509# Requires indent_oc_block_msg=true.
1510indent_oc_block_msg_from_brace = false # true/false
1511
1512# When indenting after virtual brace open and newline add further spaces to
1513# reach this minimum indent.
Michal Vasko69730152020-10-09 16:30:07 +02001514indent_min_vbrace_open = 4 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02001515
1516# Whether to add further spaces after regular indent to reach next tabstop
1517# when identing after virtual brace open and newline.
1518indent_vbrace_open_on_tabstop = false # true/false
1519
1520# How to indent after a brace followed by another token (not a newline).
1521# true: indent all contained lines to match the token
1522# false: indent all contained lines to match the brace
1523#
1524# Default: true
1525indent_token_after_brace = false # true/false
1526
1527# Whether to indent the body of a C++11 lambda.
1528indent_cpp_lambda_body = false # true/false
1529
1530# How to indent compound literals that are being returned.
1531# true: add both the indent from return & the compound literal open brace (ie:
1532# 2 indent levels)
1533# false: only indent 1 level, don't add the indent for the open brace, only add
1534# the indent for the return.
1535#
1536# Default: true
1537indent_compound_literal_return = true # true/false
1538
1539# (C#) Whether to indent a 'using' block if no braces are used.
1540#
1541# Default: true
1542indent_using_block = true # true/false
1543
1544# How to indent the continuation of ternary operator.
1545#
1546# 0: Off (default)
1547# 1: When the `if_false` is a continuation, indent it under `if_false`
1548# 2: When the `:` is a continuation, indent it under `?`
Michal Vasko69730152020-10-09 16:30:07 +02001549indent_ternary_operator = 0 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02001550
1551# Whether to indent the statments inside ternary operator.
1552indent_inside_ternary_operator = false # true/false
1553
1554# If true, the indentation of the chunks after a `return` sequence will be set at return indentation column.
1555indent_off_after_return = false # true/false
1556
1557# If true, the indentation of the chunks after a `return new` sequence will be set at return indentation column.
1558indent_off_after_return_new = false # true/false
1559
1560# If true, the tokens after return are indented with regular single indentation. By default (false) the indentation is after the return token.
1561indent_single_after_return = false # true/false
1562
1563# Whether to ignore indent and alignment for 'asm' blocks (i.e. assume they
1564# have their own indentation).
1565indent_ignore_asm_block = true # true/false
1566
Michal Vasko26bbb272022-08-02 14:54:33 +02001567# Don't indent the close parenthesis of a function definition,
1568# if the parenthesis is on its own line.
1569donot_indent_func_def_close_paren = false # true/false
1570
Radek Krejcia198c962020-08-16 10:32:10 +02001571#
1572# Newline adding and removing options
1573#
1574
Michal Vasko2bf4af42023-01-04 12:08:38 +01001575# Whether to collapse empty blocks between '{' and '}' except for functions.
1576# Use nl_collapse_empty_body_functions to specify how empty function braces
1577# should be formatted.
Radek Krejcia198c962020-08-16 10:32:10 +02001578nl_collapse_empty_body = true # true/false
1579
Michal Vasko2bf4af42023-01-04 12:08:38 +01001580# Whether to collapse empty blocks between '{' and '}' for functions only.
1581# If true, overrides nl_inside_empty_func.
1582nl_collapse_empty_body_functions = false # true/false
1583
Radek Krejcia198c962020-08-16 10:32:10 +02001584# Don't split one-line braced assignments, as in 'foo_t f = { 1, 2 };'.
1585nl_assign_leave_one_liners = true # true/false
1586
1587# Don't split one-line braced statements inside a 'class xx { }' body.
1588nl_class_leave_one_liners = true # true/false
1589
1590# Don't split one-line enums, as in 'enum foo { BAR = 15 };'
1591nl_enum_leave_one_liners = true # true/false
1592
1593# Don't split one-line get or set functions.
1594nl_getset_leave_one_liners = true # true/false
1595
1596# (C#) Don't split one-line property get or set functions.
1597nl_cs_property_leave_one_liners = true # true/false
1598
1599# Don't split one-line function definitions, as in 'int foo() { return 0; }'.
1600# might modify nl_func_type_name
1601nl_func_leave_one_liners = true # true/false
1602
1603# Don't split one-line C++11 lambdas, as in '[]() { return 0; }'.
1604nl_cpp_lambda_leave_one_liners = true # true/false
1605
1606# Don't split one-line if/else statements, as in 'if(...) b++;'.
Michal Vasko69730152020-10-09 16:30:07 +02001607nl_if_leave_one_liners = false # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001608
1609# Don't split one-line while statements, as in 'while(...) b++;'.
Michal Vasko69730152020-10-09 16:30:07 +02001610nl_while_leave_one_liners = false # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001611
Michal Vasko26bbb272022-08-02 14:54:33 +02001612# Don't split one-line do statements, as in 'do { b++; } while(...);'.
1613nl_do_leave_one_liners = false # true/false
1614
Radek Krejcia198c962020-08-16 10:32:10 +02001615# Don't split one-line for statements, as in 'for(...) b++;'.
Michal Vasko69730152020-10-09 16:30:07 +02001616nl_for_leave_one_liners = false # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001617
1618# (OC) Don't split one-line Objective-C messages.
1619nl_oc_msg_leave_one_liner = true # true/false
1620
1621# (OC) Add or remove newline between method declaration and '{'.
1622nl_oc_mdef_brace = ignore # ignore/add/remove/force
1623
1624# (OC) Add or remove newline between Objective-C block signature and '{'.
1625nl_oc_block_brace = ignore # ignore/add/remove/force
1626
1627# (OC) Add or remove blank line before '@interface' statement.
1628nl_oc_before_interface = ignore # ignore/add/remove/force
1629
1630# (OC) Add or remove blank line before '@implementation' statement.
1631nl_oc_before_implementation = ignore # ignore/add/remove/force
1632
1633# (OC) Add or remove blank line before '@end' statement.
1634nl_oc_before_end = ignore # ignore/add/remove/force
1635
1636# (OC) Add or remove newline between '@interface' and '{'.
1637nl_oc_interface_brace = ignore # ignore/add/remove/force
1638
1639# (OC) Add or remove newline between '@implementation' and '{'.
1640nl_oc_implementation_brace = ignore # ignore/add/remove/force
1641
1642# Add or remove newlines at the start of the file.
Michal Vasko69730152020-10-09 16:30:07 +02001643nl_start_of_file = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001644
1645# The minimum number of newlines at the start of the file (only used if
1646# nl_start_of_file is 'add' or 'force').
1647nl_start_of_file_min = 0 # unsigned number
1648
1649# Add or remove newline at the end of the file.
Michal Vasko69730152020-10-09 16:30:07 +02001650nl_end_of_file = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001651
1652# The minimum number of newlines at the end of the file (only used if
1653# nl_end_of_file is 'add' or 'force').
Michal Vasko69730152020-10-09 16:30:07 +02001654nl_end_of_file_min = 1 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02001655
1656# Add or remove newline between '=' and '{'.
1657nl_assign_brace = ignore # ignore/add/remove/force
1658
1659# (D) Add or remove newline between '=' and '['.
1660nl_assign_square = ignore # ignore/add/remove/force
1661
1662# Add or remove newline between '[]' and '{'.
1663nl_tsquare_brace = ignore # ignore/add/remove/force
1664
1665# (D) Add or remove newline after '= ['. Will also affect the newline before
1666# the ']'.
1667nl_after_square_assign = ignore # ignore/add/remove/force
1668
1669# Add or remove newline between a function call's ')' and '{', as in
1670# 'list_for_each(item, &list) { }'.
1671nl_fcall_brace = ignore # ignore/add/remove/force
1672
1673# Add or remove newline between 'enum' and '{'.
Michal Vasko26bbb272022-08-02 14:54:33 +02001674nl_enum_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001675
1676# Add or remove newline between 'enum' and 'class'.
1677nl_enum_class = ignore # ignore/add/remove/force
1678
1679# Add or remove newline between 'enum class' and the identifier.
1680nl_enum_class_identifier = ignore # ignore/add/remove/force
1681
1682# Add or remove newline between 'enum class' type and ':'.
1683nl_enum_identifier_colon = ignore # ignore/add/remove/force
1684
1685# Add or remove newline between 'enum class identifier :' and type.
1686nl_enum_colon_type = ignore # ignore/add/remove/force
1687
1688# Add or remove newline between 'struct and '{'.
Michal Vasko26bbb272022-08-02 14:54:33 +02001689nl_struct_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001690
1691# Add or remove newline between 'union' and '{'.
Michal Vasko26bbb272022-08-02 14:54:33 +02001692nl_union_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001693
1694# Add or remove newline between 'if' and '{'.
Michal Vasko69730152020-10-09 16:30:07 +02001695nl_if_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001696
1697# Add or remove newline between '}' and 'else'.
1698nl_brace_else = remove # ignore/add/remove/force
1699
1700# Add or remove newline between 'else if' and '{'. If set to ignore,
1701# nl_if_brace is used instead.
1702nl_elseif_brace = ignore # ignore/add/remove/force
1703
1704# Add or remove newline between 'else' and '{'.
Michal Vasko69730152020-10-09 16:30:07 +02001705nl_else_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001706
1707# Add or remove newline between 'else' and 'if'.
Michal Vasko69730152020-10-09 16:30:07 +02001708nl_else_if = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001709
1710# Add or remove newline before '{' opening brace
Michal Vasko69730152020-10-09 16:30:07 +02001711nl_before_opening_brace_func_class_def = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001712
1713# Add or remove newline before 'if'/'else if' closing parenthesis.
Michal Vasko69730152020-10-09 16:30:07 +02001714nl_before_if_closing_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001715
1716# Add or remove newline between '}' and 'finally'.
1717nl_brace_finally = ignore # ignore/add/remove/force
1718
1719# Add or remove newline between 'finally' and '{'.
1720nl_finally_brace = ignore # ignore/add/remove/force
1721
1722# Add or remove newline between 'try' and '{'.
1723nl_try_brace = ignore # ignore/add/remove/force
1724
1725# Add or remove newline between get/set and '{'.
1726nl_getset_brace = ignore # ignore/add/remove/force
1727
1728# Add or remove newline between 'for' and '{'.
Michal Vasko69730152020-10-09 16:30:07 +02001729nl_for_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001730
1731# Add or remove newline before the '{' of a 'catch' statement, as in
1732# 'catch (decl) <here> {'.
1733nl_catch_brace = ignore # ignore/add/remove/force
1734
1735# (OC) Add or remove newline before the '{' of a '@catch' statement, as in
1736# '@catch (decl) <here> {'. If set to ignore, nl_catch_brace is used.
1737nl_oc_catch_brace = ignore # ignore/add/remove/force
1738
1739# Add or remove newline between '}' and 'catch'.
1740nl_brace_catch = ignore # ignore/add/remove/force
1741
1742# (OC) Add or remove newline between '}' and '@catch'. If set to ignore,
1743# nl_brace_catch is used.
1744nl_oc_brace_catch = ignore # ignore/add/remove/force
1745
1746# Add or remove newline between '}' and ']'.
1747nl_brace_square = ignore # ignore/add/remove/force
1748
1749# Add or remove newline between '}' and ')' in a function invocation.
1750nl_brace_fparen = ignore # ignore/add/remove/force
1751
1752# Add or remove newline between 'while' and '{'.
Michal Vasko69730152020-10-09 16:30:07 +02001753nl_while_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001754
1755# (D) Add or remove newline between 'scope (x)' and '{'.
1756nl_scope_brace = ignore # ignore/add/remove/force
1757
1758# (D) Add or remove newline between 'unittest' and '{'.
1759nl_unittest_brace = ignore # ignore/add/remove/force
1760
1761# (D) Add or remove newline between 'version (x)' and '{'.
1762nl_version_brace = ignore # ignore/add/remove/force
1763
1764# (C#) Add or remove newline between 'using' and '{'.
1765nl_using_brace = ignore # ignore/add/remove/force
1766
1767# Add or remove newline between two open or close braces. Due to general
1768# newline/brace handling, REMOVE may not work.
1769nl_brace_brace = ignore # ignore/add/remove/force
1770
1771# Add or remove newline between 'do' and '{'.
Michal Vasko69730152020-10-09 16:30:07 +02001772nl_do_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001773
1774# Add or remove newline between '}' and 'while' of 'do' statement.
Michal Vasko69730152020-10-09 16:30:07 +02001775nl_brace_while = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001776
1777# Add or remove newline between 'switch' and '{'.
Michal Vasko69730152020-10-09 16:30:07 +02001778nl_switch_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001779
1780# Add or remove newline between 'synchronized' and '{'.
1781nl_synchronized_brace = ignore # ignore/add/remove/force
1782
1783# Add a newline between ')' and '{' if the ')' is on a different line than the
1784# if/for/etc.
1785#
1786# Overrides nl_for_brace, nl_if_brace, nl_switch_brace, nl_while_switch and
1787# nl_catch_brace.
1788nl_multi_line_cond = false # true/false
1789
1790# Add a newline after '(' if an if/for/while/switch condition spans multiple
1791# lines
1792nl_multi_line_sparen_open = ignore # ignore/add/remove/force
1793
1794# Add a newline before ')' if an if/for/while/switch condition spans multiple
1795# lines. Overrides nl_before_if_closing_paren if both are specified.
1796nl_multi_line_sparen_close = ignore # ignore/add/remove/force
1797
1798# Force a newline in a define after the macro name for multi-line defines.
1799nl_multi_line_define = false # true/false
1800
1801# Whether to add a newline before 'case', and a blank line before a 'case'
1802# statement that follows a ';' or '}'.
1803nl_before_case = false # true/false
1804
1805# Whether to add a newline after a 'case' statement.
Michal Vasko69730152020-10-09 16:30:07 +02001806nl_after_case = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02001807
1808# Add or remove newline between a case ':' and '{'.
1809#
1810# Overrides nl_after_case.
Michal Vasko69730152020-10-09 16:30:07 +02001811nl_case_colon_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001812
1813# Add or remove newline between ')' and 'throw'.
1814nl_before_throw = ignore # ignore/add/remove/force
1815
1816# Add or remove newline between 'namespace' and '{'.
1817nl_namespace_brace = ignore # ignore/add/remove/force
1818
1819# Add or remove newline after 'template<...>' of a template class.
1820nl_template_class = ignore # ignore/add/remove/force
1821
1822# Add or remove newline after 'template<...>' of a template class declaration.
1823#
1824# Overrides nl_template_class.
1825nl_template_class_decl = ignore # ignore/add/remove/force
1826
1827# Add or remove newline after 'template<>' of a specialized class declaration.
1828#
1829# Overrides nl_template_class_decl.
1830nl_template_class_decl_special = ignore # ignore/add/remove/force
1831
1832# Add or remove newline after 'template<...>' of a template class definition.
1833#
1834# Overrides nl_template_class.
1835nl_template_class_def = ignore # ignore/add/remove/force
1836
1837# Add or remove newline after 'template<>' of a specialized class definition.
1838#
1839# Overrides nl_template_class_def.
1840nl_template_class_def_special = ignore # ignore/add/remove/force
1841
1842# Add or remove newline after 'template<...>' of a template function.
1843nl_template_func = ignore # ignore/add/remove/force
1844
1845# Add or remove newline after 'template<...>' of a template function
1846# declaration.
1847#
1848# Overrides nl_template_func.
1849nl_template_func_decl = ignore # ignore/add/remove/force
1850
1851# Add or remove newline after 'template<>' of a specialized function
1852# declaration.
1853#
1854# Overrides nl_template_func_decl.
1855nl_template_func_decl_special = ignore # ignore/add/remove/force
1856
1857# Add or remove newline after 'template<...>' of a template function
1858# definition.
1859#
1860# Overrides nl_template_func.
1861nl_template_func_def = ignore # ignore/add/remove/force
1862
1863# Add or remove newline after 'template<>' of a specialized function
1864# definition.
1865#
1866# Overrides nl_template_func_def.
1867nl_template_func_def_special = ignore # ignore/add/remove/force
1868
1869# Add or remove newline after 'template<...>' of a template variable.
1870nl_template_var = ignore # ignore/add/remove/force
1871
1872# Add or remove newline between 'template<...>' and 'using' of a templated
1873# type alias.
1874nl_template_using = ignore # ignore/add/remove/force
1875
1876# Add or remove newline between 'class' and '{'.
1877nl_class_brace = ignore # ignore/add/remove/force
1878
1879# Add or remove newline before or after (depending on pos_class_comma,
1880# may not be IGNORE) each',' in the base class list.
1881nl_class_init_args = ignore # ignore/add/remove/force
1882
1883# Add or remove newline after each ',' in the constructor member
1884# initialization. Related to nl_constr_colon, pos_constr_colon and
1885# pos_constr_comma.
1886nl_constr_init_args = ignore # ignore/add/remove/force
1887
1888# Add or remove newline before first element, after comma, and after last
1889# element, in 'enum'.
1890nl_enum_own_lines = ignore # ignore/add/remove/force
1891
1892# Add or remove newline between return type and function name in a function
1893# definition.
1894# might be modified by nl_func_leave_one_liners
Michal Vasko69730152020-10-09 16:30:07 +02001895nl_func_type_name = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001896
1897# Add or remove newline between return type and function name inside a class
1898# definition. If set to ignore, nl_func_type_name or nl_func_proto_type_name
1899# is used instead.
1900nl_func_type_name_class = ignore # ignore/add/remove/force
1901
1902# Add or remove newline between class specification and '::'
1903# in 'void A::f() { }'. Only appears in separate member implementation (does
1904# not appear with in-line implementation).
1905nl_func_class_scope = ignore # ignore/add/remove/force
1906
1907# Add or remove newline between function scope and name, as in
1908# 'void A :: <here> f() { }'.
1909nl_func_scope_name = ignore # ignore/add/remove/force
1910
1911# Add or remove newline between return type and function name in a prototype.
Michal Vasko69730152020-10-09 16:30:07 +02001912nl_func_proto_type_name = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001913
1914# Add or remove newline between a function name and the opening '(' in the
1915# declaration.
Michal Vasko69730152020-10-09 16:30:07 +02001916nl_func_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001917
1918# Overrides nl_func_paren for functions with no parameters.
1919nl_func_paren_empty = ignore # ignore/add/remove/force
1920
1921# Add or remove newline between a function name and the opening '(' in the
1922# definition.
Michal Vasko69730152020-10-09 16:30:07 +02001923nl_func_def_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001924
1925# Overrides nl_func_def_paren for functions with no parameters.
1926nl_func_def_paren_empty = ignore # ignore/add/remove/force
1927
1928# Add or remove newline between a function name and the opening '(' in the
1929# call.
Michal Vasko69730152020-10-09 16:30:07 +02001930nl_func_call_paren = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001931
1932# Overrides nl_func_call_paren for functions with no parameters.
1933nl_func_call_paren_empty = ignore # ignore/add/remove/force
1934
1935# Add or remove newline after '(' in a function declaration.
1936nl_func_decl_start = ignore # ignore/add/remove/force
1937
1938# Add or remove newline after '(' in a function definition.
1939nl_func_def_start = ignore # ignore/add/remove/force
1940
1941# Overrides nl_func_decl_start when there is only one parameter.
1942nl_func_decl_start_single = ignore # ignore/add/remove/force
1943
1944# Overrides nl_func_def_start when there is only one parameter.
1945nl_func_def_start_single = ignore # ignore/add/remove/force
1946
1947# Whether to add a newline after '(' in a function declaration if '(' and ')'
1948# are in different lines. If false, nl_func_decl_start is used instead.
1949nl_func_decl_start_multi_line = false # true/false
1950
1951# Whether to add a newline after '(' in a function definition if '(' and ')'
1952# are in different lines. If false, nl_func_def_start is used instead.
1953nl_func_def_start_multi_line = false # true/false
1954
1955# Add or remove newline after each ',' in a function declaration.
1956nl_func_decl_args = ignore # ignore/add/remove/force
1957
1958# Add or remove newline after each ',' in a function definition.
1959nl_func_def_args = ignore # ignore/add/remove/force
1960
1961# Add or remove newline after each ',' in a function call.
1962nl_func_call_args = ignore # ignore/add/remove/force
1963
1964# Whether to add a newline after each ',' in a function declaration if '('
1965# and ')' are in different lines. If false, nl_func_decl_args is used instead.
1966nl_func_decl_args_multi_line = false # true/false
1967
1968# Whether to add a newline after each ',' in a function definition if '('
1969# and ')' are in different lines. If false, nl_func_def_args is used instead.
1970nl_func_def_args_multi_line = false # true/false
1971
1972# Add or remove newline before the ')' in a function declaration.
Michal Vasko69730152020-10-09 16:30:07 +02001973nl_func_decl_end = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001974
1975# Add or remove newline before the ')' in a function definition.
Michal Vasko69730152020-10-09 16:30:07 +02001976nl_func_def_end = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001977
1978# Overrides nl_func_decl_end when there is only one parameter.
1979nl_func_decl_end_single = ignore # ignore/add/remove/force
1980
1981# Overrides nl_func_def_end when there is only one parameter.
1982nl_func_def_end_single = ignore # ignore/add/remove/force
1983
1984# Whether to add a newline before ')' in a function declaration if '(' and ')'
1985# are in different lines. If false, nl_func_decl_end is used instead.
1986nl_func_decl_end_multi_line = false # true/false
1987
1988# Whether to add a newline before ')' in a function definition if '(' and ')'
1989# are in different lines. If false, nl_func_def_end is used instead.
1990nl_func_def_end_multi_line = false # true/false
1991
1992# Add or remove newline between '()' in a function declaration.
Michal Vasko69730152020-10-09 16:30:07 +02001993nl_func_decl_empty = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001994
1995# Add or remove newline between '()' in a function definition.
Michal Vasko69730152020-10-09 16:30:07 +02001996nl_func_def_empty = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02001997
1998# Add or remove newline between '()' in a function call.
Michal Vasko69730152020-10-09 16:30:07 +02001999nl_func_call_empty = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02002000
2001# Whether to add a newline after '(' in a function call,
2002# has preference over nl_func_call_start_multi_line.
2003nl_func_call_start = ignore # ignore/add/remove/force
2004
2005# Whether to add a newline before ')' in a function call.
Michal Vasko69730152020-10-09 16:30:07 +02002006nl_func_call_end = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02002007
2008# Whether to add a newline after '(' in a function call if '(' and ')' are in
2009# different lines.
2010nl_func_call_start_multi_line = false # true/false
2011
2012# Whether to add a newline after each ',' in a function call if '(' and ')'
2013# are in different lines.
2014nl_func_call_args_multi_line = false # true/false
2015
2016# Whether to add a newline before ')' in a function call if '(' and ')' are in
2017# different lines.
2018nl_func_call_end_multi_line = false # true/false
2019
2020# Whether to respect nl_func_call_XXX option incase of closure args.
Michal Vasko69730152020-10-09 16:30:07 +02002021nl_func_call_args_multi_line_ignore_closures = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002022
2023# Whether to add a newline after '<' of a template parameter list.
2024nl_template_start = false # true/false
2025
2026# Whether to add a newline after each ',' in a template parameter list.
2027nl_template_args = false # true/false
2028
2029# Whether to add a newline before '>' of a template parameter list.
2030nl_template_end = false # true/false
2031
2032# (OC) Whether to put each Objective-C message parameter on a separate line.
2033# See nl_oc_msg_leave_one_liner.
2034nl_oc_msg_args = false # true/false
2035
Michal Vasko2bf4af42023-01-04 12:08:38 +01002036# (OC) Minimum number of Objective-C message parameters before applying nl_oc_msg_args.
2037nl_oc_msg_args_min_params = 0 # unsigned number
2038
2039# (OC) Max code width of Objective-C message before applying nl_oc_msg_args.
2040nl_oc_msg_args_max_code_width = 0 # unsigned number
2041
Radek Krejcia198c962020-08-16 10:32:10 +02002042# Add or remove newline between function signature and '{'.
Michal Vasko69730152020-10-09 16:30:07 +02002043nl_fdef_brace = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02002044
2045# Add or remove newline between function signature and '{',
2046# if signature ends with ')'. Overrides nl_fdef_brace.
Michal Vasko69730152020-10-09 16:30:07 +02002047nl_fdef_brace_cond = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02002048
2049# Add or remove newline between C++11 lambda signature and '{'.
2050nl_cpp_ldef_brace = ignore # ignore/add/remove/force
2051
2052# Add or remove newline between 'return' and the return expression.
Michal Vasko69730152020-10-09 16:30:07 +02002053nl_return_expr = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02002054
Michal Vasko2bf4af42023-01-04 12:08:38 +01002055# Add or remove newline between 'throw' and the throw expression.
2056nl_throw_expr = ignore # ignore/add/remove/force/not_defined
2057
Radek Krejcia198c962020-08-16 10:32:10 +02002058# Whether to add a newline after semicolons, except in 'for' statements.
2059nl_after_semicolon = false # true/false
2060
2061# (Java) Add or remove newline between the ')' and '{{' of the double brace
2062# initializer.
2063nl_paren_dbrace_open = ignore # ignore/add/remove/force
2064
2065# Whether to add a newline after the type in an unnamed temporary
2066# direct-list-initialization.
2067nl_type_brace_init_lst = ignore # ignore/add/remove/force
2068
2069# Whether to add a newline after the open brace in an unnamed temporary
2070# direct-list-initialization.
2071nl_type_brace_init_lst_open = ignore # ignore/add/remove/force
2072
2073# Whether to add a newline before the close brace in an unnamed temporary
2074# direct-list-initialization.
2075nl_type_brace_init_lst_close = ignore # ignore/add/remove/force
2076
Michal Vasko26bbb272022-08-02 14:54:33 +02002077# Whether to add a newline before '{'.
2078nl_before_brace_open = false # true/false
2079
Radek Krejcia198c962020-08-16 10:32:10 +02002080# Whether to add a newline after '{'. This also adds a newline before the
2081# matching '}'.
Michal Vasko69730152020-10-09 16:30:07 +02002082nl_after_brace_open = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002083
2084# Whether to add a newline between the open brace and a trailing single-line
2085# comment. Requires nl_after_brace_open=true.
2086nl_after_brace_open_cmt = false # true/false
2087
2088# Whether to add a newline after a virtual brace open with a non-empty body.
2089# These occur in un-braced if/while/do/for statement bodies.
2090nl_after_vbrace_open = false # true/false
2091
2092# Whether to add a newline after a virtual brace open with an empty body.
2093# These occur in un-braced if/while/do/for statement bodies.
2094nl_after_vbrace_open_empty = false # true/false
2095
2096# Whether to add a newline after '}'. Does not apply if followed by a
2097# necessary ';'.
Michal Vasko69730152020-10-09 16:30:07 +02002098nl_after_brace_close = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002099
2100# Whether to add a newline after a virtual brace close,
2101# as in 'if (foo) a++; <here> return;'.
2102nl_after_vbrace_close = false # true/false
2103
2104# Add or remove newline between the close brace and identifier,
2105# as in 'struct { int a; } <here> b;'. Affects enumerations, unions and
2106# structures. If set to ignore, uses nl_after_brace_close.
Michal Vasko69730152020-10-09 16:30:07 +02002107nl_brace_struct_var = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02002108
2109# Whether to alter newlines in '#define' macros.
2110nl_define_macro = false # true/false
2111
2112# Whether to alter newlines between consecutive parenthesis closes. The number
2113# of closing parentheses in a line will depend on respective open parenthesis
2114# lines.
Michal Vasko69730152020-10-09 16:30:07 +02002115nl_squeeze_paren_close = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002116
2117# Whether to remove blanks after '#ifxx' and '#elxx', or before '#elxx' and
2118# '#endif'. Does not affect top-level #ifdefs.
Michal Vasko69730152020-10-09 16:30:07 +02002119nl_squeeze_ifdef = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002120
2121# Makes the nl_squeeze_ifdef option affect the top-level #ifdefs as well.
2122nl_squeeze_ifdef_top_level = false # true/false
2123
2124# Add or remove blank line before 'if'.
2125nl_before_if = ignore # ignore/add/remove/force
2126
2127# Add or remove blank line after 'if' statement. Add/Force work only if the
2128# next token is not a closing brace.
2129nl_after_if = ignore # ignore/add/remove/force
2130
2131# Add or remove blank line before 'for'.
2132nl_before_for = ignore # ignore/add/remove/force
2133
2134# Add or remove blank line after 'for' statement.
2135nl_after_for = ignore # ignore/add/remove/force
2136
2137# Add or remove blank line before 'while'.
2138nl_before_while = ignore # ignore/add/remove/force
2139
2140# Add or remove blank line after 'while' statement.
2141nl_after_while = ignore # ignore/add/remove/force
2142
2143# Add or remove blank line before 'switch'.
2144nl_before_switch = ignore # ignore/add/remove/force
2145
2146# Add or remove blank line after 'switch' statement.
2147nl_after_switch = ignore # ignore/add/remove/force
2148
2149# Add or remove blank line before 'synchronized'.
2150nl_before_synchronized = ignore # ignore/add/remove/force
2151
2152# Add or remove blank line after 'synchronized' statement.
2153nl_after_synchronized = ignore # ignore/add/remove/force
2154
2155# Add or remove blank line before 'do'.
2156nl_before_do = ignore # ignore/add/remove/force
2157
2158# Add or remove blank line after 'do/while' statement.
2159nl_after_do = ignore # ignore/add/remove/force
2160
Michal Vasko26bbb272022-08-02 14:54:33 +02002161# Ignore nl_before_{if,for,switch,do,synchronized} if the control
2162# statement is immediately after a case statement.
2163# if nl_before_{if,for,switch,do} is set to remove, this option
2164# does nothing.
2165nl_before_ignore_after_case = false # true/false
2166
Radek Krejcia198c962020-08-16 10:32:10 +02002167# Whether to put a blank line before 'return' statements, unless after an open
2168# brace.
2169nl_before_return = false # true/false
2170
2171# Whether to put a blank line after 'return' statements, unless followed by a
2172# close brace.
2173nl_after_return = false # true/false
2174
2175# Whether to put a blank line before a member '.' or '->' operators.
2176nl_before_member = ignore # ignore/add/remove/force
2177
2178# (Java) Whether to put a blank line after a member '.' or '->' operators.
2179nl_after_member = ignore # ignore/add/remove/force
2180
2181# Whether to double-space commented-entries in 'struct'/'union'/'enum'.
2182nl_ds_struct_enum_cmt = false # true/false
2183
2184# Whether to force a newline before '}' of a 'struct'/'union'/'enum'.
2185# (Lower priority than eat_blanks_before_close_brace.)
2186nl_ds_struct_enum_close_brace = false # true/false
2187
2188# Add or remove newline before or after (depending on pos_class_colon) a class
2189# colon, as in 'class Foo <here> : <or here> public Bar'.
2190nl_class_colon = ignore # ignore/add/remove/force
2191
2192# Add or remove newline around a class constructor colon. The exact position
2193# depends on nl_constr_init_args, pos_constr_colon and pos_constr_comma.
2194nl_constr_colon = ignore # ignore/add/remove/force
2195
2196# Whether to collapse a two-line namespace, like 'namespace foo\n{ decl; }'
2197# into a single line. If true, prevents other brace newline rules from turning
2198# such code into four lines.
2199nl_namespace_two_to_one_liner = false # true/false
2200
2201# Whether to remove a newline in simple unbraced if statements, turning them
2202# into one-liners, as in 'if(b)\n i++;' => 'if(b) i++;'.
2203nl_create_if_one_liner = false # true/false
2204
2205# Whether to remove a newline in simple unbraced for statements, turning them
2206# into one-liners, as in 'for (...)\n stmt;' => 'for (...) stmt;'.
2207nl_create_for_one_liner = false # true/false
2208
2209# Whether to remove a newline in simple unbraced while statements, turning
2210# them into one-liners, as in 'while (expr)\n stmt;' => 'while (expr) stmt;'.
2211nl_create_while_one_liner = false # true/false
2212
2213# Whether to collapse a function definition whose body (not counting braces)
2214# is only one line so that the entire definition (prototype, braces, body) is
2215# a single line.
2216nl_create_func_def_one_liner = false # true/false
2217
2218# Whether to collapse a function definition whose body (not counting braces)
2219# is only one line so that the entire definition (prototype, braces, body) is
2220# a single line.
2221nl_create_list_one_liner = false # true/false
2222
2223# Whether to split one-line simple unbraced if statements into two lines by
2224# adding a newline, as in 'if(b) <here> i++;'.
2225nl_split_if_one_liner = false # true/false
2226
2227# Whether to split one-line simple unbraced for statements into two lines by
2228# adding a newline, as in 'for (...) <here> stmt;'.
2229nl_split_for_one_liner = false # true/false
2230
2231# Whether to split one-line simple unbraced while statements into two lines by
2232# adding a newline, as in 'while (expr) <here> stmt;'.
2233nl_split_while_one_liner = false # true/false
2234
Michal Vasko26bbb272022-08-02 14:54:33 +02002235# Don't add a newline before a cpp-comment in a parameter list of a function
2236# call.
2237donot_add_nl_before_cpp_comment = false # true/false
2238
Radek Krejcia198c962020-08-16 10:32:10 +02002239#
2240# Blank line options
2241#
2242
2243# The maximum number of consecutive newlines (3 = 2 blank lines).
2244nl_max = 2 # unsigned number
2245
2246# The maximum number of consecutive newlines in a function.
2247nl_max_blank_in_func = 2 # unsigned number
2248
Michal Vasko26bbb272022-08-02 14:54:33 +02002249# The number of newlines inside an empty function body.
2250# This option overrides eat_blanks_after_open_brace and
2251# eat_blanks_before_close_brace, but is ignored when
2252# nl_collapse_empty_body=true
2253nl_inside_empty_func = 0 # unsigned number
2254
Radek Krejcia198c962020-08-16 10:32:10 +02002255# The number of newlines before a function prototype.
2256nl_before_func_body_proto = 0 # unsigned number
2257
2258# The number of newlines before a multi-line function definition.
2259nl_before_func_body_def = 0 # unsigned number
2260
2261# The number of newlines before a class constructor/destructor prototype.
2262nl_before_func_class_proto = 0 # unsigned number
2263
2264# The number of newlines before a class constructor/destructor definition.
2265nl_before_func_class_def = 0 # unsigned number
2266
2267# The number of newlines after a function prototype.
2268nl_after_func_proto = 0 # unsigned number
2269
2270# The number of newlines after a function prototype, if not followed by
2271# another function prototype.
2272nl_after_func_proto_group = 0 # unsigned number
2273
2274# The number of newlines after a class constructor/destructor prototype.
2275nl_after_func_class_proto = 0 # unsigned number
2276
2277# The number of newlines after a class constructor/destructor prototype,
2278# if not followed by another constructor/destructor prototype.
2279nl_after_func_class_proto_group = 0 # unsigned number
2280
2281# Whether one-line method definitions inside a class body should be treated
2282# as if they were prototypes for the purposes of adding newlines.
2283#
2284# Requires nl_class_leave_one_liners=true. Overrides nl_before_func_body_def
2285# and nl_before_func_class_def for one-liners.
2286nl_class_leave_one_liner_groups = false # true/false
2287
2288# The number of newlines after '}' of a multi-line function body.
2289nl_after_func_body = 2 # unsigned number
2290
2291# The number of newlines after '}' of a multi-line function body in a class
2292# declaration. Also affects class constructors/destructors.
2293#
2294# Overrides nl_after_func_body.
2295nl_after_func_body_class = 2 # unsigned number
2296
2297# The number of newlines after '}' of a single line function body. Also
2298# affects class constructors/destructors.
2299#
2300# Overrides nl_after_func_body and nl_after_func_body_class.
2301nl_after_func_body_one_liner = 2 # unsigned number
2302
Radek Krejcia198c962020-08-16 10:32:10 +02002303# The number of newlines before a block of typedefs. If nl_after_access_spec
2304# is non-zero, that option takes precedence.
2305#
2306# 0: No change (default).
Michal Vasko69730152020-10-09 16:30:07 +02002307nl_typedef_blk_start = 1 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02002308
2309# The number of newlines after a block of typedefs.
2310#
2311# 0: No change (default).
Michal Vasko69730152020-10-09 16:30:07 +02002312nl_typedef_blk_end = 1 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02002313
2314# The maximum number of consecutive newlines within a block of typedefs.
2315#
2316# 0: No change (default).
2317nl_typedef_blk_in = 0 # unsigned number
2318
Michal Vasko2bf4af42023-01-04 12:08:38 +01002319# The minimum number of blank lines after a block of variable definitions
2320# at the top of a function body. If any preprocessor directives appear
2321# between the opening brace of the function and the variable block, then
2322# it is considered as not at the top of the function.Newlines are added
2323# before trailing preprocessor directives, if any exist.
2324#
2325# 0: No change (default).
2326nl_var_def_blk_end_func_top = 1 # unsigned number
2327
Radek Krejcia198c962020-08-16 10:32:10 +02002328# The number of newlines before a block of variable definitions not at the top
2329# of a function body. If nl_after_access_spec is non-zero, that option takes
2330# precedence.
2331#
2332# 0: No change (default).
2333nl_var_def_blk_start = 0 # unsigned number
2334
2335# The number of newlines after a block of variable definitions not at the top
2336# of a function body.
2337#
2338# 0: No change (default).
Michal Vasko69730152020-10-09 16:30:07 +02002339nl_var_def_blk_end = 1 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02002340
2341# The maximum number of consecutive newlines within a block of variable
2342# definitions.
2343#
2344# 0: No change (default).
2345nl_var_def_blk_in = 0 # unsigned number
2346
2347# The minimum number of newlines before a multi-line comment.
2348# Doesn't apply if after a brace open or another multi-line comment.
2349nl_before_block_comment = 0 # unsigned number
2350
2351# The minimum number of newlines before a single-line C comment.
2352# Doesn't apply if after a brace open or other single-line C comments.
2353nl_before_c_comment = 0 # unsigned number
2354
2355# The minimum number of newlines before a CPP comment.
2356# Doesn't apply if after a brace open or other CPP comments.
2357nl_before_cpp_comment = 0 # unsigned number
2358
2359# Whether to force a newline after a multi-line comment.
2360nl_after_multiline_comment = false # true/false
2361
2362# Whether to force a newline after a label's colon.
Michal Vasko69730152020-10-09 16:30:07 +02002363nl_after_label_colon = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002364
Michal Vasko26bbb272022-08-02 14:54:33 +02002365# The number of newlines before a struct definition.
2366nl_before_struct = 1 # unsigned number
2367
Radek Krejcia198c962020-08-16 10:32:10 +02002368# The number of newlines after '}' or ';' of a struct/enum/union definition.
2369nl_after_struct = 1 # unsigned number
2370
2371# The number of newlines before a class definition.
2372nl_before_class = 0 # unsigned number
2373
2374# The number of newlines after '}' or ';' of a class definition.
2375nl_after_class = 0 # unsigned number
2376
2377# The number of newlines before a namespace.
2378nl_before_namespace = 0 # unsigned number
2379
2380# The number of newlines after '{' of a namespace. This also adds newlines
2381# before the matching '}'.
2382#
2383# 0: Apply eat_blanks_after_open_brace or eat_blanks_before_close_brace if
2384# applicable, otherwise no change.
2385#
2386# Overrides eat_blanks_after_open_brace and eat_blanks_before_close_brace.
2387nl_inside_namespace = 0 # unsigned number
2388
2389# The number of newlines after '}' of a namespace.
2390nl_after_namespace = 0 # unsigned number
2391
2392# The number of newlines before an access specifier label. This also includes
2393# the Qt-specific 'signals:' and 'slots:'. Will not change the newline count
2394# if after a brace open.
2395#
2396# 0: No change (default).
2397nl_before_access_spec = 0 # unsigned number
2398
2399# The number of newlines after an access specifier label. This also includes
2400# the Qt-specific 'signals:' and 'slots:'. Will not change the newline count
2401# if after a brace open.
2402#
2403# 0: No change (default).
2404#
2405# Overrides nl_typedef_blk_start and nl_var_def_blk_start.
2406nl_after_access_spec = 0 # unsigned number
2407
2408# The number of newlines between a function definition and the function
2409# comment, as in '// comment\n <here> void foo() {...}'.
2410#
2411# 0: No change (default).
2412nl_comment_func_def = 0 # unsigned number
2413
2414# The number of newlines after a try-catch-finally block that isn't followed
2415# by a brace close.
2416#
2417# 0: No change (default).
2418nl_after_try_catch_finally = 0 # unsigned number
2419
2420# (C#) The number of newlines before and after a property, indexer or event
2421# declaration.
2422#
2423# 0: No change (default).
2424nl_around_cs_property = 0 # unsigned number
2425
2426# (C#) The number of newlines between the get/set/add/remove handlers.
2427#
2428# 0: No change (default).
2429nl_between_get_set = 0 # unsigned number
2430
2431# (C#) Add or remove newline between property and the '{'.
2432nl_property_brace = ignore # ignore/add/remove/force
2433
2434# Whether to remove blank lines after '{'.
2435eat_blanks_after_open_brace = false # true/false
2436
2437# Whether to remove blank lines before '}'.
2438eat_blanks_before_close_brace = false # true/false
2439
2440# How aggressively to remove extra newlines not in preprocessor.
2441#
2442# 0: No change (default)
2443# 1: Remove most newlines not handled by other config
2444# 2: Remove all newlines and reformat completely by config
2445nl_remove_extra_newlines = 0 # unsigned number
2446
2447# (Java) Add or remove newline after an annotation statement. Only affects
2448# annotations that are after a newline.
2449nl_after_annotation = ignore # ignore/add/remove/force
2450
2451# (Java) Add or remove newline between two annotations.
2452nl_between_annotation = ignore # ignore/add/remove/force
2453
2454# The number of newlines before a whole-file #ifdef.
2455#
2456# 0: No change (default).
Michal Vasko69730152020-10-09 16:30:07 +02002457nl_before_whole_file_ifdef = 2 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02002458
2459# The number of newlines after a whole-file #ifdef.
2460#
2461# 0: No change (default).
2462nl_after_whole_file_ifdef = 0 # unsigned number
2463
2464# The number of newlines before a whole-file #endif.
2465#
2466# 0: No change (default).
Michal Vasko69730152020-10-09 16:30:07 +02002467nl_before_whole_file_endif = 2 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02002468
2469# The number of newlines after a whole-file #endif.
2470#
2471# 0: No change (default).
Michal Vasko69730152020-10-09 16:30:07 +02002472nl_after_whole_file_endif = 2 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02002473
2474#
2475# Positioning options
2476#
2477
2478# The position of arithmetic operators in wrapped expressions.
Michal Vasko69730152020-10-09 16:30:07 +02002479pos_arith = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
Radek Krejcia198c962020-08-16 10:32:10 +02002480
2481# The position of assignment in wrapped expressions. Do not affect '='
2482# followed by '{'.
Michal Vasko69730152020-10-09 16:30:07 +02002483pos_assign = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
Radek Krejcia198c962020-08-16 10:32:10 +02002484
2485# The position of Boolean operators in wrapped expressions.
Michal Vasko69730152020-10-09 16:30:07 +02002486pos_bool = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
Radek Krejcia198c962020-08-16 10:32:10 +02002487
2488# The position of comparison operators in wrapped expressions.
Michal Vasko69730152020-10-09 16:30:07 +02002489pos_compare = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
Radek Krejcia198c962020-08-16 10:32:10 +02002490
2491# The position of conditional operators, as in the '?' and ':' of
2492# 'expr ? stmt : stmt', in wrapped expressions.
Michal Vasko69730152020-10-09 16:30:07 +02002493pos_conditional = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
Radek Krejcia198c962020-08-16 10:32:10 +02002494
2495# The position of the comma in wrapped expressions.
Michal Vasko69730152020-10-09 16:30:07 +02002496pos_comma = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
Radek Krejcia198c962020-08-16 10:32:10 +02002497
2498# The position of the comma in enum entries.
Michal Vasko69730152020-10-09 16:30:07 +02002499pos_enum_comma = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
Radek Krejcia198c962020-08-16 10:32:10 +02002500
2501# The position of the comma in the base class list if there is more than one
2502# line. Affects nl_class_init_args.
2503pos_class_comma = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
2504
2505# The position of the comma in the constructor initialization list.
2506# Related to nl_constr_colon, nl_constr_init_args and pos_constr_colon.
2507pos_constr_comma = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
2508
2509# The position of trailing/leading class colon, between class and base class
2510# list. Affects nl_class_colon.
2511pos_class_colon = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
2512
2513# The position of colons between constructor and member initialization.
2514# Related to nl_constr_colon, nl_constr_init_args and pos_constr_comma.
2515pos_constr_colon = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
2516
Michal Vasko26bbb272022-08-02 14:54:33 +02002517# The position of shift operators in wrapped expressions.
2518pos_shift = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force
2519
Radek Krejcia198c962020-08-16 10:32:10 +02002520#
2521# Line splitting options
2522#
2523
2524# Try to limit code width to N columns.
2525code_width = 256 # unsigned number
2526
2527# Whether to fully split long 'for' statements at semi-colons.
2528ls_for_split_full = true # true/false
2529
2530# Whether to fully split long function prototypes/calls at commas.
2531# The option ls_code_width has priority over the option ls_func_split_full.
2532ls_func_split_full = false # true/false
2533
2534# Whether to split lines as close to code_width as possible and ignore some
2535# groupings.
2536# The option ls_code_width has priority over the option ls_func_split_full.
2537ls_code_width = false # true/false
2538
2539#
2540# Code alignment options (not left column spaces/tabs)
2541#
2542
2543# Whether to keep non-indenting tabs.
2544align_keep_tabs = false # true/false
2545
2546# Whether to use tabs for aligning.
2547align_with_tabs = false # true/false
2548
2549# Whether to bump out to the next tab when aligning.
2550align_on_tabstop = true # true/false
2551
2552# Whether to right-align numbers.
2553align_number_right = true # true/false
2554
2555# Whether to keep whitespace not required for alignment.
2556align_keep_extra_space = false # true/false
2557
2558# Whether to align variable definitions in prototypes and functions.
Michal Vasko69730152020-10-09 16:30:07 +02002559align_func_params = false # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002560
2561# The span for aligning parameter definitions in function on parameter name.
2562#
2563# 0: Don't align (default).
Michal Vasko69730152020-10-09 16:30:07 +02002564align_func_params_span = 0 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02002565
2566# The threshold for aligning function parameter definitions.
2567# Use a negative number for absolute thresholds.
2568#
2569# 0: No limit (default).
2570align_func_params_thresh = 0 # number
2571
2572# The gap for aligning function parameter definitions.
2573align_func_params_gap = 1 # unsigned number
2574
2575# The span for aligning constructor value.
2576#
2577# 0: Don't align (default).
2578align_constr_value_span = 0 # unsigned number
2579
2580# The threshold for aligning constructor value.
2581# Use a negative number for absolute thresholds.
2582#
2583# 0: No limit (default).
2584align_constr_value_thresh = 0 # number
2585
2586# The gap for aligning constructor value.
2587align_constr_value_gap = 0 # unsigned number
2588
2589# Whether to align parameters in single-line functions that have the same
2590# name. The function names must already be aligned with each other.
2591align_same_func_call_params = false # true/false
2592
2593# The span for aligning function-call parameters for single line functions.
2594#
2595# 0: Don't align (default).
2596align_same_func_call_params_span = 1 # unsigned number
2597
2598# The threshold for aligning function-call parameters for single line
2599# functions.
2600# Use a negative number for absolute thresholds.
2601#
2602# 0: No limit (default).
2603align_same_func_call_params_thresh = 0 # number
2604
2605# The span for aligning variable definitions.
2606#
2607# 0: Don't align (default).
2608align_var_def_span = 0 # unsigned number
2609
2610# How to consider (or treat) the '*' in the alignment of variable definitions.
2611#
2612# 0: Part of the type 'void * foo;' (default)
2613# 1: Part of the variable 'void *foo;'
2614# 2: Dangling 'void *foo;'
2615# Dangling: the '*' will not be taken into account when aligning.
2616align_var_def_star_style = 1 # unsigned number
2617
2618# How to consider (or treat) the '&' in the alignment of variable definitions.
2619#
2620# 0: Part of the type 'long & foo;' (default)
2621# 1: Part of the variable 'long &foo;'
2622# 2: Dangling 'long &foo;'
2623# Dangling: the '&' will not be taken into account when aligning.
2624align_var_def_amp_style = 1 # unsigned number
2625
2626# The threshold for aligning variable definitions.
2627# Use a negative number for absolute thresholds.
2628#
2629# 0: No limit (default).
2630align_var_def_thresh = 0 # number
2631
2632# The gap for aligning variable definitions.
2633align_var_def_gap = 0 # unsigned number
2634
2635# Whether to align the colon in struct bit fields.
2636align_var_def_colon = false # true/false
2637
2638# The gap for aligning the colon in struct bit fields.
2639align_var_def_colon_gap = 0 # unsigned number
2640
2641# Whether to align any attribute after the variable name.
2642align_var_def_attribute = false # true/false
2643
2644# Whether to align inline struct/enum/union variable definitions.
Michal Vasko26bbb272022-08-02 14:54:33 +02002645align_var_def_inline = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002646
2647# The span for aligning on '=' in assignments.
2648#
2649# 0: Don't align (default).
2650align_assign_span = 0 # unsigned number
2651
Michal Vasko26bbb272022-08-02 14:54:33 +02002652# The span for aligning on '{' in braced init list.
2653#
2654# 0: Don't align (default).
2655align_braced_init_list_span = 0 # unsigned number
2656
Radek Krejcia198c962020-08-16 10:32:10 +02002657# The span for aligning on '=' in function prototype modifier.
2658#
2659# 0: Don't align (default).
2660align_assign_func_proto_span = 0 # unsigned number
2661
2662# The threshold for aligning on '=' in assignments.
2663# Use a negative number for absolute thresholds.
2664#
2665# 0: No limit (default).
2666align_assign_thresh = 0 # number
2667
Michal Vasko26bbb272022-08-02 14:54:33 +02002668# Whether to align on the left most assignment when multiple
2669# definitions are found on the same line.
2670# Depends on 'align_assign_span' and 'align_assign_thresh' settings.
2671align_assign_on_multi_var_defs = false # true/false
2672
2673# The threshold for aligning on '{' in braced init list.
2674# Use a negative number for absolute thresholds.
2675#
2676# 0: No limit (default).
2677align_braced_init_list_thresh = 0 # number
2678
Radek Krejcia198c962020-08-16 10:32:10 +02002679# How to apply align_assign_span to function declaration "assignments", i.e.
2680# 'virtual void foo() = 0' or '~foo() = {default|delete}'.
2681#
2682# 0: Align with other assignments (default)
2683# 1: Align with each other, ignoring regular assignments
2684# 2: Don't align
2685align_assign_decl_func = 0 # unsigned number
2686
2687# The span for aligning on '=' in enums.
2688#
2689# 0: Don't align (default).
2690align_enum_equ_span = 0 # unsigned number
2691
2692# The threshold for aligning on '=' in enums.
2693# Use a negative number for absolute thresholds.
2694#
2695# 0: no limit (default).
2696align_enum_equ_thresh = 0 # number
2697
2698# The span for aligning class member definitions.
2699#
2700# 0: Don't align (default).
2701align_var_class_span = 0 # unsigned number
2702
2703# The threshold for aligning class member definitions.
2704# Use a negative number for absolute thresholds.
2705#
2706# 0: No limit (default).
2707align_var_class_thresh = 0 # number
2708
2709# The gap for aligning class member definitions.
2710align_var_class_gap = 0 # unsigned number
2711
2712# The span for aligning struct/union member definitions.
2713#
2714# 0: Don't align (default).
2715align_var_struct_span = 0 # unsigned number
2716
2717# The threshold for aligning struct/union member definitions.
2718# Use a negative number for absolute thresholds.
2719#
2720# 0: No limit (default).
2721align_var_struct_thresh = 0 # number
2722
2723# The gap for aligning struct/union member definitions.
2724align_var_struct_gap = 0 # unsigned number
2725
2726# The span for aligning struct initializer values.
2727#
2728# 0: Don't align (default).
2729align_struct_init_span = 0 # unsigned number
2730
2731# The span for aligning single-line typedefs.
2732#
2733# 0: Don't align (default).
2734align_typedef_span = 0 # unsigned number
2735
2736# The minimum space between the type and the synonym of a typedef.
2737align_typedef_gap = 1 # unsigned number
2738
2739# How to align typedef'd functions with other typedefs.
2740#
2741# 0: Don't mix them at all (default)
2742# 1: Align the open parenthesis with the types
2743# 2: Align the function type name with the other type names
2744align_typedef_func = 0 # unsigned number
2745
2746# How to consider (or treat) the '*' in the alignment of typedefs.
2747#
2748# 0: Part of the typedef type, 'typedef int * pint;' (default)
2749# 1: Part of type name: 'typedef int *pint;'
2750# 2: Dangling: 'typedef int *pint;'
2751# Dangling: the '*' will not be taken into account when aligning.
2752align_typedef_star_style = 1 # unsigned number
2753
2754# How to consider (or treat) the '&' in the alignment of typedefs.
2755#
2756# 0: Part of the typedef type, 'typedef int & intref;' (default)
2757# 1: Part of type name: 'typedef int &intref;'
2758# 2: Dangling: 'typedef int &intref;'
2759# Dangling: the '&' will not be taken into account when aligning.
2760align_typedef_amp_style = 1 # unsigned number
2761
2762# The span for aligning comments that end lines.
2763#
2764# 0: Don't align (default).
2765align_right_cmt_span = 0 # unsigned number
2766
2767# Minimum number of columns between preceding text and a trailing comment in
2768# order for the comment to qualify for being aligned. Must be non-zero to have
2769# an effect.
2770align_right_cmt_gap = 0 # unsigned number
2771
2772# If aligning comments, whether to mix with comments after '}' and #endif with
2773# less than three spaces before the comment.
2774align_right_cmt_mix = false # true/false
2775
2776# Whether to only align trailing comments that are at the same brace level.
2777align_right_cmt_same_level = false # true/false
2778
2779# Minimum column at which to align trailing comments. Comments which are
2780# aligned beyond this column, but which can be aligned in a lesser column,
2781# may be "pulled in".
2782#
2783# 0: Ignore (default).
2784align_right_cmt_at_col = 0 # unsigned number
2785
2786# The span for aligning function prototypes.
2787#
2788# 0: Don't align (default).
2789align_func_proto_span = 0 # unsigned number
2790
Michal Vasko26bbb272022-08-02 14:54:33 +02002791# How to consider (or treat) the '*' in the alignment of function prototypes.
2792#
2793# 0: Part of the type 'void * foo();' (default)
2794# 1: Part of the function 'void *foo();'
2795# 2: Dangling 'void *foo();'
2796# Dangling: the '*' will not be taken into account when aligning.
2797align_func_proto_star_style = 0 # unsigned number
2798
2799# How to consider (or treat) the '&' in the alignment of function prototypes.
2800#
2801# 0: Part of the type 'long & foo();' (default)
2802# 1: Part of the function 'long &foo();'
2803# 2: Dangling 'long &foo();'
2804# Dangling: the '&' will not be taken into account when aligning.
2805align_func_proto_amp_style = 0 # unsigned number
2806
Radek Krejcia198c962020-08-16 10:32:10 +02002807# The threshold for aligning function prototypes.
2808# Use a negative number for absolute thresholds.
2809#
2810# 0: No limit (default).
2811align_func_proto_thresh = 0 # number
2812
2813# Minimum gap between the return type and the function name.
2814align_func_proto_gap = 1 # unsigned number
2815
2816# Whether to align function prototypes on the 'operator' keyword instead of
2817# what follows.
2818align_on_operator = false # true/false
2819
2820# Whether to mix aligning prototype and variable declarations. If true,
2821# align_var_def_XXX options are used instead of align_func_proto_XXX options.
2822align_mix_var_proto = false # true/false
2823
2824# Whether to align single-line functions with function prototypes.
2825# Uses align_func_proto_span.
Michal Vasko69730152020-10-09 16:30:07 +02002826align_single_line_func = false # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002827
2828# Whether to align the open brace of single-line functions.
2829# Requires align_single_line_func=true. Uses align_func_proto_span.
Michal Vasko69730152020-10-09 16:30:07 +02002830align_single_line_brace = false # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02002831
2832# Gap for align_single_line_brace.
2833align_single_line_brace_gap = 1 # unsigned number
2834
2835# (OC) The span for aligning Objective-C message specifications.
2836#
2837# 0: Don't align (default).
2838align_oc_msg_spec_span = 0 # unsigned number
2839
Michal Vasko84bf6f42023-05-19 11:09:48 +02002840# 0: Do nothing (default)
2841# 1: Align the backslashes in the column at the end of the longest line
2842# 2: Align with the backslash that is farthest to the left, or, if that
2843# backslash is farther left than the end of the longest line, at the end of
2844# the longest line
2845# 3: Align with the backslash that is farthest to the right
2846align_nl_cont = 0 # unsigned number
2847
2848# The minimum number of spaces between the end of a line and its continuation
2849# backslash. Requires align_nl_cont.
2850#
2851# Default: 1
2852align_nl_cont_spaces = 1 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02002853
2854# Whether to align macro functions and variables together.
2855align_pp_define_together = false # true/false
2856
2857# The span for aligning on '#define' bodies.
2858#
2859# =0: Don't align (default)
2860# >0: Number of lines (including comments) between blocks
2861align_pp_define_span = 0 # unsigned number
2862
2863# The minimum space between label and value of a preprocessor define.
2864align_pp_define_gap = 1 # unsigned number
2865
2866# Whether to align lines that start with '<<' with previous '<<'.
2867#
2868# Default: true
2869align_left_shift = false # true/false
2870
Michal Vasko26bbb272022-08-02 14:54:33 +02002871# Whether to align comma-separated statements following '<<' (as used to
2872# initialize Eigen matrices).
2873align_eigen_comma_init = false # true/false
2874
Radek Krejcia198c962020-08-16 10:32:10 +02002875# Whether to align text after 'asm volatile ()' colons.
2876align_asm_colon = false # true/false
2877
2878# (OC) Span for aligning parameters in an Objective-C message call
2879# on the ':'.
2880#
2881# 0: Don't align.
2882align_oc_msg_colon_span = 0 # unsigned number
2883
2884# (OC) Whether to always align with the first parameter, even if it is too
2885# short.
2886align_oc_msg_colon_first = false # true/false
2887
2888# (OC) Whether to align parameters in an Objective-C '+' or '-' declaration
2889# on the ':'.
2890align_oc_decl_colon = false # true/false
2891
2892# (OC) Whether to not align parameters in an Objectve-C message call if first
2893# colon is not on next line of the message call (the same way Xcode does
2894# aligment)
2895align_oc_msg_colon_xcode_like = false # true/false
2896
2897#
2898# Comment modification options
2899#
2900
2901# Try to wrap comments at N columns.
2902cmt_width = 256 # unsigned number
2903
2904# How to reflow comments.
2905#
2906# 0: No reflowing (apart from the line wrapping due to cmt_width) (default)
2907# 1: No touching at all
2908# 2: Full reflow
2909cmt_reflow_mode = 1 # unsigned number
2910
Michal Vasko26bbb272022-08-02 14:54:33 +02002911# Path to a file that contains regular expressions describing patterns for
2912# which the end of one line and the beginning of the next will be folded into
2913# the same sentence or paragraph during full comment reflow. The regular
2914# expressions are described using ECMAScript syntax. The syntax for this
2915# specification is as follows, where "..." indicates the custom regular
2916# expression and "n" indicates the nth end_of_prev_line_regex and
2917# beg_of_next_line_regex regular expression pair:
2918#
2919# end_of_prev_line_regex[1] = "...$"
2920# beg_of_next_line_regex[1] = "^..."
2921# end_of_prev_line_regex[2] = "...$"
2922# beg_of_next_line_regex[2] = "^..."
2923# .
2924# .
2925# .
2926# end_of_prev_line_regex[n] = "...$"
2927# beg_of_next_line_regex[n] = "^..."
2928#
2929# Note that use of this option overrides the default reflow fold regular
2930# expressions, which are internally defined as follows:
2931#
2932# end_of_prev_line_regex[1] = "[\w,\]\)]$"
2933# beg_of_next_line_regex[1] = "^[\w,\[\(]"
2934# end_of_prev_line_regex[2] = "\.$"
2935# beg_of_next_line_regex[2] = "^[A-Z]"
2936cmt_reflow_fold_regex_file = "" # string
2937
2938# Whether to indent wrapped lines to the start of the encompassing paragraph
2939# during full comment reflow (cmt_reflow_mode = 2). Overrides the value
2940# specified by cmt_sp_after_star_cont.
2941#
2942# Note that cmt_align_doxygen_javadoc_tags overrides this option for
2943# paragraphs associated with javadoc tags
2944cmt_reflow_indent_to_paragraph_start = false # true/false
2945
Radek Krejcia198c962020-08-16 10:32:10 +02002946# Whether to convert all tabs to spaces in comments. If false, tabs in
2947# comments are left alone, unless used for indenting.
2948cmt_convert_tab_to_spaces = false # true/false
2949
2950# Whether to apply changes to multi-line comments, including cmt_width,
2951# keyword substitution and leading chars.
2952#
2953# Default: true
2954cmt_indent_multi = false # true/false
2955
Michal Vasko26bbb272022-08-02 14:54:33 +02002956# Whether to align doxygen javadoc-style tags ('@param', '@return', etc.)
2957# and corresponding fields such that groups of consecutive block tags,
2958# parameter names, and descriptions align with one another. Overrides that
2959# which is specified by the cmt_sp_after_star_cont. If cmt_width > 0, it may
2960# be necessary to enable cmt_indent_multi and set cmt_reflow_mode = 2
2961# in order to achieve the desired alignment for line-wrapping.
2962cmt_align_doxygen_javadoc_tags = false # true/false
2963
2964# The number of spaces to insert after the star and before doxygen
2965# javadoc-style tags (@param, @return, etc). Requires enabling
2966# cmt_align_doxygen_javadoc_tags. Overrides that which is specified by the
2967# cmt_sp_after_star_cont.
2968#
2969# Default: 1
2970cmt_sp_before_doxygen_javadoc_tags = 1 # unsigned number
2971
2972# Whether to change trailing, single-line c-comments into cpp-comments.
2973cmt_trailing_single_line_c_to_cpp = false # true/false
2974
Radek Krejcia198c962020-08-16 10:32:10 +02002975# Whether to group c-comments that look like they are in a block.
2976cmt_c_group = false # true/false
2977
2978# Whether to put an empty '/*' on the first line of the combined c-comment.
2979cmt_c_nl_start = false # true/false
2980
2981# Whether to add a newline before the closing '*/' of the combined c-comment.
2982cmt_c_nl_end = false # true/false
2983
2984# Whether to change cpp-comments into c-comments.
2985cmt_cpp_to_c = false # true/false
2986
2987# Whether to group cpp-comments that look like they are in a block. Only
2988# meaningful if cmt_cpp_to_c=true.
2989cmt_cpp_group = false # true/false
2990
2991# Whether to put an empty '/*' on the first line of the combined cpp-comment
2992# when converting to a c-comment.
2993#
2994# Requires cmt_cpp_to_c=true and cmt_cpp_group=true.
2995cmt_cpp_nl_start = false # true/false
2996
2997# Whether to add a newline before the closing '*/' of the combined cpp-comment
2998# when converting to a c-comment.
2999#
3000# Requires cmt_cpp_to_c=true and cmt_cpp_group=true.
3001cmt_cpp_nl_end = false # true/false
3002
3003# Whether to put a star on subsequent comment lines.
3004cmt_star_cont = false # true/false
3005
3006# The number of spaces to insert at the start of subsequent comment lines.
3007cmt_sp_before_star_cont = 0 # unsigned number
3008
3009# The number of spaces to insert after the star on subsequent comment lines.
3010cmt_sp_after_star_cont = 3 # unsigned number
3011
3012# For multi-line comments with a '*' lead, remove leading spaces if the first
3013# and last lines of the comment are the same length.
3014#
3015# Default: true
3016cmt_multi_check_last = false # true/false
3017
3018# For multi-line comments with a '*' lead, remove leading spaces if the first
3019# and last lines of the comment are the same length AND if the length is
3020# bigger as the first_len minimum.
3021#
3022# Default: 4
3023cmt_multi_first_len_minimum = 4 # unsigned number
3024
3025# Path to a file that contains text to insert at the beginning of a file if
3026# the file doesn't start with a C/C++ comment. If the inserted text contains
3027# '$(filename)', that will be replaced with the current file's name.
3028cmt_insert_file_header = "" # string
3029
3030# Path to a file that contains text to insert at the end of a file if the
3031# file doesn't end with a C/C++ comment. If the inserted text contains
3032# '$(filename)', that will be replaced with the current file's name.
3033cmt_insert_file_footer = "" # string
3034
3035# Path to a file that contains text to insert before a function definition if
3036# the function isn't preceded by a C/C++ comment. If the inserted text
3037# contains '$(function)', '$(javaparam)' or '$(fclass)', these will be
3038# replaced with, respectively, the name of the function, the javadoc '@param'
3039# and '@return' stuff, or the name of the class to which the member function
3040# belongs.
3041cmt_insert_func_header = "" # string
3042
3043# Path to a file that contains text to insert before a class if the class
3044# isn't preceded by a C/C++ comment. If the inserted text contains '$(class)',
3045# that will be replaced with the class name.
3046cmt_insert_class_header = "" # string
3047
3048# Path to a file that contains text to insert before an Objective-C message
3049# specification, if the method isn't preceded by a C/C++ comment. If the
3050# inserted text contains '$(message)' or '$(javaparam)', these will be
3051# replaced with, respectively, the name of the function, or the javadoc
3052# '@param' and '@return' stuff.
3053cmt_insert_oc_msg_header = "" # string
3054
3055# Whether a comment should be inserted if a preprocessor is encountered when
3056# stepping backwards from a function name.
3057#
3058# Applies to cmt_insert_oc_msg_header, cmt_insert_func_header and
3059# cmt_insert_class_header.
3060cmt_insert_before_preproc = false # true/false
3061
3062# Whether a comment should be inserted if a function is declared inline to a
3063# class definition.
3064#
3065# Applies to cmt_insert_func_header.
3066#
3067# Default: true
3068cmt_insert_before_inlines = false # true/false
3069
3070# Whether a comment should be inserted if the function is a class constructor
3071# or destructor.
3072#
3073# Applies to cmt_insert_func_header.
3074cmt_insert_before_ctor_dtor = false # true/false
3075
3076#
3077# Code modifying options (non-whitespace)
3078#
3079
3080# Add or remove braces on a single-line 'do' statement.
Michal Vasko69730152020-10-09 16:30:07 +02003081mod_full_brace_do = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02003082
3083# Add or remove braces on a single-line 'for' statement.
Michal Vasko69730152020-10-09 16:30:07 +02003084mod_full_brace_for = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02003085
3086# (Pawn) Add or remove braces on a single-line function definition.
Michal Vasko69730152020-10-09 16:30:07 +02003087mod_full_brace_function = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02003088
3089# Add or remove braces on a single-line 'if' statement. Braces will not be
3090# removed if the braced statement contains an 'else'.
Michal Vasko69730152020-10-09 16:30:07 +02003091mod_full_brace_if = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02003092
3093# Whether to enforce that all blocks of an 'if'/'else if'/'else' chain either
Michal Vasko26bbb272022-08-02 14:54:33 +02003094# have, or do not have, braces. Overrides mod_full_brace_if.
Radek Krejcia198c962020-08-16 10:32:10 +02003095#
Michal Vasko26bbb272022-08-02 14:54:33 +02003096# 0: Don't override mod_full_brace_if
3097# 1: Add braces to all blocks if any block needs braces and remove braces if
3098# they can be removed from all blocks
3099# 2: Add braces to all blocks if any block already has braces, regardless of
3100# whether it needs them
3101# 3: Add braces to all blocks if any block needs braces and remove braces if
3102# they can be removed from all blocks, except if all blocks have braces
3103# despite none needing them
3104mod_full_brace_if_chain = 0 # unsigned number
Radek Krejcia198c962020-08-16 10:32:10 +02003105
3106# Whether to add braces to all blocks of an 'if'/'else if'/'else' chain.
3107# If true, mod_full_brace_if_chain will only remove braces from an 'if' that
3108# does not have an 'else if' or 'else'.
Michal Vasko69730152020-10-09 16:30:07 +02003109mod_full_brace_if_chain_only = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003110
3111# Add or remove braces on single-line 'while' statement.
Michal Vasko69730152020-10-09 16:30:07 +02003112mod_full_brace_while = force # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02003113
3114# Add or remove braces on single-line 'using ()' statement.
3115mod_full_brace_using = ignore # ignore/add/remove/force
3116
3117# Don't remove braces around statements that span N newlines
3118mod_full_brace_nl = 0 # unsigned number
3119
3120# Whether to prevent removal of braces from 'if'/'for'/'while'/etc. blocks
3121# which span multiple lines.
3122#
3123# Affects:
3124# mod_full_brace_for
3125# mod_full_brace_if
3126# mod_full_brace_if_chain
3127# mod_full_brace_if_chain_only
3128# mod_full_brace_while
3129# mod_full_brace_using
3130#
3131# Does not affect:
3132# mod_full_brace_do
3133# mod_full_brace_function
3134mod_full_brace_nl_block_rem_mlcond = false # true/false
3135
3136# Add or remove unnecessary parenthesis on 'return' statement.
Michal Vasko69730152020-10-09 16:30:07 +02003137mod_paren_on_return = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02003138
Michal Vasko2bf4af42023-01-04 12:08:38 +01003139# Add or remove unnecessary parentheses on 'throw' statement.
3140mod_paren_on_throw = ignore # ignore/add/remove/force/not_defined
3141
Radek Krejcia198c962020-08-16 10:32:10 +02003142# (Pawn) Whether to change optional semicolons to real semicolons.
3143mod_pawn_semicolon = false # true/false
3144
3145# Whether to fully parenthesize Boolean expressions in 'while' and 'if'
3146# statement, as in 'if (a && b > c)' => 'if (a && (b > c))'.
Michal Vasko69730152020-10-09 16:30:07 +02003147mod_full_paren_if_bool = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003148
Michal Vasko26bbb272022-08-02 14:54:33 +02003149# Whether to fully parenthesize Boolean expressions after '='
3150# statement, as in 'x = a && b > c;' => 'x = (a && (b > c));'.
3151mod_full_paren_assign_bool = false # true/false
3152
3153# Whether to fully parenthesize Boolean expressions after '='
3154# statement, as in 'return a && b > c;' => 'return (a && (b > c));'.
3155mod_full_paren_return_bool = false # true/false
3156
Radek Krejcia198c962020-08-16 10:32:10 +02003157# Whether to remove superfluous semicolons.
Michal Vasko69730152020-10-09 16:30:07 +02003158mod_remove_extra_semicolon = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003159
Michal Vasko26bbb272022-08-02 14:54:33 +02003160# Whether to remove duplicate include.
3161mod_remove_duplicate_include = true # true/false
3162
Michal Vasko84bf6f42023-05-19 11:09:48 +02003163# the following options (mod_XX_closebrace_comment) use different comment,
3164# depending of the setting of the next option.
3165# false: Use the c comment (default)
3166# true : Use the cpp comment
3167mod_add_force_c_closebrace_comment = false # true/false
3168
Radek Krejcia198c962020-08-16 10:32:10 +02003169# If a function body exceeds the specified number of newlines and doesn't have
3170# a comment after the close brace, a comment will be added.
3171mod_add_long_function_closebrace_comment = 0 # unsigned number
3172
3173# If a namespace body exceeds the specified number of newlines and doesn't
3174# have a comment after the close brace, a comment will be added.
3175mod_add_long_namespace_closebrace_comment = 0 # unsigned number
3176
3177# If a class body exceeds the specified number of newlines and doesn't have a
3178# comment after the close brace, a comment will be added.
3179mod_add_long_class_closebrace_comment = 0 # unsigned number
3180
3181# If a switch body exceeds the specified number of newlines and doesn't have a
3182# comment after the close brace, a comment will be added.
3183mod_add_long_switch_closebrace_comment = 0 # unsigned number
3184
3185# If an #ifdef body exceeds the specified number of newlines and doesn't have
3186# a comment after the #endif, a comment will be added.
3187mod_add_long_ifdef_endif_comment = 0 # unsigned number
3188
3189# If an #ifdef or #else body exceeds the specified number of newlines and
3190# doesn't have a comment after the #else, a comment will be added.
3191mod_add_long_ifdef_else_comment = 0 # unsigned number
3192
3193# Whether to take care of the case by the mod_sort_xx options.
3194mod_sort_case_sensitive = false # true/false
3195
3196# Whether to sort consecutive single-line 'import' statements.
3197mod_sort_import = false # true/false
3198
3199# (C#) Whether to sort consecutive single-line 'using' statements.
3200mod_sort_using = false # true/false
3201
3202# Whether to sort consecutive single-line '#include' statements (C/C++) and
3203# '#import' statements (Objective-C). Be aware that this has the potential to
3204# break your code if your includes/imports have ordering dependencies.
Michal Vasko69730152020-10-09 16:30:07 +02003205mod_sort_include = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003206
3207# Whether to prioritize '#include' and '#import' statements that contain
3208# filename without extension when sorting is enabled.
3209mod_sort_incl_import_prioritize_filename = false # true/false
3210
3211# Whether to prioritize '#include' and '#import' statements that does not
3212# contain extensions when sorting is enabled.
3213mod_sort_incl_import_prioritize_extensionless = false # true/false
3214
3215# Whether to prioritize '#include' and '#import' statements that contain
3216# angle over quotes when sorting is enabled.
3217mod_sort_incl_import_prioritize_angle_over_quotes = true # true/false
3218
3219# Whether to ignore file extension in '#include' and '#import' statements
3220# for sorting comparison.
3221mod_sort_incl_import_ignore_extension = true # true/false
3222
3223# Whether to group '#include' and '#import' statements when sorting is enabled.
3224mod_sort_incl_import_grouping_enabled = false # true/false
3225
3226# Whether to move a 'break' that appears after a fully braced 'case' before
3227# the close brace, as in 'case X: { ... } break;' => 'case X: { ... break; }'.
Michal Vasko69730152020-10-09 16:30:07 +02003228mod_move_case_break = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003229
Michal Vasko26bbb272022-08-02 14:54:33 +02003230# Whether to move a 'return' that appears after a fully braced 'case' before
3231# the close brace, as in 'case X: { ... } return;' => 'case X: { ... return; }'.
3232mod_move_case_return = true # true/false
3233
Radek Krejcia198c962020-08-16 10:32:10 +02003234# Add or remove braces around a fully braced case statement. Will only remove
3235# braces if there are no variable declarations in the block.
Michal Vasko69730152020-10-09 16:30:07 +02003236mod_case_brace = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02003237
3238# Whether to remove a void 'return;' that appears as the last statement in a
3239# function.
Michal Vasko69730152020-10-09 16:30:07 +02003240mod_remove_empty_return = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003241
3242# Add or remove the comma after the last value of an enumeration.
Michal Vasko69730152020-10-09 16:30:07 +02003243mod_enum_last_comma = remove # ignore/add/remove/force
Radek Krejcia198c962020-08-16 10:32:10 +02003244
Michal Vasko2bf4af42023-01-04 12:08:38 +01003245# Syntax to use for infinite loops.
3246#
3247# 0: Leave syntax alone (default)
3248# 1: Rewrite as `for(;;)`
3249# 2: Rewrite as `while(true)`
3250# 3: Rewrite as `do`...`while(true);`
3251# 4: Rewrite as `while(1)`
3252# 5: Rewrite as `do`...`while(1);`
3253#
3254# Infinite loops that do not already match one of these syntaxes are ignored.
3255# Other options that affect loop formatting will be applied after transforming
3256# the syntax.
3257mod_infinite_loop = 0 # unsigned number
3258
3259# Add or remove the 'int' keyword in 'int short'.
3260mod_int_short = remove # ignore/add/remove/force/not_defined
3261
3262# Add or remove the 'int' keyword in 'short int'.
3263mod_short_int = remove # ignore/add/remove/force/not_defined
3264
3265# Add or remove the 'int' keyword in 'int long'.
3266mod_int_long = remove # ignore/add/remove/force/not_defined
3267
3268# Add or remove the 'int' keyword in 'long int'.
3269mod_long_int = remove # ignore/add/remove/force/not_defined
3270
3271# Add or remove the 'int' keyword in 'int signed'.
3272mod_int_signed = ignore # ignore/add/remove/force/not_defined
3273
3274# Add or remove the 'int' keyword in 'signed int'.
3275mod_signed_int = ignore # ignore/add/remove/force/not_defined
3276
3277# Add or remove the 'int' keyword in 'int unsigned'.
3278mod_int_unsigned = ignore # ignore/add/remove/force/not_defined
3279
3280# Add or remove the 'int' keyword in 'unsigned int'.
3281mod_unsigned_int = ignore # ignore/add/remove/force/not_defined
3282
3283# If there is a situation where mod_int_* and mod_*_int would result in
3284# multiple int keywords, whether to keep the rightmost int (the default) or the
3285# leftmost int.
3286mod_int_prefer_int_on_left = false # true/false
3287
Radek Krejcia198c962020-08-16 10:32:10 +02003288# (OC) Whether to organize the properties. If true, properties will be
3289# rearranged according to the mod_sort_oc_property_*_weight factors.
3290mod_sort_oc_properties = false # true/false
3291
3292# (OC) Weight of a class property modifier.
3293mod_sort_oc_property_class_weight = 0 # number
3294
3295# (OC) Weight of 'atomic' and 'nonatomic'.
3296mod_sort_oc_property_thread_safe_weight = 0 # number
3297
3298# (OC) Weight of 'readwrite' when organizing properties.
3299mod_sort_oc_property_readwrite_weight = 0 # number
3300
3301# (OC) Weight of a reference type specifier ('retain', 'copy', 'assign',
3302# 'weak', 'strong') when organizing properties.
3303mod_sort_oc_property_reference_weight = 0 # number
3304
3305# (OC) Weight of getter type ('getter=') when organizing properties.
3306mod_sort_oc_property_getter_weight = 0 # number
3307
3308# (OC) Weight of setter type ('setter=') when organizing properties.
3309mod_sort_oc_property_setter_weight = 0 # number
3310
3311# (OC) Weight of nullability type ('nullable', 'nonnull', 'null_unspecified',
3312# 'null_resettable') when organizing properties.
3313mod_sort_oc_property_nullability_weight = 0 # number
3314
3315#
3316# Preprocessor options
3317#
3318
Michal Vasko2bf4af42023-01-04 12:08:38 +01003319# How to use tabs when indenting preprocessor code.
3320#
3321# -1: Use 'indent_with_tabs' setting (default)
3322# 0: Spaces only
3323# 1: Indent with tabs to brace level, align with spaces
3324# 2: Indent and align with tabs, using spaces when not on a tabstop
3325#
3326# Default: -1
3327pp_indent_with_tabs = 0 # number
3328
Radek Krejcia198c962020-08-16 10:32:10 +02003329# Add or remove indentation of preprocessor directives inside #if blocks
3330# at brace level 0 (file-level).
3331pp_indent = ignore # ignore/add/remove/force
3332
3333# Whether to indent #if/#else/#endif at the brace level. If false, these are
3334# indented from column 1.
3335pp_indent_at_level = false # true/false
3336
Michal Vasko26bbb272022-08-02 14:54:33 +02003337# Whether to indent #if/#else/#endif at the parenthesis level if the brace
3338# level is 0. If false, these are indented from column 1.
3339pp_indent_at_level0 = false # true/false
3340
Radek Krejcia198c962020-08-16 10:32:10 +02003341# Specifies the number of columns to indent preprocessors per level
3342# at brace level 0 (file-level). If pp_indent_at_level=false, also specifies
3343# the number of columns to indent preprocessors per level
3344# at brace level > 0 (function-level).
3345#
3346# Default: 1
3347pp_indent_count = 0 # unsigned number
3348
Michal Vasko2bf4af42023-01-04 12:08:38 +01003349# Add or remove space after # based on pp level of #if blocks.
3350pp_space_after = ignore # ignore/add/remove/force/not_defined
Radek Krejcia198c962020-08-16 10:32:10 +02003351
3352# Sets the number of spaces per level added with pp_space.
3353pp_space_count = 0 # unsigned number
3354
3355# The indent for '#region' and '#endregion' in C# and '#pragma region' in
3356# C/C++. Negative values decrease indent down to the first column.
3357pp_indent_region = 0 # number
3358
3359# Whether to indent the code between #region and #endregion.
3360pp_region_indent_code = false # true/false
3361
3362# If pp_indent_at_level=true, sets the indent for #if, #else and #endif when
3363# not at file-level. Negative values decrease indent down to the first column.
3364#
3365# =0: Indent preprocessors using output_tab_size
3366# >0: Column at which all preprocessors will be indented
3367pp_indent_if = 0 # number
3368
3369# Whether to indent the code between #if, #else and #endif.
3370pp_if_indent_code = false # true/false
3371
Michal Vasko26bbb272022-08-02 14:54:33 +02003372# Whether to indent the body of an #if that encompasses all the code in the file.
3373pp_indent_in_guard = false # true/false
3374
Radek Krejcia198c962020-08-16 10:32:10 +02003375# Whether to indent '#define' at the brace level. If false, these are
3376# indented from column 1.
3377pp_define_at_level = false # true/false
3378
Michal Vasko26bbb272022-08-02 14:54:33 +02003379# Whether to indent '#include' at the brace level.
3380pp_include_at_level = false # true/false
3381
Radek Krejcia198c962020-08-16 10:32:10 +02003382# Whether to ignore the '#define' body while formatting.
3383pp_ignore_define_body = true # true/false
3384
Michal Vasko2bf4af42023-01-04 12:08:38 +01003385# An offset value that controls the indentation of the body of a multiline #define.
3386# 'body' refers to all the lines of a multiline #define except the first line.
3387# Requires 'pp_ignore_define_body = false'.
3388#
3389# <0: Absolute column: the body indentation starts off at the specified column
3390# (ex. -3 ==> the body is indented starting from column 3)
3391# >=0: Relative to the column of the '#' of '#define'
3392# (ex. 3 ==> the body is indented starting 3 columns at the right of '#')
3393#
3394# Default: 8
3395pp_multiline_define_body_indent = 8 # number
3396
Radek Krejcia198c962020-08-16 10:32:10 +02003397# Whether to indent case statements between #if, #else, and #endif.
3398# Only applies to the indent of the preprocesser that the case statements
3399# directly inside of.
3400#
3401# Default: true
3402pp_indent_case = false # true/false
3403
3404# Whether to indent whole function definitions between #if, #else, and #endif.
3405# Only applies to the indent of the preprocesser that the function definition
3406# is directly inside of.
3407#
3408# Default: true
3409pp_indent_func_def = false # true/false
3410
3411# Whether to indent extern C blocks between #if, #else, and #endif.
3412# Only applies to the indent of the preprocesser that the extern block is
3413# directly inside of.
3414#
3415# Default: true
3416pp_indent_extern = false # true/false
3417
Michal Vasko26bbb272022-08-02 14:54:33 +02003418# How to indent braces directly inside #if, #else, and #endif.
3419# Requires pp_if_indent_code=true and only applies to the indent of the
3420# preprocesser that the braces are directly inside of.
3421# 0: No extra indent
3422# 1: Indent by one level
3423# -1: Preserve original indentation
Radek Krejcia198c962020-08-16 10:32:10 +02003424#
Michal Vasko26bbb272022-08-02 14:54:33 +02003425# Default: 1
3426pp_indent_brace = 0 # number
3427
3428# Whether to print warning messages for unbalanced #if and #else blocks.
3429# This will print a message in the following cases:
3430# - if an #ifdef block ends on a different indent level than
3431# where it started from. Example:
3432#
3433# #ifdef TEST
3434# int i;
3435# {
3436# int j;
3437# #endif
3438#
3439# - an #elif/#else block ends on a different indent level than
3440# the corresponding #ifdef block. Example:
3441#
3442# #ifdef TEST
3443# int i;
3444# #else
3445# }
3446# int j;
3447# #endif
3448pp_warn_unbalanced_if = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003449
3450#
3451# Sort includes options
3452#
3453
3454# The regex for include category with priority 0.
3455include_category_0 = "" # string
3456
3457# The regex for include category with priority 1.
3458include_category_1 = "" # string
3459
3460# The regex for include category with priority 2.
3461include_category_2 = "" # string
3462
3463#
3464# Use or Do not Use options
3465#
3466
3467# true: indent_func_call_param will be used (default)
3468# false: indent_func_call_param will NOT be used
3469#
3470# Default: true
Michal Vasko69730152020-10-09 16:30:07 +02003471use_indent_func_call_param = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003472
3473# The value of the indentation for a continuation line is calculated
3474# differently if the statement is:
3475# - a declaration: your case with QString fileName ...
3476# - an assignment: your case with pSettings = new QSettings( ...
3477#
3478# At the second case the indentation value might be used twice:
3479# - at the assignment
3480# - at the function call (if present)
3481#
3482# To prevent the double use of the indentation value, use this option with the
3483# value 'true'.
3484#
3485# true: indent_continue will be used only once
3486# false: indent_continue will be used every time (default)
Michal Vasko69730152020-10-09 16:30:07 +02003487use_indent_continue_only_once = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003488
3489# The value might be used twice:
3490# - at the assignment
3491# - at the opening brace
3492#
3493# To prevent the double use of the indentation value, use this option with the
3494# value 'true'.
3495#
3496# true: indentation will be used only once
3497# false: indentation will be used every time (default)
Michal Vasko69730152020-10-09 16:30:07 +02003498indent_cpp_lambda_only_once = true # true/false
Radek Krejcia198c962020-08-16 10:32:10 +02003499
3500# Whether sp_after_angle takes precedence over sp_inside_fparen. This was the
3501# historic behavior, but is probably not the desired behavior, so this is off
3502# by default.
3503use_sp_after_angle_always = false # true/false
3504
3505# Whether to apply special formatting for Qt SIGNAL/SLOT macros. Essentially,
3506# this tries to format these so that they match Qt's normalized form (i.e. the
3507# result of QMetaObject::normalizedSignature), which can slightly improve the
3508# performance of the QObject::connect call, rather than how they would
3509# otherwise be formatted.
3510#
3511# See options_for_QT.cpp for details.
3512#
3513# Default: true
3514use_options_overriding_for_qt_macros = false # true/false
3515
3516# If true: the form feed character is removed from the list
3517# of whitespace characters.
3518# See https://en.cppreference.com/w/cpp/string/byte/isspace
3519use_form_feed_no_more_as_whitespace_character = false # true/false
3520
3521#
3522# Warn levels - 1: error, 2: warning (default), 3: note
3523#
3524
3525# (C#) Warning is given if doing tab-to-\t replacement and we have found one
3526# in a C# verbatim string literal.
3527#
3528# Default: 2
3529warn_level_tabs_found_in_verbatim_string_literals = 2 # unsigned number
3530
3531# Limit the number of loops.
3532# Used by uncrustify.cpp to exit from infinite loop.
3533# 0: no limit.
3534debug_max_number_of_loops = 0 # number
3535
3536# Set the number of the line to protocol;
3537# Used in the function prot_the_line if the 2. parameter is zero.
3538# 0: nothing protocol.
3539debug_line_number_to_protocol = 0 # number
3540
Michal Vasko26bbb272022-08-02 14:54:33 +02003541# Set the number of second(s) before terminating formatting the current file,
3542# 0: no timeout.
3543# only for linux
3544debug_timeout = 0 # number
3545
3546# Set the number of characters to be printed if the text is too long,
3547# 0: do not truncate.
3548debug_truncate = 0 # unsigned number
3549
Michal Vasko2bf4af42023-01-04 12:08:38 +01003550# sort (or not) the tracking info.
3551#
3552# Default: true
3553debug_sort_the_tracks = true # true/false
3554
3555# decode (or not) the flags as a new line.
3556# only if the -p option is set.
3557debug_decode_the_flags = false # true/false
3558
3559# insert the number of the line at the beginning of each line
3560set_numbering_for_html_output = false # true/false
3561
Radek Krejcia198c962020-08-16 10:32:10 +02003562# Meaning of the settings:
3563# Ignore - do not do any changes
3564# Add - makes sure there is 1 or more space/brace/newline/etc
3565# Force - makes sure there is exactly 1 space/brace/newline/etc,
3566# behaves like Add in some contexts
3567# Remove - removes space/brace/newline/etc
3568#
3569#
3570# - Token(s) can be treated as specific type(s) with the 'set' option:
3571# `set tokenType tokenString [tokenString...]`
3572#
3573# Example:
3574# `set BOOL __AND__ __OR__`
3575#
3576# tokenTypes are defined in src/token_enum.h, use them without the
3577# 'CT_' prefix: 'CT_BOOL' => 'BOOL'
3578#
3579#
3580# - Token(s) can be treated as type(s) with the 'type' option.
3581# `type tokenString [tokenString...]`
3582#
3583# Example:
3584# `type int c_uint_8 Rectangle`
3585#
3586# This can also be achieved with `set TYPE int c_uint_8 Rectangle`
3587#
3588#
3589# To embed whitespace in tokenStrings use the '\' escape character, or quote
3590# the tokenStrings. These quotes are supported: "'`
3591#
3592#
3593# - Support for the auto detection of languages through the file ending can be
3594# added using the 'file_ext' command.
3595# `file_ext langType langString [langString..]`
3596#
3597# Example:
3598# `file_ext CPP .ch .cxx .cpp.in`
3599#
3600# langTypes are defined in uncrusify_types.h in the lang_flag_e enum, use
3601# them without the 'LANG_' prefix: 'LANG_CPP' => 'CPP'
3602#
3603#
3604# - Custom macro-based indentation can be set up using 'macro-open',
3605# 'macro-else' and 'macro-close'.
3606# `(macro-open | macro-else | macro-close) tokenString`
3607#
3608# Example:
3609# `macro-open BEGIN_TEMPLATE_MESSAGE_MAP`
3610# `macro-open BEGIN_MESSAGE_MAP`
3611# `macro-close END_MESSAGE_MAP`
3612#
3613#
3614# option(s) with 'not default' value: 232
3615#