uncrustify.cfg 105 KB
Newer Older
1
# Uncrustify-0.68_f
sebastien's avatar
sebastien committed
2 3 4 5 6

#
# General options
#

7 8 9 10
# The type of line endings.
#
# Default: auto
newlines                        = lf       # lf/crlf/cr/auto
sebastien's avatar
sebastien committed
11

12 13 14 15
# The original size of tabs in the input.
#
# Default: 8
input_tab_size                  = 8        # unsigned number
sebastien's avatar
sebastien committed
16

17 18 19 20
# The size of tabs in the output (only used if align_with_tabs=true).
#
# Default: 8
output_tab_size                 = 8        # unsigned number
sebastien's avatar
sebastien committed
21

22 23 24 25
# The ASCII value of the string escape char, usually 92 (\) or (Pawn) 94 (^).
#
# Default: 92
string_escape_char              = 92       # unsigned number
sebastien's avatar
sebastien committed
26

27 28 29
# Alternate string escape char (usually only used for Pawn).
# Only works right before the quote char.
string_escape_char2             = 0        # unsigned number
30

31 32 33
# Replace tab characters found in string literals with the escape sequence \t
# instead.
string_replace_tab_chars        = false    # true/false
34

35 36
# Allow interpreting '>=' and '>>=' as part of a template in code like
# 'void f(list<list<B>>=val);'. If true, 'assert(x<0 && y>=3)' will be broken.
37
# Improvements to template detection may make this option obsolete.
38
tok_split_gte                   = false    # true/false
39

40 41
# Specify the marker used in comments to disable processing of part of the
# file.
sebastien's avatar
sebastien committed
42
#
43 44
# Default:  *INDENT-OFF*
disable_processing_cmt          = " *INDENT-OFF*"      # string
sebastien's avatar
sebastien committed
45

46 47 48 49
# Specify the marker used in comments to (re)enable processing in a file.
#
# Default:  *INDENT-ON*
enable_processing_cmt           = " *INDENT-ON*"     # string
50

51 52
# Enable parsing of digraphs.
enable_digraphs                 = false    # true/false
53

54 55
# Add or remove the UTF-8 BOM (recommend 'remove').
utf8_bom                        = ignore   # ignore/add/remove/force
56

57 58 59
# If the file contains bytes with values between 128 and 255, but is not
# UTF-8, then output as UTF-8.
utf8_byte                       = false    # true/false
60

61 62
# Force the output encoding to UTF-8.
utf8_force                      = true     # true/false
sebastien's avatar
sebastien committed
63 64 65 66 67

#
# Spacing options
#

68 69
# Add or remove space around non-assignment symbolic operators ('+', '/', '%',
# '<<', and so forth).
70
sp_arith                        = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
71

72 73 74 75 76 77 78
# Add or remove space around arithmetic operators '+' and '-'.
#
# Overrides sp_arith.
sp_arith_additive               = ignore   # ignore/add/remove/force

# Add or remove space around assignment operator '=', '+=', etc.
sp_assign                       = force    # ignore/add/remove/force
79

80 81 82 83
# Add or remove space around '=' in C++11 lambda capture specifications.
#
# Overrides sp_assign.
sp_cpp_lambda_assign            = remove   # ignore/add/remove/force
84 85

# Add or remove space after the capture specification in C++11 lambda.
86
sp_cpp_lambda_paren             = remove   # ignore/add/remove/force
87

88 89
# Add or remove space around assignment operator '=' in a prototype.
sp_assign_default               = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
90

91 92 93
# Add or remove space before assignment operator '=', '+=', etc.
#
# Overrides sp_assign.
94
sp_before_assign                = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
95

96 97 98
# Add or remove space after assignment operator '=', '+=', etc.
#
# Overrides sp_assign.
99 100
sp_after_assign                 = ignore   # ignore/add/remove/force

101
# Add or remove space in 'NS_ENUM ('.
102
sp_enum_paren                   = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
103

104 105
# Add or remove space around assignment '=' in enum.
sp_enum_assign                  = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
106

107 108 109
# Add or remove space before assignment '=' in enum.
#
# Overrides sp_enum_assign.
110
sp_enum_before_assign           = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
111

112 113 114
# Add or remove space after assignment '=' in enum.
#
# Overrides sp_enum_assign.
115 116
sp_enum_after_assign            = ignore   # ignore/add/remove/force

117 118
# Add or remove space around assignment ':' in enum.
sp_enum_colon                   = ignore   # ignore/add/remove/force
119

120 121 122 123 124 125 126
# Add or remove space around preprocessor '##' concatenation operator.
#
# Default: add
sp_pp_concat                    = force    # ignore/add/remove/force

# Add or remove space after preprocessor '#' stringify operator.
# Also affects the '#@' charizing operator.
127 128
sp_pp_stringify                 = ignore   # ignore/add/remove/force

129 130
# Add or remove space before preprocessor '#' stringify operator
# as in '#define x(y) L#y'.
131
sp_before_pp_stringify          = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
132

133 134
# Add or remove space around boolean operators '&&' and '||'.
sp_bool                         = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
135

136 137
# Add or remove space around compare operator '<', '>', '==', etc.
sp_compare                      = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
138

139
# Add or remove space inside '(' and ')'.
140
sp_inside_paren                 = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
141

142
# Add or remove space between nested parentheses, i.e. '((' vs. ') )'.
143 144
sp_paren_paren                  = remove   # ignore/add/remove/force

145
# Add or remove space between back-to-back parentheses, i.e. ')(' vs. ') ('.
146
sp_cparen_oparen                = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
147

148 149
# Whether to balance spaces inside nested parentheses.
sp_balance_nested_parens        = false    # true/false
sebastien's avatar
sebastien committed
150

151
# Add or remove space between ')' and '{'.
152
sp_paren_brace                  = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
153

154 155
# Add or remove space between nested braces, i.e. '{{' vs '{ {'.
sp_brace_brace                  = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
156

157 158
# Add or remove space before pointer star '*'.
sp_before_ptr_star              = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
159

160 161 162 163 164
# Add or remove space before pointer star '*' that isn't followed by a
# variable name. If set to 'ignore', sp_before_ptr_star is used instead.
sp_before_unnamed_ptr_star      = force    # ignore/add/remove/force

# Add or remove space between pointer stars '*'.
165
sp_between_ptr_star             = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
166 167

# Add or remove space after pointer star '*', if followed by a word.
168 169
sp_after_ptr_star               = remove   # ignore/add/remove/force

170 171 172
# Add or remove space after pointer caret '^', if followed by a word.
sp_after_ptr_block_caret        = ignore   # ignore/add/remove/force

173 174
# Add or remove space after pointer star '*', if followed by a qualifier.
sp_after_ptr_star_qualifier     = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
175

176 177
# Add or remove space after a pointer star '*', if followed by a function
# prototype or function definition.
178 179
sp_after_ptr_star_func          = remove   # ignore/add/remove/force

180 181
# Add or remove space after a pointer star '*', if followed by an open
# parenthesis, as in 'void* (*)().
182
sp_ptr_star_paren               = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
183

184 185 186
# Add or remove space before a pointer star '*', if followed by a function
# prototype or function definition.
sp_before_ptr_star_func         = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
187

188 189
# Add or remove space before a reference sign '&'.
sp_before_byref                 = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
190

191 192 193
# Add or remove space before a reference sign '&' that isn't followed by a
# variable name. If set to 'ignore', sp_before_byref is used instead.
sp_before_unnamed_byref         = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
194 195

# Add or remove space after reference sign '&', if followed by a word.
196
sp_after_byref                  = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
197

198 199
# Add or remove space after a reference sign '&', if followed by a function
# prototype or function definition.
200
sp_after_byref_func             = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
201

202 203 204
# Add or remove space before a reference sign '&', if followed by a function
# prototype or function definition.
sp_before_byref_func            = force    # ignore/add/remove/force
205

206 207 208 209 210 211 212
# Add or remove space between type and word.
#
# Default: force
sp_after_type                   = force    # ignore/add/remove/force

# Add or remove space between 'decltype(...)' and word.
sp_after_decltype               = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
213

214 215
# (D) Add or remove space before the parenthesis in the D constructs
# 'template Foo(' and 'class Foo('.
216
sp_before_template_paren        = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
217

218
# Add or remove space between 'template' and '<'.
sebastien's avatar
sebastien committed
219
# If set to ignore, sp_before_angle is used.
220
sp_template_angle               = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
221

222
# Add or remove space before '<'.
223
sp_before_angle                 = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
224

225
# Add or remove space inside '<' and '>'.
226
sp_inside_angle                 = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
227

228 229 230 231
# Add or remove space between '>' and ':'.
sp_angle_colon                  = ignore   # ignore/add/remove/force

# Add or remove space after '<>'.
232 233
sp_after_angle                  = ignore   # ignore/add/remove/force

234
# Add or remove space between '>' and '(' as found in 'new List<byte>(foo);'.
235 236
sp_angle_paren                  = remove   # ignore/add/remove/force

237 238
# Add or remove space between '>' and '()' as found in 'new List<byte>();'.
sp_angle_paren_empty            = remove   # ignore/add/remove/force
239

240 241 242
# Add or remove space between '>' and a word as in 'List<byte> m;' or
# 'template <typename T> static ...'.
sp_angle_word                   = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
243

244 245 246 247
# Add or remove space between '>' and '>' in '>>' (template stuff).
#
# Default: add
sp_angle_shift                  = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
248

249 250 251
# (C++11) Permit removal of the space between '>>' in 'foo<bar<int> >'. Note
# that sp_angle_shift cannot remove the space without this option.
sp_permit_cpp11_shift           = true     # true/false
sebastien's avatar
sebastien committed
252

253 254 255
# Add or remove space before '(' of control statements ('if', 'for', 'switch',
# 'while', etc.).
sp_before_sparen                = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
256

257
# Add or remove space inside '(' and ')' of control statements.
258
sp_inside_sparen                = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
259

260 261 262
# Add or remove space after '(' of control statements.
#
# Overrides sp_inside_sparen.
263
sp_inside_sparen_open           = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
264

265 266 267 268 269 270 271
# Add or remove space before ')' of control statements.
#
# Overrides sp_inside_sparen.
sp_inside_sparen_close          = ignore   # ignore/add/remove/force

# Add or remove space after ')' of control statements.
sp_after_sparen                 = force    # ignore/add/remove/force
272

273 274
# Add or remove space between ')' and '{' of of control statements.
sp_sparen_brace                 = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
275

276
# (D) Add or remove space between 'invariant' and '('.
277
sp_invariant_paren              = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
278

279
# (D) Add or remove space after the ')' in 'invariant (C) c'.
280
sp_after_invariant_paren        = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
281

282
# Add or remove space before empty statement ';' on 'if', 'for' and 'while'.
283
sp_special_semi                 = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
284

285 286 287
# Add or remove space before ';'.
#
# Default: remove
288
sp_before_semi                  = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
289

290
# Add or remove space before ';' in non-empty 'for' statements.
291 292 293 294
sp_before_semi_for              = remove   # ignore/add/remove/force

# Add or remove space before a semicolon of an empty part of a for statement.
sp_before_semi_for_empty        = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
295

296 297 298
# Add or remove space after ';', except when followed by a comment.
#
# Default: add
299
sp_after_semi                   = add      # ignore/add/remove/force
sebastien's avatar
sebastien committed
300

301 302 303
# Add or remove space after ';' in non-empty 'for' statements.
#
# Default: force
304 305
sp_after_semi_for               = force    # ignore/add/remove/force

306 307
# Add or remove space after the final semicolon of an empty part of a for
# statement, as in 'for ( ; ; <here> )'.
308
sp_after_semi_for_empty         = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
309

310 311 312 313 314
# Add or remove space before '[' (except '[]').
sp_before_square                = remove   # ignore/add/remove/force

# Add or remove space before '[]'.
sp_before_squares               = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
315

316 317
# Add or remove space before C++17 structured bindings.
sp_cpp_before_struct_binding    = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
318

319 320
# Add or remove space inside a non-empty '[' and ']'.
sp_inside_square                = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
321

322 323 324
# (OC) Add or remove space inside a non-empty Objective-C boxed array '@[' and
# ']'. If set to ignore, sp_inside_square is used.
sp_inside_square_oc_array       = ignore   # ignore/add/remove/force
325

326 327 328 329 330 331
# Add or remove space after ',', i.e. 'a,b' vs. 'a, b'.
sp_after_comma                  = force    # ignore/add/remove/force

# Add or remove space before ','.
#
# Default: remove
332 333
sp_before_comma                 = remove   # ignore/add/remove/force

334 335
# (C#) Add or remove space between ',' and ']' in multidimensional array type
# like 'int[,,]'.
336 337
sp_after_mdatype_commas         = ignore   # ignore/add/remove/force

338 339
# (C#) Add or remove space between '[' and ',' in multidimensional array type
# like 'int[,,]'.
340 341
sp_before_mdatype_commas        = ignore   # ignore/add/remove/force

342 343
# (C#) Add or remove space between ',' in multidimensional array type
# like 'int[,,]'.
344
sp_between_mdatype_commas       = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
345

346 347 348 349
# Add or remove space between an open parenthesis and comma,
# i.e. '(,' vs. '( ,'.
#
# Default: force
350 351
sp_paren_comma                  = force    # ignore/add/remove/force

352 353
# Add or remove space before the variadic '...' when preceded by a
# non-punctuator.
354
sp_before_ellipsis              = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
355

356 357 358 359 360
# Add or remove space between a type and '...'.
sp_type_ellipsis                = ignore   # ignore/add/remove/force

# Add or remove space between ')' and '...'.
sp_paren_ellipsis               = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
361

362 363
# Add or remove space after class ':'.
sp_after_class_colon            = force    # ignore/add/remove/force
364

365 366
# Add or remove space before class ':'.
sp_before_class_colon           = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
367

368 369
# Add or remove space after class constructor ':'.
sp_after_constr_colon           = force    # ignore/add/remove/force
370

371 372 373 374 375 376
# Add or remove space before class constructor ':'.
sp_before_constr_colon          = force    # ignore/add/remove/force

# Add or remove space before case ':'.
#
# Default: remove
377
sp_before_case_colon            = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
378

379
# Add or remove space between 'operator' and operator sign.
380
sp_after_operator               = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
381

382 383
# Add or remove space between the operator symbol and the open parenthesis, as
# in 'operator ++('.
384 385
sp_after_operator_sym           = remove   # ignore/add/remove/force

386 387
# Overrides sp_after_operator_sym when the operator has no arguments, as in
# 'operator *()'.
388
sp_after_operator_sym_empty     = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
389

390 391 392
# Add or remove space after C/D cast, i.e. 'cast(int)a' vs. 'cast(int) a' or
# '(int)a' vs. '(int) a'.
sp_after_cast                   = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
393

394
# Add or remove spaces inside cast parentheses.
395
sp_inside_paren_cast            = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
396

397 398 399
# Add or remove space between the type and open parenthesis in a C++ cast,
# i.e. 'int(exp)' vs. 'int (exp)'.
sp_cpp_cast_paren               = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
400

401
# Add or remove space between 'sizeof' and '('.
402
sp_sizeof_paren                 = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
403

404 405 406 407 408 409 410 411 412 413
# Add or remove space between 'sizeof' and '...'.
sp_sizeof_ellipsis              = ignore   # ignore/add/remove/force

# Add or remove space between 'sizeof...' and '('.
sp_sizeof_ellipsis_paren        = ignore   # ignore/add/remove/force

# Add or remove space between 'decltype' and '('.
sp_decltype_paren               = remove   # ignore/add/remove/force

# (Pawn) Add or remove space after the tag keyword.
414
sp_after_tag                    = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
415

416 417 418 419 420
# Add or remove space inside enum '{' and '}'.
sp_inside_braces_enum           = force    # ignore/add/remove/force

# Add or remove space inside struct/union '{' and '}'.
sp_inside_braces_struct         = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
421

422 423
# (OC) Add or remove space inside Objective-C boxed dictionary '{' and '}'
sp_inside_braces_oc_dict        = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
424

425 426 427 428 429 430 431 432 433 434 435 436
# Add or remove space after open brace in an unnamed temporary
# direct-list-initialization.
sp_after_type_brace_init_lst_open = ignore   # ignore/add/remove/force

# Add or remove space before close brace in an unnamed temporary
# direct-list-initialization.
sp_before_type_brace_init_lst_close = ignore   # ignore/add/remove/force

# Add or remove space inside an unnamed temporary direct-list-initialization.
sp_inside_type_brace_init_lst   = ignore   # ignore/add/remove/force

# Add or remove space inside '{' and '}'.
437
sp_inside_braces                = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
438

439 440
# Add or remove space inside '{}'.
sp_inside_braces_empty          = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
441

442 443
# Add or remove space between return type and function name. A minimum of 1
# is forced except for pointer return types.
444
sp_type_func                    = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
445

446 447 448 449 450
# Add or remove space between type and open brace of an unnamed temporary
# direct-list-initialization.
sp_type_brace_init_lst          = remove   # ignore/add/remove/force

# Add or remove space between function name and '(' on function declaration.
451 452
sp_func_proto_paren             = remove   # ignore/add/remove/force

453 454 455
# Add or remove space between function name and '()' on function declaration
# without parameters.
sp_func_proto_paren_empty       = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
456

457
# Add or remove space between function name and '(' on function definition.
458 459
sp_func_def_paren               = remove   # ignore/add/remove/force

460 461 462
# Add or remove space between function name and '()' on function definition
# without parameters.
sp_func_def_paren_empty         = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
463

464
# Add or remove space inside empty function '()'.
465
sp_inside_fparens               = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
466

467
# Add or remove space inside function '(' and ')'.
468 469
sp_inside_fparen                = remove   # ignore/add/remove/force

470 471 472
# Add or remove space inside the first parentheses in a function type, as in
# 'void (*x)(...)'.
sp_inside_tparen                = remove   # ignore/add/remove/force
473

474 475 476
# Add or remove space between the ')' and '(' in a function type, as in
# 'void (*x)(...)'.
sp_after_tparen_close           = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
477 478

# Add or remove space between ']' and '(' when part of a function call.
479
sp_square_fparen                = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
480

481 482
# Add or remove space between ')' and '{' of function.
sp_fparen_brace                 = force    # ignore/add/remove/force
483

484 485 486 487 488 489 490
# Add or remove space between ')' and '{' of s function call in object
# initialization.
#
# Overrides sp_fparen_brace.
sp_fparen_brace_initializer     = ignore   # ignore/add/remove/force

# (Java) Add or remove space between ')' and '{{' of double brace initializer.
491
sp_fparen_dbrace                = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
492

493
# Add or remove space between function name and '(' on function calls.
494 495
sp_func_call_paren              = remove   # ignore/add/remove/force

496 497
# Add or remove space between function name and '()' on function calls without
# parameters. If set to 'ignore' (the default), sp_func_call_paren is used.
498
sp_func_call_paren_empty        = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
499

500 501 502 503
# Add or remove space between the user function name and '(' on function
# calls. You need to set a keyword to be a user function in the config file,
# like:
#   set func_call_user tr _ i18n
504
sp_func_call_user_paren         = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
505

506 507 508 509 510 511 512 513 514
# Add or remove space inside user function '(' and ')'.
sp_func_call_user_inside_fparen = ignore   # ignore/add/remove/force

# Add or remove space between nested parentheses with user functions,
# i.e. '((' vs. '( ('.
sp_func_call_user_paren_paren   = ignore   # ignore/add/remove/force

# Add or remove space between a constructor/destructor and the open
# parenthesis.
515 516
sp_func_class_paren             = remove   # ignore/add/remove/force

517 518 519
# Add or remove space between a constructor without parameters or destructor
# and '()'.
sp_func_class_paren_empty       = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
520

521 522
# Add or remove space between 'return' and '('.
sp_return_paren                 = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
523

524 525 526 527
# Add or remove space between 'return' and '{'.
sp_return_brace                 = force    # ignore/add/remove/force

# Add or remove space between '__attribute__' and '('.
528
sp_attribute_paren              = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
529

530
# Add or remove space between 'defined' and '(' in '#if defined (FOO)'.
531
sp_defined_paren                = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
532

533 534
# Add or remove space between 'throw' and '(' in 'throw (something)'.
sp_throw_paren                  = force    # ignore/add/remove/force
535

536 537
# Add or remove space between 'throw' and anything other than '(' as in
# '@throw [...];'.
538 539
sp_after_throw                  = ignore   # ignore/add/remove/force

540
# Add or remove space between 'catch' and '(' in 'catch (something) { }'.
541
# If set to ignore, sp_before_sparen is used.
542
sp_catch_paren                  = force    # ignore/add/remove/force
543

544 545 546 547 548 549
# (OC) Add or remove space between '@catch' and '('
# in '@catch (something) { }'. If set to ignore, sp_catch_paren is used.
sp_oc_catch_paren               = ignore   # ignore/add/remove/force

# (D) Add or remove space between 'version' and '('
# in 'version (something) { }'. If set to ignore, sp_before_sparen is used.
550 551
sp_version_paren                = ignore   # ignore/add/remove/force

552 553
# (D) Add or remove space between 'scope' and '('
# in 'scope (something) { }'. If set to ignore, sp_before_sparen is used.
554 555
sp_scope_paren                  = ignore   # ignore/add/remove/force

556 557 558
# Add or remove space between 'super' and '(' in 'super (something)'.
#
# Default: remove
559 560
sp_super_paren                  = remove   # ignore/add/remove/force

561 562 563
# Add or remove space between 'this' and '(' in 'this (something)'.
#
# Default: remove
564
sp_this_paren                   = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
565

566 567 568 569 570 571 572 573
# Add or remove space between a macro name and its definition.
sp_macro                        = force    # ignore/add/remove/force

# Add or remove space between a macro function ')' and its definition.
sp_macro_func                   = force    # ignore/add/remove/force

# Add or remove space between 'else' and '{' if on the same line.
sp_else_brace                   = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
574

575 576
# Add or remove space between '}' and 'else' if on the same line.
sp_brace_else                   = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
577

578 579
# Add or remove space between '}' and the name of a typedef on the same line.
sp_brace_typedef                = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
580

581 582 583
# Add or remove space before the '{' of a 'catch' statement, if the '{' and
# 'catch' are on the same line, as in 'catch (decl) <here> {'.
sp_catch_brace                  = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
584

585 586 587 588
# (OC) Add or remove space before the '{' of a '@catch' statement, if the '{'
# and '@catch' are on the same line, as in '@catch (decl) <here> {'.
# If set to ignore, sp_catch_brace is used.
sp_oc_catch_brace               = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
589

590 591
# Add or remove space between '}' and 'catch' if on the same line.
sp_brace_catch                  = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
592

593 594 595
# (OC) Add or remove space between '}' and '@catch' if on the same line.
# If set to ignore, sp_brace_catch is used.
sp_oc_brace_catch               = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
596

597 598
# Add or remove space between 'finally' and '{' if on the same line.
sp_finally_brace                = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
599

600 601
# Add or remove space between '}' and 'finally' if on the same line.
sp_brace_finally                = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
602

603 604
# Add or remove space between 'try' and '{' if on the same line.
sp_try_brace                    = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
605

606
# Add or remove space between get/set and '{' if on the same line.
607 608
sp_getset_brace                 = ignore   # ignore/add/remove/force

609 610 611 612
# Add or remove space between a variable and '{' for C++ uniform
# initialization.
#
# Default: add
613 614
sp_word_brace                   = add      # ignore/add/remove/force

615 616 617
# Add or remove space between a variable and '{' for a namespace.
#
# Default: add
618
sp_word_brace_ns                = add      # ignore/add/remove/force
sebastien's avatar
sebastien committed
619

620
# Add or remove space before the '::' operator.
621
sp_before_dc                    = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
622

623
# Add or remove space after the '::' operator.
624
sp_after_dc                     = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
625

626
# (D) Add or remove around the D named array initializer ':' operator.
627
sp_d_array_colon                = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
628

629 630 631
# Add or remove space after the '!' (not) unary operator.
#
# Default: remove
632
sp_not                          = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
633

634 635 636
# Add or remove space after the '~' (invert) unary operator.
#
# Default: remove
637
sp_inv                          = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
638

639 640 641 642
# Add or remove space after the '&' (address-of) unary operator. This does not
# affect the spacing after a '&' that is part of a type.
#
# Default: remove
643
sp_addr                         = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
644

645 646 647
# Add or remove space around the '.' or '->' operators.
#
# Default: remove
648
sp_member                       = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
649

650 651 652 653
# Add or remove space after the '*' (dereference) unary operator. This does
# not affect the spacing after a '*' that is part of a type.
#
# Default: remove
654
sp_deref                        = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
655

656 657 658
# Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'.
#
# Default: remove
659
sp_sign                         = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
660

661 662 663 664
# Add or remove space between '++' and '--' the word to which it is being
# applied, as in '(--x)' or 'y++;'.
#
# Default: remove
665
sp_incdec                       = remove   # ignore/add/remove/force
sebastien's avatar
sebastien committed
666

667 668 669
# Add or remove space before a backslash-newline at the end of a line.
#
# Default: add
670
sp_before_nl_cont               = add      # ignore/add/remove/force
sebastien's avatar
sebastien committed
671

672 673
# (OC) Add or remove space after the scope '+' or '-', as in '-(void) foo;'
# or '+(int) bar;'.
674
sp_after_oc_scope               = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
675

676 677
# (OC) Add or remove space after the colon in message specs,
# i.e. '-(int) f:(int) x;' vs. '-(int) f: (int) x;'.
678
sp_after_oc_colon               = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
679

680 681
# (OC) Add or remove space before the colon in message specs,
# i.e. '-(int) f: (int) x;' vs. '-(int) f : (int) x;'.
682 683
sp_before_oc_colon              = ignore   # ignore/add/remove/force

684 685
# (OC) Add or remove space after the colon in immutable dictionary expression
# 'NSDictionary *test = @{@"foo" :@"bar"};'.
686 687
sp_after_oc_dict_colon          = ignore   # ignore/add/remove/force

688 689
# (OC) Add or remove space before the colon in immutable dictionary expression
# 'NSDictionary *test = @{@"foo" :@"bar"};'.
690
sp_before_oc_dict_colon         = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
691

692 693
# (OC) Add or remove space after the colon in message specs,
# i.e. '[object setValue:1];' vs. '[object setValue: 1];'.
694
sp_after_send_oc_colon          = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
695

696 697
# (OC) Add or remove space before the colon in message specs,
# i.e. '[object setValue:1];' vs. '[object setValue :1];'.
698
sp_before_send_oc_colon         = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
699

700 701
# (OC) Add or remove space after the (type) in message specs,
# i.e. '-(int)f: (int) x;' vs. '-(int)f: (int)x;'.
702 703
sp_after_oc_type                = ignore   # ignore/add/remove/force

704 705
# (OC) Add or remove space after the first (type) in message specs,
# i.e. '-(int) f:(int)x;' vs. '-(int)f:(int)x;'.
706 707
sp_after_oc_return_type         = ignore   # ignore/add/remove/force

708 709 710
# (OC) Add or remove space between '@selector' and '(',
# i.e. '@selector(msgName)' vs. '@selector (msgName)'.
# Also applies to '@protocol()' constructs.
711 712
sp_after_oc_at_sel              = ignore   # ignore/add/remove/force

713 714
# (OC) Add or remove space between '@selector(x)' and the following word,
# i.e. '@selector(foo) a:' vs. '@selector(foo)a:'.
715 716
sp_after_oc_at_sel_parens       = ignore   # ignore/add/remove/force

717 718 719
# (OC) Add or remove space inside '@selector' parentheses,
# i.e. '@selector(foo)' vs. '@selector( foo )'.
# Also applies to '@protocol()' constructs.
720 721
sp_inside_oc_at_sel_parens      = ignore   # ignore/add/remove/force

722 723
# (OC) Add or remove space before a block pointer caret,
# i.e. '^int (int arg){...}' vs. ' ^int (int arg){...}'.
724 725
sp_before_oc_block_caret        = ignore   # ignore/add/remove/force

726 727
# (OC) Add or remove space after a block pointer caret,
# i.e. '^int (int arg){...}' vs. '^ int (int arg){...}'.
728 729
sp_after_oc_block_caret         = ignore   # ignore/add/remove/force

730 731
# (OC) Add or remove space between the receiver and selector in a message,
# as in '[receiver selector ...]'.
732 733
sp_after_oc_msg_receiver        = ignore   # ignore/add/remove/force

734
# (OC) Add or remove space after '@property'.
735
sp_after_oc_property            = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
736

737 738 739
# (OC) Add or remove space between '@synchronized' and the open parenthesis,
# i.e. '@synchronized(foo)' vs. '@synchronized (foo)'.
sp_after_oc_synchronized        = ignore   # ignore/add/remove/force
740

741 742 743 744 745 746
# Add or remove space around the ':' in 'b ? t : f'.
sp_cond_colon                   = force    # ignore/add/remove/force

# Add or remove space before the ':' in 'b ? t : f'.
#
# Overrides sp_cond_colon.
747 748
sp_cond_colon_before            = ignore   # ignore/add/remove/force

749 750 751
# Add or remove space after the ':' in 'b ? t : f'.
#
# Overrides sp_cond_colon.
752
sp_cond_colon_after             = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
753

754 755
# Add or remove space around the '?' in 'b ? t : f'.
sp_cond_question                = force    # ignore/add/remove/force
756

757 758 759
# Add or remove space before the '?' in 'b ? t : f'.
#
# Overrides sp_cond_question.
760 761
sp_cond_question_before         = ignore   # ignore/add/remove/force

762 763 764
# Add or remove space after the '?' in 'b ? t : f'.
#
# Overrides sp_cond_question.
765 766
sp_cond_question_after          = ignore   # ignore/add/remove/force

767 768 769 770
# In the abbreviated ternary form '(a ?: b)', add or remove space between '?'
# and ':'.
#
# Overrides all other sp_cond_* options.
771
sp_cond_ternary_short           = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
772

773 774 775
# Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make
# sense here.
sp_case_label                   = force    # ignore/add/remove/force
sebastien's avatar
sebastien committed
776

777
# (D) Add or remove space around the D '..' operator.
778 779
sp_range                        = ignore   # ignore/add/remove/force

780 781 782
# Add or remove space after ':' in a Java/C++11 range-based 'for',
# as in 'for (Type var : expr)'.
sp_after_for_colon              = force    # ignore/add/remove/force
783

784 785 786
# Add or remove space before ':' in a Java/C++11 range-based 'for',
# as in 'for (Type var : expr)'.
sp_before_for_colon             = force    # ignore/add/remove/force
787

788
# (D) Add or remove space between 'extern' and '(' as in 'extern (C)'.
789
sp_extern_paren                 = ignore   # ignore/add/remove/force
sebastien's avatar
sebastien committed
790

791 792
# Add or remove space after the opening of a C++ comment,
# i.e. '// A' vs. '//A'.
793 794
sp_cmt_cpp_start                = ignore   # ignore/add/remove/force

795 796 797
# If true, space is added with sp_cmt_cpp_start will be added after doxygen
# sequences like '///', '///<', '//!' and '//!<'.
sp_cmt_cpp_doxygen              = true    # true/false
798

799 800 801
# If true, space is added with sp_cmt_cpp_start will be added after Qt
# translator or meta-data comments like '//:', '//=', and '//~'.
sp_cmt_cpp_qttr                 = false    # true/false
802

803
# Add or remove space between #else or #endif and a trailing comment.
804 805
sp_endif_cmt                    = ignore   # ignore/add/remove/force

806 807
# Add or remove space after 'new', 'delete' and 'delete[]'.
sp_after_new                    = force    # ignore/add/remove/force
808

809
# Add or remove space between 'new' and '(' in 'new()'.
810 811
sp_between_new_paren            = ignore   # ignore/add/remove/force

812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832
# Add or remove space between ')' and type in 'new(foo) BAR'.
sp_after_newop_paren            = ignore   # ignore/add/remove/force

# Add or remove space inside parenthesis of the new operator
# as in 'new(foo) BAR'.
sp_inside_newop_paren           = ignore   # ignore/add/remove/force

# Add or remove space after the open parenthesis of the new operator,
# as in 'new(foo) BAR'.
#
# Overrides sp_inside_newop_paren.
sp_inside_newop_paren_open      = ignore   # ignore/add/remove/force

# Add or remove space before the close parenthesis of the new operator,
# as in 'new(foo) BAR'.
#
# Overrides sp_inside_newop_paren.
sp_inside_newop_paren_close     = ignore   # ignore/add/remove/force

# Add or remove space before a trailing or embedded comment.
sp_before_tr_emb_cmt            = force    # ignore/add/remove/force
833

834 835
# Number of spaces before a trailing or embedded comment.
sp_num_before_tr_emb_cmt        = 0        # unsigned number
836

837
# (Java) Add or remove space between an annotation and the open parenthesis.
838 839 840
sp_annotation_paren             = ignore   # ignore/add/remove/force

# If true, vbrace tokens are dropped to the previous token and skipped.
841 842 843 844 845 846 847
sp_skip_vbrace_tokens           = false    # true/false

# Add or remove space after 'noexcept'.
sp_after_noexcept               = remove   # ignore/add/remove/force

# If true, a <TAB> is inserted after #define.
force_tab_after_define          = false    # true/false
sebastien's avatar
sebastien committed
848 849

#
850
# Indenting options
sebastien's avatar
sebastien committed
851 852
#

853 854 855 856
# The number of columns to indent per level. Usually 2, 3, 4, or 8.
#
# Default: 8
indent_columns                  = 2        # unsigned number
sebastien's avatar
sebastien committed
857

858 859 860 861 862 863
# The continuation indent. If non-zero, this overrides the indent of '(' and
# '=' continuation indents. Negative values are OK; negative value is absolute
# and not increased for each '(' level.
#
# For FreeBSD, this is set to 4.
indent_continue                 = 0        # number
sebastien's avatar
sebastien committed
864

865 866 867
# The continuation indent, only for class header line(s). If non-zero, this
# overrides the indent of 'class' continuation indents.
indent_continue_class_head      = 0        # unsigned number
sebastien's avatar
sebastien committed
868

869 870 871
# Whether to indent empty lines (i.e. lines which contain only spaces before
# the newline character).
indent_single_newlines          = false    # true/false
872

873 874 875
# The continuation indent for func_*_param if they are true. If non-zero, this
# overrides the indent.
indent_param                    = 0        # unsigned number
sebastien's avatar
sebastien committed
876

877 878 879 880 881 882 883 884
# How to use tabs when indenting code.
#
# 0: Spaces only
# 1: Indent with tabs to brace level, align with spaces (default)
# 2: Indent and align with tabs, using spaces when not on a tabstop
#
# Default: 1
indent_with_tabs                = 0        # unsigned number
sebastien's avatar
sebastien committed
885

886 887 888
# Whether to indent comments that are not at a brace level with tabs on a
# tabstop. Requires indent_with_tabs=2. If false, will use spaces.
indent_cmt_with_tabs            = false    # true/false
sebastien's avatar
sebastien committed
889

890 891
# Whether to indent strings broken by '\' so that they line up.
indent_align_string             = false    # true/false
sebastien's avatar
sebastien committed
892

893 894 895
# The number of spaces to indent multi-line XML strings.
# Requires indent_align_string=true.
indent_xml_string               = 0        # unsigned number
sebastien's avatar
sebastien committed
896

897 898
# Spaces to indent '{' from level.
indent_brace                    = 2        # unsigned number
sebastien's avatar
sebastien committed
899

900 901
# Whether braces are indented to the body level.
indent_braces                   = false    # true/false
sebastien's avatar
sebastien committed
902

903 904
# Whether to disable indenting function braces if indent_braces=true.
indent_braces_no_func           = false    # true/false
sebastien's avatar
sebastien committed
905

906 907
# Whether to disable indenting class braces if indent_braces=true.
indent_braces_no_class          = false    # true/false
908