Michal Vasko | 84bf6f4 | 2023-05-19 11:09:48 +0200 | [diff] [blame] | 1 | # Uncrustify-0.77.1_f |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2 | |
| 3 | # |
| 4 | # General options |
| 5 | # |
| 6 | |
| 7 | # Added specific file extensions. |
| 8 | file_ext C .c.in |
| 9 | file_ext C-Header .h.in |
| 10 | |
| 11 | # The type of line endings. |
| 12 | # |
| 13 | # Default: auto |
| 14 | newlines = lf # lf/crlf/cr/auto |
| 15 | |
| 16 | # The original size of tabs in the input. |
| 17 | # |
| 18 | # Default: 8 |
| 19 | input_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 |
| 24 | output_tab_size = 8 # unsigned number |
| 25 | |
| 26 | # The ASCII value of the string escape char, usually 92 (\) or (Pawn) 94 (^). |
| 27 | # |
| 28 | # Default: 92 |
| 29 | string_escape_char = 92 # unsigned number |
| 30 | |
| 31 | # Alternate string escape char (usually only used for Pawn). |
| 32 | # Only works right before the quote char. |
| 33 | string_escape_char2 = 0 # unsigned number |
| 34 | |
| 35 | # Replace tab characters found in string literals with the escape sequence \t |
| 36 | # instead. |
| 37 | string_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. |
| 42 | tok_split_gte = false # true/false |
| 43 | |
| 44 | # Disable formatting of NL_CONT ('\\n') ended lines (e.g. multiline macros) |
| 45 | disable_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* |
| 52 | disable_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* |
| 58 | enable_processing_cmt = " *INDENT-ON*" # string |
| 59 | |
| 60 | # Enable parsing of digraphs. |
| 61 | enable_digraphs = false # true/false |
| 62 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 63 | # 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. |
| 67 | processing_cmt_as_regex = false # true/false |
| 68 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 69 | # Add or remove the UTF-8 BOM (recommend 'remove'). |
| 70 | utf8_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. |
| 74 | utf8_byte = false # true/false |
| 75 | |
| 76 | # Force the output encoding to UTF-8. |
| 77 | utf8_force = true # true/false |
| 78 | |
| 79 | # Add or remove space between 'do' and '{'. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 80 | sp_do_brace_open = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 81 | |
| 82 | # Add or remove space between '}' and 'while'. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 83 | sp_brace_close_while = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 84 | |
| 85 | # Add or remove space between 'while' and '('. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 86 | sp_while_paren_open = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 87 | |
| 88 | # |
| 89 | # Spacing options |
| 90 | # |
| 91 | |
| 92 | # Add or remove space around non-assignment symbolic operators ('+', '/', '%', |
| 93 | # '<<', and so forth). |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 94 | sp_arith = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 95 | |
| 96 | # Add or remove space around arithmetic operators '+' and '-'. |
| 97 | # |
| 98 | # Overrides sp_arith. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 99 | sp_arith_additive = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 100 | |
| 101 | # Add or remove space around assignment operator '=', '+=', etc. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 102 | sp_assign = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 103 | |
| 104 | # Add or remove space around '=' in C++11 lambda capture specifications. |
| 105 | # |
| 106 | # Overrides sp_assign. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 107 | sp_cpp_lambda_assign = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 108 | |
| 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){ ... }'. |
| 111 | sp_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> { ... }'. |
| 115 | sp_cpp_lambda_square_brace = ignore # ignore/add/remove/force |
| 116 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 117 | # 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> ){ ... }'. |
| 120 | sp_cpp_lambda_argument_list = ignore # ignore/add/remove/force/not_defined |
| 121 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 122 | # Add or remove space after the argument list of a C++11 lambda, as in |
| 123 | # '[](int x) <here> { ... }'. |
| 124 | sp_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> ( ... )'. |
| 128 | sp_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. |
| 133 | sp_assign_default = ignore # ignore/add/remove/force |
| 134 | |
| 135 | # Add or remove space before assignment operator '=', '+=', etc. |
| 136 | # |
| 137 | # Overrides sp_assign. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 138 | sp_before_assign = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 139 | |
| 140 | # Add or remove space after assignment operator '=', '+=', etc. |
| 141 | # |
| 142 | # Overrides sp_assign. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 143 | sp_after_assign = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 144 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 145 | # Add or remove space in 'enum {'. |
| 146 | # |
| 147 | # Default: add |
| 148 | sp_enum_brace = force # ignore/add/remove/force/not_defined |
| 149 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 150 | # Add or remove space in 'NS_ENUM ('. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 151 | sp_enum_paren = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 152 | |
| 153 | # Add or remove space around assignment '=' in enum. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 154 | sp_enum_assign = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 155 | |
| 156 | # Add or remove space before assignment '=' in enum. |
| 157 | # |
| 158 | # Overrides sp_enum_assign. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 159 | sp_enum_before_assign = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 160 | |
| 161 | # Add or remove space after assignment '=' in enum. |
| 162 | # |
| 163 | # Overrides sp_enum_assign. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 164 | sp_enum_after_assign = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 165 | |
| 166 | # Add or remove space around assignment ':' in enum. |
| 167 | sp_enum_colon = ignore # ignore/add/remove/force |
| 168 | |
| 169 | # Add or remove space around preprocessor '##' concatenation operator. |
| 170 | # |
| 171 | # Default: add |
| 172 | sp_pp_concat = ignore # ignore/add/remove/force |
| 173 | |
| 174 | # Add or remove space after preprocessor '#' stringify operator. |
| 175 | # Also affects the '#@' charizing operator. |
| 176 | sp_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'. |
| 180 | sp_before_pp_stringify = ignore # ignore/add/remove/force |
| 181 | |
| 182 | # Add or remove space around boolean operators '&&' and '||'. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 183 | sp_bool = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 184 | |
| 185 | # Add or remove space around compare operator '<', '>', '==', etc. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 186 | sp_compare = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 187 | |
| 188 | # Add or remove space inside '(' and ')'. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 189 | sp_inside_paren = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 190 | |
| 191 | # Add or remove space between nested parentheses, i.e. '((' vs. ') )'. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 192 | sp_paren_paren = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 193 | |
| 194 | # Add or remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 195 | sp_cparen_oparen = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 196 | |
| 197 | # Whether to balance spaces inside nested parentheses. |
| 198 | sp_balance_nested_parens = false # true/false |
| 199 | |
| 200 | # Add or remove space between ')' and '{'. |
Michal Vasko | 44f3d2c | 2020-08-24 09:49:38 +0200 | [diff] [blame] | 201 | sp_paren_brace = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 202 | |
| 203 | # Add or remove space between nested braces, i.e. '{{' vs '{ {'. |
| 204 | sp_brace_brace = ignore # ignore/add/remove/force |
| 205 | |
| 206 | # Add or remove space before pointer star '*'. |
Michal Vasko | 22df3f0 | 2020-08-24 13:29:22 +0200 | [diff] [blame] | 207 | sp_before_ptr_star = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 208 | |
| 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. |
| 211 | sp_before_unnamed_ptr_star = ignore # ignore/add/remove/force |
| 212 | |
Michal Vasko | 84bf6f4 | 2023-05-19 11:09:48 +0200 | [diff] [blame] | 213 | # 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. |
| 216 | sp_qualifier_unnamed_ptr_star = ignore # ignore/add/remove/force/not_defined |
| 217 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 218 | # Add or remove space between pointer stars '*'. |
Michal Vasko | e29489b | 2020-08-24 10:43:54 +0200 | [diff] [blame] | 219 | sp_between_ptr_star = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 220 | |
| 221 | # Add or remove space after pointer star '*', if followed by a word. |
| 222 | # |
| 223 | # Overrides sp_type_func. |
Michal Vasko | 22df3f0 | 2020-08-24 13:29:22 +0200 | [diff] [blame] | 224 | sp_after_ptr_star = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 225 | |
| 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 Vasko | 22df3f0 | 2020-08-24 13:29:22 +0200 | [diff] [blame] | 230 | sp_after_ptr_star_qualifier = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 231 | |
| 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. |
| 236 | sp_after_ptr_star_func = ignore # ignore/add/remove/force |
| 237 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 238 | # Add or remove space after a pointer star '*' in the trailing return of a |
| 239 | # function prototype or function definition. |
| 240 | sp_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. |
| 244 | sp_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. |
| 248 | sp_ptr_star_func_type = remove # ignore/add/remove/force/not_defined |
| 249 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 250 | # Add or remove space after a pointer star '*', if followed by an open |
| 251 | # parenthesis, as in 'void* (*)(). |
Michal Vasko | e29489b | 2020-08-24 10:43:54 +0200 | [diff] [blame] | 252 | sp_ptr_star_paren = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 253 | |
| 254 | # Add or remove space before a pointer star '*', if followed by a function |
| 255 | # prototype or function definition. |
Michal Vasko | 22df3f0 | 2020-08-24 13:29:22 +0200 | [diff] [blame] | 256 | sp_before_ptr_star_func = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 257 | |
Michal Vasko | 84bf6f4 | 2023-05-19 11:09:48 +0200 | [diff] [blame] | 258 | # 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. |
| 261 | sp_qualifier_ptr_star_func = ignore # ignore/add/remove/force/not_defined |
| 262 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 263 | # Add or remove space before a pointer star '*' in the trailing return of a |
| 264 | # function prototype or function definition. |
| 265 | sp_before_ptr_star_trailing = ignore # ignore/add/remove/force/not_defined |
| 266 | |
Michal Vasko | 84bf6f4 | 2023-05-19 11:09:48 +0200 | [diff] [blame] | 267 | # 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 *'. |
| 270 | sp_qualifier_ptr_star_trailing = force # ignore/add/remove/force/not_defined |
| 271 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 272 | # Add or remove space before a reference sign '&'. |
| 273 | sp_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. |
| 277 | sp_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. |
| 282 | sp_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. |
| 288 | sp_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. |
| 292 | sp_before_byref_func = ignore # ignore/add/remove/force |
| 293 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 294 | # Add or remove space after a reference sign '&', if followed by an open |
| 295 | # parenthesis, as in 'char& (*)()'. |
| 296 | sp_byref_paren = ignore # ignore/add/remove/force/not_defined |
| 297 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 298 | # Add or remove space between type and word. |
| 299 | # |
| 300 | # Default: force |
| 301 | sp_after_type = ignore # ignore/add/remove/force |
| 302 | |
| 303 | # Add or remove space between 'decltype(...)' and word. |
| 304 | sp_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('. |
| 308 | sp_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. |
| 312 | sp_template_angle = ignore # ignore/add/remove/force |
| 313 | |
| 314 | # Add or remove space before '<'. |
| 315 | sp_before_angle = ignore # ignore/add/remove/force |
| 316 | |
| 317 | # Add or remove space inside '<' and '>'. |
| 318 | sp_inside_angle = ignore # ignore/add/remove/force |
| 319 | |
| 320 | # Add or remove space inside '<>'. |
| 321 | sp_inside_angle_empty = ignore # ignore/add/remove/force |
| 322 | |
| 323 | # Add or remove space between '>' and ':'. |
| 324 | sp_angle_colon = ignore # ignore/add/remove/force |
| 325 | |
| 326 | # Add or remove space after '>'. |
| 327 | sp_after_angle = ignore # ignore/add/remove/force |
| 328 | |
| 329 | # Add or remove space between '>' and '(' as found in 'new List<byte>(foo);'. |
| 330 | sp_angle_paren = ignore # ignore/add/remove/force |
| 331 | |
| 332 | # Add or remove space between '>' and '()' as found in 'new List<byte>();'. |
| 333 | sp_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 ...'. |
| 337 | sp_angle_word = ignore # ignore/add/remove/force |
| 338 | |
| 339 | # Add or remove space between '>' and '>' in '>>' (template stuff). |
| 340 | # |
| 341 | # Default: add |
| 342 | sp_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. |
| 346 | sp_permit_cpp11_shift = false # true/false |
| 347 | |
| 348 | # Add or remove space before '(' of control statements ('if', 'for', 'switch', |
| 349 | # 'while', etc.). |
Michal Vasko | d989ba0 | 2020-08-24 10:59:24 +0200 | [diff] [blame] | 350 | sp_before_sparen = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 351 | |
| 352 | # Add or remove space inside '(' and ')' of control statements. |
Michal Vasko | d989ba0 | 2020-08-24 10:59:24 +0200 | [diff] [blame] | 353 | sp_inside_sparen = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 354 | |
| 355 | # Add or remove space after '(' of control statements. |
| 356 | # |
| 357 | # Overrides sp_inside_sparen. |
| 358 | sp_inside_sparen_open = ignore # ignore/add/remove/force |
| 359 | |
| 360 | # Add or remove space before ')' of control statements. |
| 361 | # |
| 362 | # Overrides sp_inside_sparen. |
| 363 | sp_inside_sparen_close = ignore # ignore/add/remove/force |
| 364 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 365 | # Add or remove space inside '(' and ')' of 'for' statements. |
| 366 | sp_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. |
| 371 | sp_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. |
| 376 | sp_inside_for_close = ignore # ignore/add/remove/force/not_defined |
| 377 | |
| 378 | # Add or remove space between '((' or '))' of control statements. |
| 379 | sp_sparen_paren = ignore # ignore/add/remove/force/not_defined |
| 380 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 381 | # Add or remove space after ')' of control statements. |
Michal Vasko | d989ba0 | 2020-08-24 10:59:24 +0200 | [diff] [blame] | 382 | sp_after_sparen = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 383 | |
| 384 | # Add or remove space between ')' and '{' of of control statements. |
Michal Vasko | d989ba0 | 2020-08-24 10:59:24 +0200 | [diff] [blame] | 385 | sp_sparen_brace = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 386 | |
| 387 | # (D) Add or remove space between 'invariant' and '('. |
| 388 | sp_invariant_paren = ignore # ignore/add/remove/force |
| 389 | |
| 390 | # (D) Add or remove space after the ')' in 'invariant (C) c'. |
| 391 | sp_after_invariant_paren = ignore # ignore/add/remove/force |
| 392 | |
| 393 | # Add or remove space before empty statement ';' on 'if', 'for' and 'while'. |
| 394 | sp_special_semi = ignore # ignore/add/remove/force |
| 395 | |
| 396 | # Add or remove space before ';'. |
| 397 | # |
| 398 | # Default: remove |
Michal Vasko | d989ba0 | 2020-08-24 10:59:24 +0200 | [diff] [blame] | 399 | sp_before_semi = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 400 | |
| 401 | # Add or remove space before ';' in non-empty 'for' statements. |
Michal Vasko | d989ba0 | 2020-08-24 10:59:24 +0200 | [diff] [blame] | 402 | sp_before_semi_for = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 403 | |
| 404 | # Add or remove space before a semicolon of an empty part of a for statement. |
Michal Vasko | d989ba0 | 2020-08-24 10:59:24 +0200 | [diff] [blame] | 405 | sp_before_semi_for_empty = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 406 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 407 | # Add or remove space between the semicolons of an empty middle part of a for |
| 408 | # statement, as in 'for ( ; <here> ; )'. |
| 409 | sp_between_semi_for_empty = ignore # ignore/add/remove/force/not_defined |
| 410 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 411 | # Add or remove space after ';', except when followed by a comment. |
| 412 | # |
| 413 | # Default: add |
Michal Vasko | d989ba0 | 2020-08-24 10:59:24 +0200 | [diff] [blame] | 414 | sp_after_semi = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 415 | |
| 416 | # Add or remove space after ';' in non-empty 'for' statements. |
| 417 | # |
| 418 | # Default: force |
Michal Vasko | d989ba0 | 2020-08-24 10:59:24 +0200 | [diff] [blame] | 419 | sp_after_semi_for = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 420 | |
| 421 | # Add or remove space after the final semicolon of an empty part of a for |
| 422 | # statement, as in 'for ( ; ; <here> )'. |
Michal Vasko | d989ba0 | 2020-08-24 10:59:24 +0200 | [diff] [blame] | 423 | sp_after_semi_for_empty = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 424 | |
| 425 | # Add or remove space before '[' (except '[]'). |
| 426 | sp_before_square = ignore # ignore/add/remove/force |
| 427 | |
| 428 | # Add or remove space before '[' for a variable definition. |
| 429 | # |
| 430 | # Default: remove |
| 431 | sp_before_vardef_square = ignore # ignore/add/remove/force |
| 432 | |
| 433 | # Add or remove space before '[' for asm block. |
| 434 | sp_before_square_asm_block = ignore # ignore/add/remove/force |
| 435 | |
| 436 | # Add or remove space before '[]'. |
| 437 | sp_before_squares = ignore # ignore/add/remove/force |
| 438 | |
| 439 | # Add or remove space before C++17 structured bindings. |
| 440 | sp_cpp_before_struct_binding = ignore # ignore/add/remove/force |
| 441 | |
| 442 | # Add or remove space inside a non-empty '[' and ']'. |
| 443 | sp_inside_square = ignore # ignore/add/remove/force |
| 444 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 445 | # Add or remove space inside '[]'. |
| 446 | sp_inside_square_empty = remove # ignore/add/remove/force/not_defined |
| 447 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 448 | # (OC) Add or remove space inside a non-empty Objective-C boxed array '@[' and |
| 449 | # ']'. If set to ignore, sp_inside_square is used. |
| 450 | sp_inside_square_oc_array = ignore # ignore/add/remove/force |
| 451 | |
| 452 | # Add or remove space after ',', i.e. 'a,b' vs. 'a, b'. |
Michal Vasko | d989ba0 | 2020-08-24 10:59:24 +0200 | [diff] [blame] | 453 | sp_after_comma = add # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 454 | |
| 455 | # Add or remove space before ','. |
| 456 | # |
| 457 | # Default: remove |
Michal Vasko | d989ba0 | 2020-08-24 10:59:24 +0200 | [diff] [blame] | 458 | sp_before_comma = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 459 | |
| 460 | # (C#) Add or remove space between ',' and ']' in multidimensional array type |
| 461 | # like 'int[,,]'. |
| 462 | sp_after_mdatype_commas = ignore # ignore/add/remove/force |
| 463 | |
| 464 | # (C#) Add or remove space between '[' and ',' in multidimensional array type |
| 465 | # like 'int[,,]'. |
| 466 | sp_before_mdatype_commas = ignore # ignore/add/remove/force |
| 467 | |
| 468 | # (C#) Add or remove space between ',' in multidimensional array type |
| 469 | # like 'int[,,]'. |
| 470 | sp_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 Vasko | d989ba0 | 2020-08-24 10:59:24 +0200 | [diff] [blame] | 476 | sp_paren_comma = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 477 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 478 | # Add or remove space between a type and ':'. |
| 479 | sp_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 |
| 484 | sp_after_ellipsis = ignore # ignore/add/remove/force/not_defined |
| 485 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 486 | # Add or remove space before the variadic '...' when preceded by a |
| 487 | # non-punctuator. |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 488 | sp_before_ellipsis = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 489 | |
| 490 | # Add or remove space between a type and '...'. |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 491 | sp_type_ellipsis = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 492 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 493 | # Add or remove space between a '*' and '...'. |
| 494 | sp_ptr_type_ellipsis = ignore # ignore/add/remove/force/not_defined |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 495 | |
| 496 | # Add or remove space between ')' and '...'. |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 497 | sp_paren_ellipsis = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 498 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 499 | # Add or remove space between '&&' and '...'. |
| 500 | sp_byref_ellipsis = ignore # ignore/add/remove/force/not_defined |
| 501 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 502 | # Add or remove space between ')' and a qualifier such as 'const'. |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 503 | sp_paren_qualifier = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 504 | |
| 505 | # Add or remove space between ')' and 'noexcept'. |
| 506 | sp_paren_noexcept = ignore # ignore/add/remove/force |
| 507 | |
| 508 | # Add or remove space after class ':'. |
| 509 | sp_after_class_colon = ignore # ignore/add/remove/force |
| 510 | |
| 511 | # Add or remove space before class ':'. |
| 512 | sp_before_class_colon = ignore # ignore/add/remove/force |
| 513 | |
| 514 | # Add or remove space after class constructor ':'. |
| 515 | sp_after_constr_colon = ignore # ignore/add/remove/force |
| 516 | |
| 517 | # Add or remove space before class constructor ':'. |
| 518 | sp_before_constr_colon = ignore # ignore/add/remove/force |
| 519 | |
| 520 | # Add or remove space before case ':'. |
| 521 | # |
| 522 | # Default: remove |
| 523 | sp_before_case_colon = remove # ignore/add/remove/force |
| 524 | |
| 525 | # Add or remove space between 'operator' and operator sign. |
| 526 | sp_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 ++('. |
| 530 | sp_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 *()'. |
| 534 | sp_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'. |
| 538 | sp_after_cast = ignore # ignore/add/remove/force |
| 539 | |
| 540 | # Add or remove spaces inside cast parentheses. |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 541 | sp_inside_paren_cast = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 542 | |
| 543 | # Add or remove space between the type and open parenthesis in a C++ cast, |
| 544 | # i.e. 'int(exp)' vs. 'int (exp)'. |
| 545 | sp_cpp_cast_paren = ignore # ignore/add/remove/force |
| 546 | |
| 547 | # Add or remove space between 'sizeof' and '('. |
| 548 | sp_sizeof_paren = ignore # ignore/add/remove/force |
| 549 | |
| 550 | # Add or remove space between 'sizeof' and '...'. |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 551 | sp_sizeof_ellipsis = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 552 | |
| 553 | # Add or remove space between 'sizeof...' and '('. |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 554 | sp_sizeof_ellipsis_paren = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 555 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 556 | # Add or remove space between '...' and a parameter pack. |
| 557 | sp_ellipsis_parameter_pack = ignore # ignore/add/remove/force/not_defined |
| 558 | |
| 559 | # Add or remove space between a parameter pack and '...'. |
| 560 | sp_parameter_pack_ellipsis = ignore # ignore/add/remove/force/not_defined |
| 561 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 562 | # Add or remove space between 'decltype' and '('. |
| 563 | sp_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 Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 569 | sp_inside_braces_enum = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 570 | |
| 571 | # Add or remove space inside struct/union '{' and '}'. |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 572 | sp_inside_braces_struct = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 573 | |
| 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. |
| 579 | sp_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. |
| 583 | sp_before_type_brace_init_lst_close = ignore # ignore/add/remove/force |
| 584 | |
| 585 | # Add or remove space inside an unnamed temporary direct-list-initialization. |
| 586 | sp_inside_type_brace_init_lst = ignore # ignore/add/remove/force |
| 587 | |
| 588 | # Add or remove space inside '{' and '}'. |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 589 | sp_inside_braces = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 590 | |
| 591 | # Add or remove space inside '{}'. |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 592 | sp_inside_braces_empty = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 593 | |
| 594 | # Add or remove space around trailing return operator '->'. |
| 595 | sp_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 Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 599 | sp_type_func = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 600 | |
| 601 | # Add or remove space between type and open brace of an unnamed temporary |
| 602 | # direct-list-initialization. |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 603 | sp_type_brace_init_lst = ignore # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 604 | |
| 605 | # Add or remove space between function name and '(' on function declaration. |
Michal Vasko | e29489b | 2020-08-24 10:43:54 +0200 | [diff] [blame] | 606 | sp_func_proto_paren = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 607 | |
| 608 | # Add or remove space between function name and '()' on function declaration |
| 609 | # without parameters. |
Michal Vasko | e29489b | 2020-08-24 10:43:54 +0200 | [diff] [blame] | 610 | sp_func_proto_paren_empty = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 611 | |
| 612 | # Add or remove space between function name and '(' with a typedef specifier. |
Michal Vasko | e29489b | 2020-08-24 10:43:54 +0200 | [diff] [blame] | 613 | sp_func_type_paren = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 614 | |
| 615 | # Add or remove space between alias name and '(' of a non-pointer function type typedef. |
| 616 | sp_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 Vasko | e29489b | 2020-08-24 10:43:54 +0200 | [diff] [blame] | 620 | sp_func_def_paren_empty = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 621 | |
| 622 | # Add or remove space inside empty function '()'. |
| 623 | # Overrides sp_after_angle unless use_sp_after_angle_always is set to true. |
Michal Vasko | e29489b | 2020-08-24 10:43:54 +0200 | [diff] [blame] | 624 | sp_inside_fparens = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 625 | |
| 626 | # Add or remove space inside function '(' and ')'. |
Michal Vasko | e29489b | 2020-08-24 10:43:54 +0200 | [diff] [blame] | 627 | sp_inside_fparen = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 628 | |
Michal Vasko | 84bf6f4 | 2023-05-19 11:09:48 +0200 | [diff] [blame] | 629 | # Add or remove space inside user functor '(' and ')'. |
| 630 | sp_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. |
| 634 | sp_inside_rparens = ignore # ignore/add/remove/force/not_defined |
| 635 | |
| 636 | # Add or remove space inside functor '(' and ')'. |
| 637 | sp_inside_rparen = ignore # ignore/add/remove/force/not_defined |
| 638 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 639 | # Add or remove space inside the first parentheses in a function type, as in |
| 640 | # 'void (*x)(...)'. |
Michal Vasko | e29489b | 2020-08-24 10:43:54 +0200 | [diff] [blame] | 641 | sp_inside_tparen = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 642 | |
| 643 | # Add or remove space between the ')' and '(' in a function type, as in |
| 644 | # 'void (*x)(...)'. |
Michal Vasko | e29489b | 2020-08-24 10:43:54 +0200 | [diff] [blame] | 645 | sp_after_tparen_close = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 646 | |
| 647 | # Add or remove space between ']' and '(' when part of a function call. |
| 648 | sp_square_fparen = ignore # ignore/add/remove/force |
| 649 | |
| 650 | # Add or remove space between ')' and '{' of function. |
| 651 | sp_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. |
| 657 | sp_fparen_brace_initializer = ignore # ignore/add/remove/force |
| 658 | |
| 659 | # (Java) Add or remove space between ')' and '{{' of double brace initializer. |
| 660 | sp_fparen_dbrace = ignore # ignore/add/remove/force |
| 661 | |
| 662 | # Add or remove space between function name and '(' on function calls. |
| 663 | sp_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. |
| 667 | sp_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 |
| 673 | sp_func_call_user_paren = ignore # ignore/add/remove/force |
| 674 | |
| 675 | # Add or remove space inside user function '(' and ')'. |
| 676 | sp_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. '( ('. |
| 680 | sp_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. |
| 684 | sp_func_class_paren = ignore # ignore/add/remove/force |
| 685 | |
| 686 | # Add or remove space between a constructor without parameters or destructor |
| 687 | # and '()'. |
| 688 | sp_func_class_paren_empty = ignore # ignore/add/remove/force |
| 689 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 690 | # Add or remove space after 'return'. |
| 691 | # |
| 692 | # Default: force |
| 693 | sp_return = force # ignore/add/remove/force/not_defined |
| 694 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 695 | # Add or remove space between 'return' and '('. |
Michal Vasko | e29489b | 2020-08-24 10:43:54 +0200 | [diff] [blame] | 696 | sp_return_paren = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 697 | |
| 698 | # Add or remove space between 'return' and '{'. |
Michal Vasko | e29489b | 2020-08-24 10:43:54 +0200 | [diff] [blame] | 699 | sp_return_brace = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 700 | |
| 701 | # Add or remove space between '__attribute__' and '('. |
Michal Vasko | e29489b | 2020-08-24 10:43:54 +0200 | [diff] [blame] | 702 | sp_attribute_paren = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 703 | |
| 704 | # Add or remove space between 'defined' and '(' in '#if defined (FOO)'. |
Michal Vasko | e29489b | 2020-08-24 10:43:54 +0200 | [diff] [blame] | 705 | sp_defined_paren = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 706 | |
| 707 | # Add or remove space between 'throw' and '(' in 'throw (something)'. |
| 708 | sp_throw_paren = ignore # ignore/add/remove/force |
| 709 | |
| 710 | # Add or remove space between 'throw' and anything other than '(' as in |
| 711 | # '@throw [...];'. |
| 712 | sp_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. |
| 716 | sp_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. |
| 720 | sp_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>'. |
| 724 | sp_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' |
| 728 | sp_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. |
| 732 | sp_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. |
| 736 | sp_scope_paren = ignore # ignore/add/remove/force |
| 737 | |
| 738 | # Add or remove space between 'super' and '(' in 'super (something)'. |
| 739 | # |
| 740 | # Default: remove |
| 741 | sp_super_paren = ignore # ignore/add/remove/force |
| 742 | |
| 743 | # Add or remove space between 'this' and '(' in 'this (something)'. |
| 744 | # |
| 745 | # Default: remove |
| 746 | sp_this_paren = ignore # ignore/add/remove/force |
| 747 | |
| 748 | # Add or remove space between a macro name and its definition. |
Michal Vasko | e29489b | 2020-08-24 10:43:54 +0200 | [diff] [blame] | 749 | sp_macro = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 750 | |
| 751 | # Add or remove space between a macro function ')' and its definition. |
Michal Vasko | e29489b | 2020-08-24 10:43:54 +0200 | [diff] [blame] | 752 | sp_macro_func = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 753 | |
| 754 | # Add or remove space between 'else' and '{' if on the same line. |
Michal Vasko | d989ba0 | 2020-08-24 10:59:24 +0200 | [diff] [blame] | 755 | sp_else_brace = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 756 | |
| 757 | # Add or remove space between '}' and 'else' if on the same line. |
Michal Vasko | e29489b | 2020-08-24 10:43:54 +0200 | [diff] [blame] | 758 | sp_brace_else = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 759 | |
| 760 | # Add or remove space between '}' and the name of a typedef on the same line. |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 761 | sp_brace_typedef = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 762 | |
| 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> {'. |
| 765 | sp_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. |
| 770 | sp_oc_catch_brace = ignore # ignore/add/remove/force |
| 771 | |
| 772 | # Add or remove space between '}' and 'catch' if on the same line. |
| 773 | sp_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. |
| 777 | sp_oc_brace_catch = ignore # ignore/add/remove/force |
| 778 | |
| 779 | # Add or remove space between 'finally' and '{' if on the same line. |
| 780 | sp_finally_brace = ignore # ignore/add/remove/force |
| 781 | |
| 782 | # Add or remove space between '}' and 'finally' if on the same line. |
| 783 | sp_brace_finally = ignore # ignore/add/remove/force |
| 784 | |
| 785 | # Add or remove space between 'try' and '{' if on the same line. |
| 786 | sp_try_brace = ignore # ignore/add/remove/force |
| 787 | |
| 788 | # Add or remove space between get/set and '{' if on the same line. |
| 789 | sp_getset_brace = ignore # ignore/add/remove/force |
| 790 | |
| 791 | # Add or remove space between a variable and '{' for C++ uniform |
| 792 | # initialization. |
| 793 | sp_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 |
| 798 | sp_word_brace_ns = ignore # ignore/add/remove/force |
| 799 | |
| 800 | # Add or remove space before the '::' operator. |
| 801 | sp_before_dc = ignore # ignore/add/remove/force |
| 802 | |
| 803 | # Add or remove space after the '::' operator. |
| 804 | sp_after_dc = ignore # ignore/add/remove/force |
| 805 | |
| 806 | # (D) Add or remove around the D named array initializer ':' operator. |
| 807 | sp_d_array_colon = remove # ignore/add/remove/force |
| 808 | |
| 809 | # Add or remove space after the '!' (not) unary operator. |
| 810 | # |
| 811 | # Default: remove |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 812 | sp_not = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 813 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 814 | # Add or remove space between two '!' (not) unary operators. |
| 815 | # If set to ignore, sp_not will be used. |
| 816 | sp_not_not = remove # ignore/add/remove/force/not_defined |
| 817 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 818 | # Add or remove space after the '~' (invert) unary operator. |
| 819 | # |
| 820 | # Default: remove |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 821 | sp_inv = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 822 | |
| 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 Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 827 | sp_addr = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 828 | |
| 829 | # Add or remove space around the '.' or '->' operators. |
| 830 | # |
| 831 | # Default: remove |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 832 | sp_member = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 833 | |
| 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 Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 838 | sp_deref = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 839 | |
| 840 | # Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'. |
| 841 | # |
| 842 | # Default: remove |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 843 | sp_sign = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 844 | |
| 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 Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 849 | sp_incdec = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 850 | |
| 851 | # Add or remove space before a backslash-newline at the end of a line. |
| 852 | # |
| 853 | # Default: add |
| 854 | sp_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;'. |
| 858 | sp_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;'. |
| 862 | sp_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;'. |
| 866 | sp_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"};'. |
| 870 | sp_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"};'. |
| 874 | sp_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];'. |
| 878 | sp_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];'. |
| 882 | sp_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;'. |
| 886 | sp_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;'. |
| 890 | sp_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. |
| 895 | sp_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:'. |
| 899 | sp_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. |
| 904 | sp_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){...}'. |
| 908 | sp_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){...}'. |
| 912 | sp_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 ...]'. |
| 916 | sp_after_oc_msg_receiver = ignore # ignore/add/remove/force |
| 917 | |
| 918 | # (OC) Add or remove space after '@property'. |
| 919 | sp_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)'. |
| 923 | sp_after_oc_synchronized = ignore # ignore/add/remove/force |
| 924 | |
| 925 | # Add or remove space around the ':' in 'b ? t : f'. |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 926 | sp_cond_colon = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 927 | |
| 928 | # Add or remove space before the ':' in 'b ? t : f'. |
| 929 | # |
| 930 | # Overrides sp_cond_colon. |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 931 | sp_cond_colon_before = ignore # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 932 | |
| 933 | # Add or remove space after the ':' in 'b ? t : f'. |
| 934 | # |
| 935 | # Overrides sp_cond_colon. |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 936 | sp_cond_colon_after = ignore # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 937 | |
| 938 | # Add or remove space around the '?' in 'b ? t : f'. |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 939 | sp_cond_question = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 940 | |
| 941 | # Add or remove space before the '?' in 'b ? t : f'. |
| 942 | # |
| 943 | # Overrides sp_cond_question. |
| 944 | sp_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. |
| 949 | sp_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 Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 955 | sp_cond_ternary_short = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 956 | |
| 957 | # Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make |
| 958 | # sense here. |
Michal Vasko | e144595 | 2020-08-24 11:19:42 +0200 | [diff] [blame] | 959 | sp_case_label = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 960 | |
| 961 | # (D) Add or remove space around the D '..' operator. |
| 962 | sp_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)'. |
| 966 | sp_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)'. |
| 970 | sp_before_for_colon = ignore # ignore/add/remove/force |
| 971 | |
| 972 | # (D) Add or remove space between 'extern' and '(' as in 'extern (C)'. |
| 973 | sp_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 Vasko | 033278d | 2020-08-24 11:24:52 +0200 | [diff] [blame] | 977 | sp_cmt_cpp_start = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 978 | |
Michal Vasko | 84bf6f4 | 2023-05-19 11:09:48 +0200 | [diff] [blame] | 979 | # remove space after the '//' and the pvs command '-V1234', |
| 980 | # only works with sp_cmt_cpp_start set to add or force. |
| 981 | sp_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. |
| 985 | sp_cmt_cpp_lint = false # true/false |
| 986 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 987 | # 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. |
| 993 | sp_cmt_cpp_region = ignore # ignore/add/remove/force/not_defined |
| 994 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 995 | # If true, space is added with sp_cmt_cpp_start will be added after doxygen |
| 996 | # sequences like '///', '///<', '//!' and '//!<'. |
| 997 | sp_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 '//~'. |
| 1001 | sp_cmt_cpp_qttr = true # true/false |
| 1002 | |
| 1003 | # Add or remove space between #else or #endif and a trailing comment. |
Michal Vasko | 033278d | 2020-08-24 11:24:52 +0200 | [diff] [blame] | 1004 | sp_endif_cmt = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1005 | |
| 1006 | # Add or remove space after 'new', 'delete' and 'delete[]'. |
| 1007 | sp_after_new = ignore # ignore/add/remove/force |
| 1008 | |
| 1009 | # Add or remove space between 'new' and '(' in 'new()'. |
| 1010 | sp_between_new_paren = ignore # ignore/add/remove/force |
| 1011 | |
| 1012 | # Add or remove space between ')' and type in 'new(foo) BAR'. |
| 1013 | sp_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'. |
| 1017 | sp_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. |
| 1023 | sp_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. |
| 1029 | sp_inside_newop_paren_close = ignore # ignore/add/remove/force |
| 1030 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1031 | # Add or remove space before a trailing comment. |
| 1032 | sp_before_tr_cmt = ignore # ignore/add/remove/force/not_defined |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1033 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1034 | # Number of spaces before a trailing comment. |
| 1035 | sp_num_before_tr_cmt = 0 # unsigned number |
| 1036 | |
| 1037 | # Add or remove space before an embedded comment. |
| 1038 | # |
| 1039 | # Default: force |
| 1040 | sp_before_emb_cmt = force # ignore/add/remove/force/not_defined |
| 1041 | |
| 1042 | # Number of spaces before an embedded comment. |
| 1043 | # |
| 1044 | # Default: 1 |
| 1045 | sp_num_before_emb_cmt = 1 # unsigned number |
| 1046 | |
| 1047 | # Add or remove space after an embedded comment. |
| 1048 | # |
| 1049 | # Default: force |
| 1050 | sp_after_emb_cmt = force # ignore/add/remove/force/not_defined |
| 1051 | |
| 1052 | # Number of spaces after an embedded comment. |
| 1053 | # |
| 1054 | # Default: 1 |
| 1055 | sp_num_after_emb_cmt = 1 # unsigned number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1056 | |
| 1057 | # (Java) Add or remove space between an annotation and the open parenthesis. |
| 1058 | sp_annotation_paren = ignore # ignore/add/remove/force |
| 1059 | |
| 1060 | # If true, vbrace tokens are dropped to the previous token and skipped. |
| 1061 | sp_skip_vbrace_tokens = false # true/false |
| 1062 | |
| 1063 | # Add or remove space after 'noexcept'. |
| 1064 | sp_after_noexcept = ignore # ignore/add/remove/force |
| 1065 | |
| 1066 | # Add or remove space after '_'. |
| 1067 | sp_vala_after_translation = ignore # ignore/add/remove/force |
| 1068 | |
| 1069 | # If true, a <TAB> is inserted after #define. |
| 1070 | force_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 |
| 1079 | indent_columns = 4 # unsigned number |
| 1080 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1081 | # Whether to ignore indent for the first continuation line. Subsequent |
| 1082 | # continuation lines will still be indented to match the first. |
| 1083 | indent_ignore_first_continue = false # true/false |
| 1084 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1085 | # 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. |
| 1090 | indent_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. |
| 1094 | indent_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). |
| 1098 | indent_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1102 | indent_param = 4 # unsigned number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1103 | |
| 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 |
| 1111 | indent_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. |
| 1115 | indent_cmt_with_tabs = false # true/false |
| 1116 | |
| 1117 | # Whether to indent strings broken by '\' so that they line up. |
| 1118 | indent_align_string = false # true/false |
| 1119 | |
| 1120 | # The number of spaces to indent multi-line XML strings. |
| 1121 | # Requires indent_align_string=true. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1122 | indent_xml_string = 4 # unsigned number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1123 | |
| 1124 | # Spaces to indent '{' from level. |
| 1125 | indent_brace = 0 # unsigned number |
| 1126 | |
| 1127 | # Whether braces are indented to the body level. |
| 1128 | indent_braces = false # true/false |
| 1129 | |
| 1130 | # Whether to disable indenting function braces if indent_braces=true. |
| 1131 | indent_braces_no_func = false # true/false |
| 1132 | |
| 1133 | # Whether to disable indenting class braces if indent_braces=true. |
| 1134 | indent_braces_no_class = false # true/false |
| 1135 | |
| 1136 | # Whether to disable indenting struct braces if indent_braces=true. |
| 1137 | indent_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. |
| 1141 | indent_brace_parent = false # true/false |
| 1142 | |
| 1143 | # Whether to indent based on the open parenthesis instead of the open brace |
| 1144 | # in '({\n'. |
| 1145 | indent_paren_open_brace = false # true/false |
| 1146 | |
| 1147 | # (C#) Whether to indent the brace of a C# delegate by another level. |
| 1148 | indent_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. |
| 1152 | indent_cs_delegate_body = false # true/false |
| 1153 | |
| 1154 | # Whether to indent the body of a 'namespace'. |
| 1155 | indent_namespace = false # true/false |
| 1156 | |
| 1157 | # Whether to indent only the first namespace, and not any nested namespaces. |
| 1158 | # Requires indent_namespace=true. |
| 1159 | indent_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 |
| 1163 | indent_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. |
| 1167 | indent_namespace_limit = 0 # unsigned number |
| 1168 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1169 | # Whether to indent only in inner namespaces (nested in other namespaces). |
| 1170 | # Requires indent_namespace=true. |
| 1171 | indent_namespace_inner_only = false # true/false |
| 1172 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1173 | # Whether the 'extern "C"' body is indented. |
| 1174 | indent_extern = false # true/false |
| 1175 | |
| 1176 | # Whether the 'class' body is indented. |
| 1177 | indent_class = false # true/false |
| 1178 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1179 | # Whether to ignore indent for the leading base class colon. |
| 1180 | indent_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) |
| 1186 | indent_before_class_colon = 0 # number |
| 1187 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1188 | # Whether to indent the stuff after a leading base class colon. |
| 1189 | indent_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. |
| 1193 | indent_class_on_colon = false # true/false |
| 1194 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1195 | # Whether to ignore indent for a leading class initializer colon. |
| 1196 | indent_ignore_before_constr_colon = false # true/false |
| 1197 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1198 | # Whether to indent the stuff after a leading class initializer colon. |
| 1199 | indent_constr_colon = false # true/false |
| 1200 | |
| 1201 | # Virtual indent from the ':' for member initializers. |
| 1202 | # |
| 1203 | # Default: 2 |
| 1204 | indent_ctor_init_leading = 0 # unsigned number |
| 1205 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1206 | # Virtual indent from the ':' for following member initializers. |
| 1207 | # |
| 1208 | # Default: 2 |
| 1209 | indent_ctor_init_following = 2 # unsigned number |
| 1210 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1211 | # Additional indent for constructor initializer list. |
| 1212 | # Negative values decrease indent down to the first column. |
| 1213 | indent_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. |
| 1217 | indent_else_if = false # true/false |
| 1218 | |
| 1219 | # Amount to indent variable declarations after a open brace. |
| 1220 | # |
| 1221 | # <0: Relative |
| 1222 | # >=0: Absolute |
| 1223 | indent_var_def_blk = 0 # number |
| 1224 | |
| 1225 | # Whether to indent continued variable declarations instead of aligning. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1226 | indent_var_def_cont = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1227 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1228 | # 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 |
| 1233 | indent_shift = 1 # number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1234 | |
| 1235 | # Whether to force indentation of function definitions to start in column 1. |
| 1236 | indent_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1240 | indent_func_call_param = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1241 | |
| 1242 | # Whether to indent continued function definition parameters one indent level, |
| 1243 | # rather than aligning parameters under the open parenthesis. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1244 | indent_func_def_param = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1245 | |
| 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 |
| 1250 | indent_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1254 | indent_func_proto_param = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1255 | |
| 1256 | # Whether to indent continued function call declaration one indent level, |
| 1257 | # rather than aligning parameters under the open parenthesis. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1258 | indent_func_class_param = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1259 | |
| 1260 | # Whether to indent continued class variable constructors one indent level, |
| 1261 | # rather than aligning parameters under the open parenthesis. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1262 | indent_func_ctor_var_param = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1263 | |
| 1264 | # Whether to indent continued template parameter list one indent level, |
| 1265 | # rather than aligning parameters under the open parenthesis. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1266 | indent_template_param = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1267 | |
| 1268 | # Double the indent for indent_func_xxx_param options. |
| 1269 | # Use both values of the options indent_columns and indent_param. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1270 | indent_func_param_double = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1271 | |
| 1272 | # Indentation column for standalone 'const' qualifier on a function |
| 1273 | # prototype. |
| 1274 | indent_func_const = 0 # unsigned number |
| 1275 | |
| 1276 | # Indentation column for standalone 'throw' qualifier on a function |
| 1277 | # prototype. |
| 1278 | indent_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 |
| 1288 | indent_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. |
| 1292 | indent_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1296 | indent_member_single = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1297 | |
| 1298 | # Spaces to indent single line ('//') comments on lines before code. |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1299 | indent_single_line_comments_before = 0 # unsigned number |
| 1300 | |
| 1301 | # Spaces to indent single line ('//') comments on lines after code. |
| 1302 | indent_single_line_comments_after = 0 # unsigned number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1303 | |
| 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. |
| 1306 | indent_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. |
| 1310 | indent_relative_single_line_comments = false # true/false |
| 1311 | |
| 1312 | # Spaces to indent 'case' from 'switch'. Usually 0 or indent_columns. |
| 1313 | indent_switch_case = 0 # unsigned number |
| 1314 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1315 | # Spaces to indent the body of a 'switch' before any 'case'. |
| 1316 | # Usually the same as indent_columns or indent_switch_case. |
| 1317 | indent_switch_body = 0 # unsigned number |
| 1318 | |
| 1319 | # Whether to ignore indent for '{' following 'case'. |
| 1320 | indent_ignore_case_brace = false # true/false |
| 1321 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1322 | # indent 'break' with 'case' from 'switch'. |
| 1323 | indent_switch_break_with_case = false # true/false |
| 1324 | |
| 1325 | # Whether to indent preprocessor statements inside of switch statements. |
| 1326 | # |
| 1327 | # Default: true |
| 1328 | indent_switch_pp = false # true/false |
| 1329 | |
| 1330 | # Spaces to shift the 'case' line, without affecting any other lines. |
| 1331 | # Usually 0. |
| 1332 | indent_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. |
| 1336 | indent_case_brace = 0 # number |
| 1337 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1338 | # Whether to indent comments not found in first column. |
| 1339 | # |
| 1340 | # Default: true |
| 1341 | indent_comment = true # true/false |
| 1342 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1343 | # Whether to indent comments found in first column. |
| 1344 | indent_col1_comment = false # true/false |
| 1345 | |
| 1346 | # Whether to indent multi string literal in first column. |
| 1347 | indent_col1_multi_string_literal = false # true/false |
| 1348 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1349 | # Align comments on adjacent lines that are this many columns apart or less. |
| 1350 | # |
| 1351 | # Default: 3 |
| 1352 | indent_comment_align_thresh = 3 # unsigned number |
| 1353 | |
| 1354 | # Whether to ignore indent for goto labels. |
| 1355 | indent_ignore_label = true # true/false |
| 1356 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1357 | # 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 |
| 1363 | indent_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 |
| 1372 | indent_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'. |
| 1376 | indent_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). |
| 1380 | indent_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 |
| 1387 | indent_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. |
| 1391 | indent_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. |
| 1395 | indent_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. |
| 1399 | indent_paren_after_func_call = false # true/false |
| 1400 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1401 | # 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 |
| 1405 | indent_comma_brace = 0 # number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1406 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1407 | # 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 |
| 1411 | indent_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 |
| 1417 | indent_bool_paren = 0 # number |
| 1418 | |
| 1419 | # Whether to ignore the indentation of a Boolean operator when outside |
| 1420 | # parentheses. |
| 1421 | indent_ignore_bool = false # true/false |
| 1422 | |
| 1423 | # Whether to ignore the indentation of an arithmetic operator. |
| 1424 | indent_ignore_arith = false # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1425 | |
| 1426 | # Whether to indent a semicolon when inside a for parenthesis. |
| 1427 | # If true, aligns under the open for parenthesis. |
| 1428 | indent_semicolon_for_paren = false # true/false |
| 1429 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1430 | # Whether to ignore the indentation of a semicolon outside of a 'for' |
| 1431 | # statement. |
| 1432 | indent_ignore_semicolon = false # true/false |
| 1433 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1434 | # Whether to align the first expression to following ones |
| 1435 | # if indent_bool_paren=true. |
| 1436 | indent_first_bool_expr = false # true/false |
| 1437 | |
| 1438 | # Whether to align the first expression to following ones |
| 1439 | # if indent_semicolon_for_paren=true. |
| 1440 | indent_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). |
| 1444 | indent_square_nl = false # true/false |
| 1445 | |
| 1446 | # (ESQL/C) Whether to preserve the relative indent of 'EXEC SQL' bodies. |
| 1447 | indent_preserve_sql = false # true/false |
| 1448 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1449 | # Whether to ignore the indentation of an assignment operator. |
| 1450 | indent_ignore_assign = false # true/false |
| 1451 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1452 | # 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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1456 | indent_align_assign = false # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1457 | |
| 1458 | # If true, the indentation of the chunks after a '=' sequence will be set at |
| 1459 | # LHS token indentation column before '='. |
| 1460 | indent_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 |
| 1466 | indent_align_paren = true # true/false |
| 1467 | |
| 1468 | # (OC) Whether to indent Objective-C code inside message selectors. |
| 1469 | indent_oc_inside_msg_sel = false # true/false |
| 1470 | |
| 1471 | # (OC) Whether to indent Objective-C blocks at brace level instead of usual |
| 1472 | # rules. |
| 1473 | indent_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 |
| 1480 | indent_oc_block_msg = 0 # unsigned number |
| 1481 | |
| 1482 | # (OC) Minimum indent for subsequent parameters |
| 1483 | indent_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 |
| 1489 | indent_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. |
| 1494 | indent_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. |
| 1498 | indent_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. |
| 1502 | indent_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. |
| 1506 | indent_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. |
| 1510 | indent_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1514 | indent_min_vbrace_open = 4 # unsigned number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1515 | |
| 1516 | # Whether to add further spaces after regular indent to reach next tabstop |
| 1517 | # when identing after virtual brace open and newline. |
| 1518 | indent_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 |
| 1525 | indent_token_after_brace = false # true/false |
| 1526 | |
| 1527 | # Whether to indent the body of a C++11 lambda. |
| 1528 | indent_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 |
| 1537 | indent_compound_literal_return = true # true/false |
| 1538 | |
| 1539 | # (C#) Whether to indent a 'using' block if no braces are used. |
| 1540 | # |
| 1541 | # Default: true |
| 1542 | indent_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1549 | indent_ternary_operator = 0 # unsigned number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1550 | |
| 1551 | # Whether to indent the statments inside ternary operator. |
| 1552 | indent_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. |
| 1555 | indent_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. |
| 1558 | indent_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. |
| 1561 | indent_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). |
| 1565 | indent_ignore_asm_block = true # true/false |
| 1566 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1567 | # Don't indent the close parenthesis of a function definition, |
| 1568 | # if the parenthesis is on its own line. |
| 1569 | donot_indent_func_def_close_paren = false # true/false |
| 1570 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1571 | # |
| 1572 | # Newline adding and removing options |
| 1573 | # |
| 1574 | |
Michal Vasko | 2bf4af4 | 2023-01-04 12:08:38 +0100 | [diff] [blame] | 1575 | # 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 Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1578 | nl_collapse_empty_body = true # true/false |
| 1579 | |
Michal Vasko | 2bf4af4 | 2023-01-04 12:08:38 +0100 | [diff] [blame] | 1580 | # Whether to collapse empty blocks between '{' and '}' for functions only. |
| 1581 | # If true, overrides nl_inside_empty_func. |
| 1582 | nl_collapse_empty_body_functions = false # true/false |
| 1583 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1584 | # Don't split one-line braced assignments, as in 'foo_t f = { 1, 2 };'. |
| 1585 | nl_assign_leave_one_liners = true # true/false |
| 1586 | |
| 1587 | # Don't split one-line braced statements inside a 'class xx { }' body. |
| 1588 | nl_class_leave_one_liners = true # true/false |
| 1589 | |
| 1590 | # Don't split one-line enums, as in 'enum foo { BAR = 15 };' |
| 1591 | nl_enum_leave_one_liners = true # true/false |
| 1592 | |
| 1593 | # Don't split one-line get or set functions. |
| 1594 | nl_getset_leave_one_liners = true # true/false |
| 1595 | |
| 1596 | # (C#) Don't split one-line property get or set functions. |
| 1597 | nl_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 |
| 1601 | nl_func_leave_one_liners = true # true/false |
| 1602 | |
| 1603 | # Don't split one-line C++11 lambdas, as in '[]() { return 0; }'. |
| 1604 | nl_cpp_lambda_leave_one_liners = true # true/false |
| 1605 | |
| 1606 | # Don't split one-line if/else statements, as in 'if(...) b++;'. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1607 | nl_if_leave_one_liners = false # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1608 | |
| 1609 | # Don't split one-line while statements, as in 'while(...) b++;'. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1610 | nl_while_leave_one_liners = false # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1611 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1612 | # Don't split one-line do statements, as in 'do { b++; } while(...);'. |
| 1613 | nl_do_leave_one_liners = false # true/false |
| 1614 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1615 | # Don't split one-line for statements, as in 'for(...) b++;'. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1616 | nl_for_leave_one_liners = false # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1617 | |
| 1618 | # (OC) Don't split one-line Objective-C messages. |
| 1619 | nl_oc_msg_leave_one_liner = true # true/false |
| 1620 | |
| 1621 | # (OC) Add or remove newline between method declaration and '{'. |
| 1622 | nl_oc_mdef_brace = ignore # ignore/add/remove/force |
| 1623 | |
| 1624 | # (OC) Add or remove newline between Objective-C block signature and '{'. |
| 1625 | nl_oc_block_brace = ignore # ignore/add/remove/force |
| 1626 | |
| 1627 | # (OC) Add or remove blank line before '@interface' statement. |
| 1628 | nl_oc_before_interface = ignore # ignore/add/remove/force |
| 1629 | |
| 1630 | # (OC) Add or remove blank line before '@implementation' statement. |
| 1631 | nl_oc_before_implementation = ignore # ignore/add/remove/force |
| 1632 | |
| 1633 | # (OC) Add or remove blank line before '@end' statement. |
| 1634 | nl_oc_before_end = ignore # ignore/add/remove/force |
| 1635 | |
| 1636 | # (OC) Add or remove newline between '@interface' and '{'. |
| 1637 | nl_oc_interface_brace = ignore # ignore/add/remove/force |
| 1638 | |
| 1639 | # (OC) Add or remove newline between '@implementation' and '{'. |
| 1640 | nl_oc_implementation_brace = ignore # ignore/add/remove/force |
| 1641 | |
| 1642 | # Add or remove newlines at the start of the file. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1643 | nl_start_of_file = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1644 | |
| 1645 | # The minimum number of newlines at the start of the file (only used if |
| 1646 | # nl_start_of_file is 'add' or 'force'). |
| 1647 | nl_start_of_file_min = 0 # unsigned number |
| 1648 | |
| 1649 | # Add or remove newline at the end of the file. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1650 | nl_end_of_file = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1651 | |
| 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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1654 | nl_end_of_file_min = 1 # unsigned number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1655 | |
| 1656 | # Add or remove newline between '=' and '{'. |
| 1657 | nl_assign_brace = ignore # ignore/add/remove/force |
| 1658 | |
| 1659 | # (D) Add or remove newline between '=' and '['. |
| 1660 | nl_assign_square = ignore # ignore/add/remove/force |
| 1661 | |
| 1662 | # Add or remove newline between '[]' and '{'. |
| 1663 | nl_tsquare_brace = ignore # ignore/add/remove/force |
| 1664 | |
| 1665 | # (D) Add or remove newline after '= ['. Will also affect the newline before |
| 1666 | # the ']'. |
| 1667 | nl_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) { }'. |
| 1671 | nl_fcall_brace = ignore # ignore/add/remove/force |
| 1672 | |
| 1673 | # Add or remove newline between 'enum' and '{'. |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1674 | nl_enum_brace = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1675 | |
| 1676 | # Add or remove newline between 'enum' and 'class'. |
| 1677 | nl_enum_class = ignore # ignore/add/remove/force |
| 1678 | |
| 1679 | # Add or remove newline between 'enum class' and the identifier. |
| 1680 | nl_enum_class_identifier = ignore # ignore/add/remove/force |
| 1681 | |
| 1682 | # Add or remove newline between 'enum class' type and ':'. |
| 1683 | nl_enum_identifier_colon = ignore # ignore/add/remove/force |
| 1684 | |
| 1685 | # Add or remove newline between 'enum class identifier :' and type. |
| 1686 | nl_enum_colon_type = ignore # ignore/add/remove/force |
| 1687 | |
| 1688 | # Add or remove newline between 'struct and '{'. |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1689 | nl_struct_brace = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1690 | |
| 1691 | # Add or remove newline between 'union' and '{'. |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 1692 | nl_union_brace = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1693 | |
| 1694 | # Add or remove newline between 'if' and '{'. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1695 | nl_if_brace = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1696 | |
| 1697 | # Add or remove newline between '}' and 'else'. |
| 1698 | nl_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. |
| 1702 | nl_elseif_brace = ignore # ignore/add/remove/force |
| 1703 | |
| 1704 | # Add or remove newline between 'else' and '{'. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1705 | nl_else_brace = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1706 | |
| 1707 | # Add or remove newline between 'else' and 'if'. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1708 | nl_else_if = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1709 | |
| 1710 | # Add or remove newline before '{' opening brace |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1711 | nl_before_opening_brace_func_class_def = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1712 | |
| 1713 | # Add or remove newline before 'if'/'else if' closing parenthesis. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1714 | nl_before_if_closing_paren = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1715 | |
| 1716 | # Add or remove newline between '}' and 'finally'. |
| 1717 | nl_brace_finally = ignore # ignore/add/remove/force |
| 1718 | |
| 1719 | # Add or remove newline between 'finally' and '{'. |
| 1720 | nl_finally_brace = ignore # ignore/add/remove/force |
| 1721 | |
| 1722 | # Add or remove newline between 'try' and '{'. |
| 1723 | nl_try_brace = ignore # ignore/add/remove/force |
| 1724 | |
| 1725 | # Add or remove newline between get/set and '{'. |
| 1726 | nl_getset_brace = ignore # ignore/add/remove/force |
| 1727 | |
| 1728 | # Add or remove newline between 'for' and '{'. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1729 | nl_for_brace = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1730 | |
| 1731 | # Add or remove newline before the '{' of a 'catch' statement, as in |
| 1732 | # 'catch (decl) <here> {'. |
| 1733 | nl_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. |
| 1737 | nl_oc_catch_brace = ignore # ignore/add/remove/force |
| 1738 | |
| 1739 | # Add or remove newline between '}' and 'catch'. |
| 1740 | nl_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. |
| 1744 | nl_oc_brace_catch = ignore # ignore/add/remove/force |
| 1745 | |
| 1746 | # Add or remove newline between '}' and ']'. |
| 1747 | nl_brace_square = ignore # ignore/add/remove/force |
| 1748 | |
| 1749 | # Add or remove newline between '}' and ')' in a function invocation. |
| 1750 | nl_brace_fparen = ignore # ignore/add/remove/force |
| 1751 | |
| 1752 | # Add or remove newline between 'while' and '{'. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1753 | nl_while_brace = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1754 | |
| 1755 | # (D) Add or remove newline between 'scope (x)' and '{'. |
| 1756 | nl_scope_brace = ignore # ignore/add/remove/force |
| 1757 | |
| 1758 | # (D) Add or remove newline between 'unittest' and '{'. |
| 1759 | nl_unittest_brace = ignore # ignore/add/remove/force |
| 1760 | |
| 1761 | # (D) Add or remove newline between 'version (x)' and '{'. |
| 1762 | nl_version_brace = ignore # ignore/add/remove/force |
| 1763 | |
| 1764 | # (C#) Add or remove newline between 'using' and '{'. |
| 1765 | nl_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. |
| 1769 | nl_brace_brace = ignore # ignore/add/remove/force |
| 1770 | |
| 1771 | # Add or remove newline between 'do' and '{'. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1772 | nl_do_brace = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1773 | |
| 1774 | # Add or remove newline between '}' and 'while' of 'do' statement. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1775 | nl_brace_while = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1776 | |
| 1777 | # Add or remove newline between 'switch' and '{'. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1778 | nl_switch_brace = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1779 | |
| 1780 | # Add or remove newline between 'synchronized' and '{'. |
| 1781 | nl_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. |
| 1788 | nl_multi_line_cond = false # true/false |
| 1789 | |
| 1790 | # Add a newline after '(' if an if/for/while/switch condition spans multiple |
| 1791 | # lines |
| 1792 | nl_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. |
| 1796 | nl_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. |
| 1799 | nl_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 '}'. |
| 1803 | nl_before_case = false # true/false |
| 1804 | |
| 1805 | # Whether to add a newline after a 'case' statement. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1806 | nl_after_case = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1807 | |
| 1808 | # Add or remove newline between a case ':' and '{'. |
| 1809 | # |
| 1810 | # Overrides nl_after_case. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1811 | nl_case_colon_brace = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1812 | |
| 1813 | # Add or remove newline between ')' and 'throw'. |
| 1814 | nl_before_throw = ignore # ignore/add/remove/force |
| 1815 | |
| 1816 | # Add or remove newline between 'namespace' and '{'. |
| 1817 | nl_namespace_brace = ignore # ignore/add/remove/force |
| 1818 | |
| 1819 | # Add or remove newline after 'template<...>' of a template class. |
| 1820 | nl_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. |
| 1825 | nl_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. |
| 1830 | nl_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. |
| 1835 | nl_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. |
| 1840 | nl_template_class_def_special = ignore # ignore/add/remove/force |
| 1841 | |
| 1842 | # Add or remove newline after 'template<...>' of a template function. |
| 1843 | nl_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. |
| 1849 | nl_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. |
| 1855 | nl_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. |
| 1861 | nl_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. |
| 1867 | nl_template_func_def_special = ignore # ignore/add/remove/force |
| 1868 | |
| 1869 | # Add or remove newline after 'template<...>' of a template variable. |
| 1870 | nl_template_var = ignore # ignore/add/remove/force |
| 1871 | |
| 1872 | # Add or remove newline between 'template<...>' and 'using' of a templated |
| 1873 | # type alias. |
| 1874 | nl_template_using = ignore # ignore/add/remove/force |
| 1875 | |
| 1876 | # Add or remove newline between 'class' and '{'. |
| 1877 | nl_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. |
| 1881 | nl_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. |
| 1886 | nl_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'. |
| 1890 | nl_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1895 | nl_func_type_name = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1896 | |
| 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. |
| 1900 | nl_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). |
| 1905 | nl_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() { }'. |
| 1909 | nl_func_scope_name = ignore # ignore/add/remove/force |
| 1910 | |
| 1911 | # Add or remove newline between return type and function name in a prototype. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1912 | nl_func_proto_type_name = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1913 | |
| 1914 | # Add or remove newline between a function name and the opening '(' in the |
| 1915 | # declaration. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1916 | nl_func_paren = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1917 | |
| 1918 | # Overrides nl_func_paren for functions with no parameters. |
| 1919 | nl_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1923 | nl_func_def_paren = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1924 | |
| 1925 | # Overrides nl_func_def_paren for functions with no parameters. |
| 1926 | nl_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1930 | nl_func_call_paren = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1931 | |
| 1932 | # Overrides nl_func_call_paren for functions with no parameters. |
| 1933 | nl_func_call_paren_empty = ignore # ignore/add/remove/force |
| 1934 | |
| 1935 | # Add or remove newline after '(' in a function declaration. |
| 1936 | nl_func_decl_start = ignore # ignore/add/remove/force |
| 1937 | |
| 1938 | # Add or remove newline after '(' in a function definition. |
| 1939 | nl_func_def_start = ignore # ignore/add/remove/force |
| 1940 | |
| 1941 | # Overrides nl_func_decl_start when there is only one parameter. |
| 1942 | nl_func_decl_start_single = ignore # ignore/add/remove/force |
| 1943 | |
| 1944 | # Overrides nl_func_def_start when there is only one parameter. |
| 1945 | nl_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. |
| 1949 | nl_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. |
| 1953 | nl_func_def_start_multi_line = false # true/false |
| 1954 | |
| 1955 | # Add or remove newline after each ',' in a function declaration. |
| 1956 | nl_func_decl_args = ignore # ignore/add/remove/force |
| 1957 | |
| 1958 | # Add or remove newline after each ',' in a function definition. |
| 1959 | nl_func_def_args = ignore # ignore/add/remove/force |
| 1960 | |
| 1961 | # Add or remove newline after each ',' in a function call. |
| 1962 | nl_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. |
| 1966 | nl_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. |
| 1970 | nl_func_def_args_multi_line = false # true/false |
| 1971 | |
| 1972 | # Add or remove newline before the ')' in a function declaration. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1973 | nl_func_decl_end = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1974 | |
| 1975 | # Add or remove newline before the ')' in a function definition. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1976 | nl_func_def_end = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1977 | |
| 1978 | # Overrides nl_func_decl_end when there is only one parameter. |
| 1979 | nl_func_decl_end_single = ignore # ignore/add/remove/force |
| 1980 | |
| 1981 | # Overrides nl_func_def_end when there is only one parameter. |
| 1982 | nl_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. |
| 1986 | nl_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. |
| 1990 | nl_func_def_end_multi_line = false # true/false |
| 1991 | |
| 1992 | # Add or remove newline between '()' in a function declaration. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1993 | nl_func_decl_empty = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1994 | |
| 1995 | # Add or remove newline between '()' in a function definition. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1996 | nl_func_def_empty = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 1997 | |
| 1998 | # Add or remove newline between '()' in a function call. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 1999 | nl_func_call_empty = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2000 | |
| 2001 | # Whether to add a newline after '(' in a function call, |
| 2002 | # has preference over nl_func_call_start_multi_line. |
| 2003 | nl_func_call_start = ignore # ignore/add/remove/force |
| 2004 | |
| 2005 | # Whether to add a newline before ')' in a function call. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2006 | nl_func_call_end = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2007 | |
| 2008 | # Whether to add a newline after '(' in a function call if '(' and ')' are in |
| 2009 | # different lines. |
| 2010 | nl_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. |
| 2014 | nl_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. |
| 2018 | nl_func_call_end_multi_line = false # true/false |
| 2019 | |
| 2020 | # Whether to respect nl_func_call_XXX option incase of closure args. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2021 | nl_func_call_args_multi_line_ignore_closures = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2022 | |
| 2023 | # Whether to add a newline after '<' of a template parameter list. |
| 2024 | nl_template_start = false # true/false |
| 2025 | |
| 2026 | # Whether to add a newline after each ',' in a template parameter list. |
| 2027 | nl_template_args = false # true/false |
| 2028 | |
| 2029 | # Whether to add a newline before '>' of a template parameter list. |
| 2030 | nl_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. |
| 2034 | nl_oc_msg_args = false # true/false |
| 2035 | |
Michal Vasko | 2bf4af4 | 2023-01-04 12:08:38 +0100 | [diff] [blame] | 2036 | # (OC) Minimum number of Objective-C message parameters before applying nl_oc_msg_args. |
| 2037 | nl_oc_msg_args_min_params = 0 # unsigned number |
| 2038 | |
| 2039 | # (OC) Max code width of Objective-C message before applying nl_oc_msg_args. |
| 2040 | nl_oc_msg_args_max_code_width = 0 # unsigned number |
| 2041 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2042 | # Add or remove newline between function signature and '{'. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2043 | nl_fdef_brace = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2044 | |
| 2045 | # Add or remove newline between function signature and '{', |
| 2046 | # if signature ends with ')'. Overrides nl_fdef_brace. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2047 | nl_fdef_brace_cond = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2048 | |
| 2049 | # Add or remove newline between C++11 lambda signature and '{'. |
| 2050 | nl_cpp_ldef_brace = ignore # ignore/add/remove/force |
| 2051 | |
| 2052 | # Add or remove newline between 'return' and the return expression. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2053 | nl_return_expr = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2054 | |
Michal Vasko | 2bf4af4 | 2023-01-04 12:08:38 +0100 | [diff] [blame] | 2055 | # Add or remove newline between 'throw' and the throw expression. |
| 2056 | nl_throw_expr = ignore # ignore/add/remove/force/not_defined |
| 2057 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2058 | # Whether to add a newline after semicolons, except in 'for' statements. |
| 2059 | nl_after_semicolon = false # true/false |
| 2060 | |
| 2061 | # (Java) Add or remove newline between the ')' and '{{' of the double brace |
| 2062 | # initializer. |
| 2063 | nl_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. |
| 2067 | nl_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. |
| 2071 | nl_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. |
| 2075 | nl_type_brace_init_lst_close = ignore # ignore/add/remove/force |
| 2076 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 2077 | # Whether to add a newline before '{'. |
| 2078 | nl_before_brace_open = false # true/false |
| 2079 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2080 | # Whether to add a newline after '{'. This also adds a newline before the |
| 2081 | # matching '}'. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2082 | nl_after_brace_open = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2083 | |
| 2084 | # Whether to add a newline between the open brace and a trailing single-line |
| 2085 | # comment. Requires nl_after_brace_open=true. |
| 2086 | nl_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. |
| 2090 | nl_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. |
| 2094 | nl_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2098 | nl_after_brace_close = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2099 | |
| 2100 | # Whether to add a newline after a virtual brace close, |
| 2101 | # as in 'if (foo) a++; <here> return;'. |
| 2102 | nl_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2107 | nl_brace_struct_var = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2108 | |
| 2109 | # Whether to alter newlines in '#define' macros. |
| 2110 | nl_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2115 | nl_squeeze_paren_close = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2116 | |
| 2117 | # Whether to remove blanks after '#ifxx' and '#elxx', or before '#elxx' and |
| 2118 | # '#endif'. Does not affect top-level #ifdefs. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2119 | nl_squeeze_ifdef = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2120 | |
| 2121 | # Makes the nl_squeeze_ifdef option affect the top-level #ifdefs as well. |
| 2122 | nl_squeeze_ifdef_top_level = false # true/false |
| 2123 | |
| 2124 | # Add or remove blank line before 'if'. |
| 2125 | nl_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. |
| 2129 | nl_after_if = ignore # ignore/add/remove/force |
| 2130 | |
| 2131 | # Add or remove blank line before 'for'. |
| 2132 | nl_before_for = ignore # ignore/add/remove/force |
| 2133 | |
| 2134 | # Add or remove blank line after 'for' statement. |
| 2135 | nl_after_for = ignore # ignore/add/remove/force |
| 2136 | |
| 2137 | # Add or remove blank line before 'while'. |
| 2138 | nl_before_while = ignore # ignore/add/remove/force |
| 2139 | |
| 2140 | # Add or remove blank line after 'while' statement. |
| 2141 | nl_after_while = ignore # ignore/add/remove/force |
| 2142 | |
| 2143 | # Add or remove blank line before 'switch'. |
| 2144 | nl_before_switch = ignore # ignore/add/remove/force |
| 2145 | |
| 2146 | # Add or remove blank line after 'switch' statement. |
| 2147 | nl_after_switch = ignore # ignore/add/remove/force |
| 2148 | |
| 2149 | # Add or remove blank line before 'synchronized'. |
| 2150 | nl_before_synchronized = ignore # ignore/add/remove/force |
| 2151 | |
| 2152 | # Add or remove blank line after 'synchronized' statement. |
| 2153 | nl_after_synchronized = ignore # ignore/add/remove/force |
| 2154 | |
| 2155 | # Add or remove blank line before 'do'. |
| 2156 | nl_before_do = ignore # ignore/add/remove/force |
| 2157 | |
| 2158 | # Add or remove blank line after 'do/while' statement. |
| 2159 | nl_after_do = ignore # ignore/add/remove/force |
| 2160 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 2161 | # 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. |
| 2165 | nl_before_ignore_after_case = false # true/false |
| 2166 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2167 | # Whether to put a blank line before 'return' statements, unless after an open |
| 2168 | # brace. |
| 2169 | nl_before_return = false # true/false |
| 2170 | |
| 2171 | # Whether to put a blank line after 'return' statements, unless followed by a |
| 2172 | # close brace. |
| 2173 | nl_after_return = false # true/false |
| 2174 | |
| 2175 | # Whether to put a blank line before a member '.' or '->' operators. |
| 2176 | nl_before_member = ignore # ignore/add/remove/force |
| 2177 | |
| 2178 | # (Java) Whether to put a blank line after a member '.' or '->' operators. |
| 2179 | nl_after_member = ignore # ignore/add/remove/force |
| 2180 | |
| 2181 | # Whether to double-space commented-entries in 'struct'/'union'/'enum'. |
| 2182 | nl_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.) |
| 2186 | nl_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'. |
| 2190 | nl_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. |
| 2194 | nl_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. |
| 2199 | nl_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++;'. |
| 2203 | nl_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;'. |
| 2207 | nl_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;'. |
| 2211 | nl_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. |
| 2216 | nl_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. |
| 2221 | nl_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++;'. |
| 2225 | nl_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;'. |
| 2229 | nl_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;'. |
| 2233 | nl_split_while_one_liner = false # true/false |
| 2234 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 2235 | # Don't add a newline before a cpp-comment in a parameter list of a function |
| 2236 | # call. |
| 2237 | donot_add_nl_before_cpp_comment = false # true/false |
| 2238 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2239 | # |
| 2240 | # Blank line options |
| 2241 | # |
| 2242 | |
| 2243 | # The maximum number of consecutive newlines (3 = 2 blank lines). |
| 2244 | nl_max = 2 # unsigned number |
| 2245 | |
| 2246 | # The maximum number of consecutive newlines in a function. |
| 2247 | nl_max_blank_in_func = 2 # unsigned number |
| 2248 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 2249 | # 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 |
| 2253 | nl_inside_empty_func = 0 # unsigned number |
| 2254 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2255 | # The number of newlines before a function prototype. |
| 2256 | nl_before_func_body_proto = 0 # unsigned number |
| 2257 | |
| 2258 | # The number of newlines before a multi-line function definition. |
| 2259 | nl_before_func_body_def = 0 # unsigned number |
| 2260 | |
| 2261 | # The number of newlines before a class constructor/destructor prototype. |
| 2262 | nl_before_func_class_proto = 0 # unsigned number |
| 2263 | |
| 2264 | # The number of newlines before a class constructor/destructor definition. |
| 2265 | nl_before_func_class_def = 0 # unsigned number |
| 2266 | |
| 2267 | # The number of newlines after a function prototype. |
| 2268 | nl_after_func_proto = 0 # unsigned number |
| 2269 | |
| 2270 | # The number of newlines after a function prototype, if not followed by |
| 2271 | # another function prototype. |
| 2272 | nl_after_func_proto_group = 0 # unsigned number |
| 2273 | |
| 2274 | # The number of newlines after a class constructor/destructor prototype. |
| 2275 | nl_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. |
| 2279 | nl_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. |
| 2286 | nl_class_leave_one_liner_groups = false # true/false |
| 2287 | |
| 2288 | # The number of newlines after '}' of a multi-line function body. |
| 2289 | nl_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. |
| 2295 | nl_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. |
| 2301 | nl_after_func_body_one_liner = 2 # unsigned number |
| 2302 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2303 | # 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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2307 | nl_typedef_blk_start = 1 # unsigned number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2308 | |
| 2309 | # The number of newlines after a block of typedefs. |
| 2310 | # |
| 2311 | # 0: No change (default). |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2312 | nl_typedef_blk_end = 1 # unsigned number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2313 | |
| 2314 | # The maximum number of consecutive newlines within a block of typedefs. |
| 2315 | # |
| 2316 | # 0: No change (default). |
| 2317 | nl_typedef_blk_in = 0 # unsigned number |
| 2318 | |
Michal Vasko | 2bf4af4 | 2023-01-04 12:08:38 +0100 | [diff] [blame] | 2319 | # 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). |
| 2326 | nl_var_def_blk_end_func_top = 1 # unsigned number |
| 2327 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2328 | # 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). |
| 2333 | nl_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2339 | nl_var_def_blk_end = 1 # unsigned number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2340 | |
| 2341 | # The maximum number of consecutive newlines within a block of variable |
| 2342 | # definitions. |
| 2343 | # |
| 2344 | # 0: No change (default). |
| 2345 | nl_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. |
| 2349 | nl_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. |
| 2353 | nl_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. |
| 2357 | nl_before_cpp_comment = 0 # unsigned number |
| 2358 | |
| 2359 | # Whether to force a newline after a multi-line comment. |
| 2360 | nl_after_multiline_comment = false # true/false |
| 2361 | |
| 2362 | # Whether to force a newline after a label's colon. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2363 | nl_after_label_colon = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2364 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 2365 | # The number of newlines before a struct definition. |
| 2366 | nl_before_struct = 1 # unsigned number |
| 2367 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2368 | # The number of newlines after '}' or ';' of a struct/enum/union definition. |
| 2369 | nl_after_struct = 1 # unsigned number |
| 2370 | |
| 2371 | # The number of newlines before a class definition. |
| 2372 | nl_before_class = 0 # unsigned number |
| 2373 | |
| 2374 | # The number of newlines after '}' or ';' of a class definition. |
| 2375 | nl_after_class = 0 # unsigned number |
| 2376 | |
| 2377 | # The number of newlines before a namespace. |
| 2378 | nl_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. |
| 2387 | nl_inside_namespace = 0 # unsigned number |
| 2388 | |
| 2389 | # The number of newlines after '}' of a namespace. |
| 2390 | nl_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). |
| 2397 | nl_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. |
| 2406 | nl_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). |
| 2412 | nl_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). |
| 2418 | nl_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). |
| 2424 | nl_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). |
| 2429 | nl_between_get_set = 0 # unsigned number |
| 2430 | |
| 2431 | # (C#) Add or remove newline between property and the '{'. |
| 2432 | nl_property_brace = ignore # ignore/add/remove/force |
| 2433 | |
| 2434 | # Whether to remove blank lines after '{'. |
| 2435 | eat_blanks_after_open_brace = false # true/false |
| 2436 | |
| 2437 | # Whether to remove blank lines before '}'. |
| 2438 | eat_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 |
| 2445 | nl_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. |
| 2449 | nl_after_annotation = ignore # ignore/add/remove/force |
| 2450 | |
| 2451 | # (Java) Add or remove newline between two annotations. |
| 2452 | nl_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2457 | nl_before_whole_file_ifdef = 2 # unsigned number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2458 | |
| 2459 | # The number of newlines after a whole-file #ifdef. |
| 2460 | # |
| 2461 | # 0: No change (default). |
| 2462 | nl_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2467 | nl_before_whole_file_endif = 2 # unsigned number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2468 | |
| 2469 | # The number of newlines after a whole-file #endif. |
| 2470 | # |
| 2471 | # 0: No change (default). |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2472 | nl_after_whole_file_endif = 2 # unsigned number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2473 | |
| 2474 | # |
| 2475 | # Positioning options |
| 2476 | # |
| 2477 | |
| 2478 | # The position of arithmetic operators in wrapped expressions. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2479 | pos_arith = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2480 | |
| 2481 | # The position of assignment in wrapped expressions. Do not affect '=' |
| 2482 | # followed by '{'. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2483 | pos_assign = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2484 | |
| 2485 | # The position of Boolean operators in wrapped expressions. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2486 | pos_bool = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2487 | |
| 2488 | # The position of comparison operators in wrapped expressions. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2489 | pos_compare = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2490 | |
| 2491 | # The position of conditional operators, as in the '?' and ':' of |
| 2492 | # 'expr ? stmt : stmt', in wrapped expressions. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2493 | pos_conditional = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2494 | |
| 2495 | # The position of the comma in wrapped expressions. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2496 | pos_comma = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2497 | |
| 2498 | # The position of the comma in enum entries. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2499 | pos_enum_comma = trail # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2500 | |
| 2501 | # The position of the comma in the base class list if there is more than one |
| 2502 | # line. Affects nl_class_init_args. |
| 2503 | pos_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. |
| 2507 | pos_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. |
| 2511 | pos_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. |
| 2515 | pos_constr_colon = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force |
| 2516 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 2517 | # The position of shift operators in wrapped expressions. |
| 2518 | pos_shift = ignore # ignore/break/force/lead/trail/join/lead_break/lead_force/trail_break/trail_force |
| 2519 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2520 | # |
| 2521 | # Line splitting options |
| 2522 | # |
| 2523 | |
| 2524 | # Try to limit code width to N columns. |
| 2525 | code_width = 256 # unsigned number |
| 2526 | |
| 2527 | # Whether to fully split long 'for' statements at semi-colons. |
| 2528 | ls_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. |
| 2532 | ls_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. |
| 2537 | ls_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. |
| 2544 | align_keep_tabs = false # true/false |
| 2545 | |
| 2546 | # Whether to use tabs for aligning. |
| 2547 | align_with_tabs = false # true/false |
| 2548 | |
| 2549 | # Whether to bump out to the next tab when aligning. |
| 2550 | align_on_tabstop = true # true/false |
| 2551 | |
| 2552 | # Whether to right-align numbers. |
| 2553 | align_number_right = true # true/false |
| 2554 | |
| 2555 | # Whether to keep whitespace not required for alignment. |
| 2556 | align_keep_extra_space = false # true/false |
| 2557 | |
| 2558 | # Whether to align variable definitions in prototypes and functions. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2559 | align_func_params = false # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2560 | |
| 2561 | # The span for aligning parameter definitions in function on parameter name. |
| 2562 | # |
| 2563 | # 0: Don't align (default). |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2564 | align_func_params_span = 0 # unsigned number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2565 | |
| 2566 | # The threshold for aligning function parameter definitions. |
| 2567 | # Use a negative number for absolute thresholds. |
| 2568 | # |
| 2569 | # 0: No limit (default). |
| 2570 | align_func_params_thresh = 0 # number |
| 2571 | |
| 2572 | # The gap for aligning function parameter definitions. |
| 2573 | align_func_params_gap = 1 # unsigned number |
| 2574 | |
| 2575 | # The span for aligning constructor value. |
| 2576 | # |
| 2577 | # 0: Don't align (default). |
| 2578 | align_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). |
| 2584 | align_constr_value_thresh = 0 # number |
| 2585 | |
| 2586 | # The gap for aligning constructor value. |
| 2587 | align_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. |
| 2591 | align_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). |
| 2596 | align_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). |
| 2603 | align_same_func_call_params_thresh = 0 # number |
| 2604 | |
| 2605 | # The span for aligning variable definitions. |
| 2606 | # |
| 2607 | # 0: Don't align (default). |
| 2608 | align_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. |
| 2616 | align_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. |
| 2624 | align_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). |
| 2630 | align_var_def_thresh = 0 # number |
| 2631 | |
| 2632 | # The gap for aligning variable definitions. |
| 2633 | align_var_def_gap = 0 # unsigned number |
| 2634 | |
| 2635 | # Whether to align the colon in struct bit fields. |
| 2636 | align_var_def_colon = false # true/false |
| 2637 | |
| 2638 | # The gap for aligning the colon in struct bit fields. |
| 2639 | align_var_def_colon_gap = 0 # unsigned number |
| 2640 | |
| 2641 | # Whether to align any attribute after the variable name. |
| 2642 | align_var_def_attribute = false # true/false |
| 2643 | |
| 2644 | # Whether to align inline struct/enum/union variable definitions. |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 2645 | align_var_def_inline = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2646 | |
| 2647 | # The span for aligning on '=' in assignments. |
| 2648 | # |
| 2649 | # 0: Don't align (default). |
| 2650 | align_assign_span = 0 # unsigned number |
| 2651 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 2652 | # The span for aligning on '{' in braced init list. |
| 2653 | # |
| 2654 | # 0: Don't align (default). |
| 2655 | align_braced_init_list_span = 0 # unsigned number |
| 2656 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2657 | # The span for aligning on '=' in function prototype modifier. |
| 2658 | # |
| 2659 | # 0: Don't align (default). |
| 2660 | align_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). |
| 2666 | align_assign_thresh = 0 # number |
| 2667 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 2668 | # 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. |
| 2671 | align_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). |
| 2677 | align_braced_init_list_thresh = 0 # number |
| 2678 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2679 | # 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 |
| 2685 | align_assign_decl_func = 0 # unsigned number |
| 2686 | |
| 2687 | # The span for aligning on '=' in enums. |
| 2688 | # |
| 2689 | # 0: Don't align (default). |
| 2690 | align_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). |
| 2696 | align_enum_equ_thresh = 0 # number |
| 2697 | |
| 2698 | # The span for aligning class member definitions. |
| 2699 | # |
| 2700 | # 0: Don't align (default). |
| 2701 | align_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). |
| 2707 | align_var_class_thresh = 0 # number |
| 2708 | |
| 2709 | # The gap for aligning class member definitions. |
| 2710 | align_var_class_gap = 0 # unsigned number |
| 2711 | |
| 2712 | # The span for aligning struct/union member definitions. |
| 2713 | # |
| 2714 | # 0: Don't align (default). |
| 2715 | align_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). |
| 2721 | align_var_struct_thresh = 0 # number |
| 2722 | |
| 2723 | # The gap for aligning struct/union member definitions. |
| 2724 | align_var_struct_gap = 0 # unsigned number |
| 2725 | |
| 2726 | # The span for aligning struct initializer values. |
| 2727 | # |
| 2728 | # 0: Don't align (default). |
| 2729 | align_struct_init_span = 0 # unsigned number |
| 2730 | |
| 2731 | # The span for aligning single-line typedefs. |
| 2732 | # |
| 2733 | # 0: Don't align (default). |
| 2734 | align_typedef_span = 0 # unsigned number |
| 2735 | |
| 2736 | # The minimum space between the type and the synonym of a typedef. |
| 2737 | align_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 |
| 2744 | align_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. |
| 2752 | align_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. |
| 2760 | align_typedef_amp_style = 1 # unsigned number |
| 2761 | |
| 2762 | # The span for aligning comments that end lines. |
| 2763 | # |
| 2764 | # 0: Don't align (default). |
| 2765 | align_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. |
| 2770 | align_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. |
| 2774 | align_right_cmt_mix = false # true/false |
| 2775 | |
| 2776 | # Whether to only align trailing comments that are at the same brace level. |
| 2777 | align_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). |
| 2784 | align_right_cmt_at_col = 0 # unsigned number |
| 2785 | |
| 2786 | # The span for aligning function prototypes. |
| 2787 | # |
| 2788 | # 0: Don't align (default). |
| 2789 | align_func_proto_span = 0 # unsigned number |
| 2790 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 2791 | # 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. |
| 2797 | align_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. |
| 2805 | align_func_proto_amp_style = 0 # unsigned number |
| 2806 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2807 | # The threshold for aligning function prototypes. |
| 2808 | # Use a negative number for absolute thresholds. |
| 2809 | # |
| 2810 | # 0: No limit (default). |
| 2811 | align_func_proto_thresh = 0 # number |
| 2812 | |
| 2813 | # Minimum gap between the return type and the function name. |
| 2814 | align_func_proto_gap = 1 # unsigned number |
| 2815 | |
| 2816 | # Whether to align function prototypes on the 'operator' keyword instead of |
| 2817 | # what follows. |
| 2818 | align_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. |
| 2822 | align_mix_var_proto = false # true/false |
| 2823 | |
| 2824 | # Whether to align single-line functions with function prototypes. |
| 2825 | # Uses align_func_proto_span. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2826 | align_single_line_func = false # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2827 | |
| 2828 | # Whether to align the open brace of single-line functions. |
| 2829 | # Requires align_single_line_func=true. Uses align_func_proto_span. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 2830 | align_single_line_brace = false # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2831 | |
| 2832 | # Gap for align_single_line_brace. |
| 2833 | align_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). |
| 2838 | align_oc_msg_spec_span = 0 # unsigned number |
| 2839 | |
Michal Vasko | 84bf6f4 | 2023-05-19 11:09:48 +0200 | [diff] [blame] | 2840 | # 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 |
| 2846 | align_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 |
| 2852 | align_nl_cont_spaces = 1 # unsigned number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2853 | |
| 2854 | # Whether to align macro functions and variables together. |
| 2855 | align_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 |
| 2861 | align_pp_define_span = 0 # unsigned number |
| 2862 | |
| 2863 | # The minimum space between label and value of a preprocessor define. |
| 2864 | align_pp_define_gap = 1 # unsigned number |
| 2865 | |
| 2866 | # Whether to align lines that start with '<<' with previous '<<'. |
| 2867 | # |
| 2868 | # Default: true |
| 2869 | align_left_shift = false # true/false |
| 2870 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 2871 | # Whether to align comma-separated statements following '<<' (as used to |
| 2872 | # initialize Eigen matrices). |
| 2873 | align_eigen_comma_init = false # true/false |
| 2874 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2875 | # Whether to align text after 'asm volatile ()' colons. |
| 2876 | align_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. |
| 2882 | align_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. |
| 2886 | align_oc_msg_colon_first = false # true/false |
| 2887 | |
| 2888 | # (OC) Whether to align parameters in an Objective-C '+' or '-' declaration |
| 2889 | # on the ':'. |
| 2890 | align_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) |
| 2895 | align_oc_msg_colon_xcode_like = false # true/false |
| 2896 | |
| 2897 | # |
| 2898 | # Comment modification options |
| 2899 | # |
| 2900 | |
| 2901 | # Try to wrap comments at N columns. |
| 2902 | cmt_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 |
| 2909 | cmt_reflow_mode = 1 # unsigned number |
| 2910 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 2911 | # 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]" |
| 2936 | cmt_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 |
| 2944 | cmt_reflow_indent_to_paragraph_start = false # true/false |
| 2945 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2946 | # Whether to convert all tabs to spaces in comments. If false, tabs in |
| 2947 | # comments are left alone, unless used for indenting. |
| 2948 | cmt_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 |
| 2954 | cmt_indent_multi = false # true/false |
| 2955 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 2956 | # 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. |
| 2962 | cmt_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 |
| 2970 | cmt_sp_before_doxygen_javadoc_tags = 1 # unsigned number |
| 2971 | |
| 2972 | # Whether to change trailing, single-line c-comments into cpp-comments. |
| 2973 | cmt_trailing_single_line_c_to_cpp = false # true/false |
| 2974 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 2975 | # Whether to group c-comments that look like they are in a block. |
| 2976 | cmt_c_group = false # true/false |
| 2977 | |
| 2978 | # Whether to put an empty '/*' on the first line of the combined c-comment. |
| 2979 | cmt_c_nl_start = false # true/false |
| 2980 | |
| 2981 | # Whether to add a newline before the closing '*/' of the combined c-comment. |
| 2982 | cmt_c_nl_end = false # true/false |
| 2983 | |
| 2984 | # Whether to change cpp-comments into c-comments. |
| 2985 | cmt_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. |
| 2989 | cmt_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. |
| 2995 | cmt_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. |
| 3001 | cmt_cpp_nl_end = false # true/false |
| 3002 | |
| 3003 | # Whether to put a star on subsequent comment lines. |
| 3004 | cmt_star_cont = false # true/false |
| 3005 | |
| 3006 | # The number of spaces to insert at the start of subsequent comment lines. |
| 3007 | cmt_sp_before_star_cont = 0 # unsigned number |
| 3008 | |
| 3009 | # The number of spaces to insert after the star on subsequent comment lines. |
| 3010 | cmt_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 |
| 3016 | cmt_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 |
| 3023 | cmt_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. |
| 3028 | cmt_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. |
| 3033 | cmt_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. |
| 3041 | cmt_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. |
| 3046 | cmt_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. |
| 3053 | cmt_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. |
| 3060 | cmt_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 |
| 3068 | cmt_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. |
| 3074 | cmt_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 3081 | mod_full_brace_do = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3082 | |
| 3083 | # Add or remove braces on a single-line 'for' statement. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 3084 | mod_full_brace_for = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3085 | |
| 3086 | # (Pawn) Add or remove braces on a single-line function definition. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 3087 | mod_full_brace_function = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3088 | |
| 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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 3091 | mod_full_brace_if = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3092 | |
| 3093 | # Whether to enforce that all blocks of an 'if'/'else if'/'else' chain either |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 3094 | # have, or do not have, braces. Overrides mod_full_brace_if. |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3095 | # |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 3096 | # 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 |
| 3104 | mod_full_brace_if_chain = 0 # unsigned number |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3105 | |
| 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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 3109 | mod_full_brace_if_chain_only = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3110 | |
| 3111 | # Add or remove braces on single-line 'while' statement. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 3112 | mod_full_brace_while = force # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3113 | |
| 3114 | # Add or remove braces on single-line 'using ()' statement. |
| 3115 | mod_full_brace_using = ignore # ignore/add/remove/force |
| 3116 | |
| 3117 | # Don't remove braces around statements that span N newlines |
| 3118 | mod_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 |
| 3134 | mod_full_brace_nl_block_rem_mlcond = false # true/false |
| 3135 | |
| 3136 | # Add or remove unnecessary parenthesis on 'return' statement. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 3137 | mod_paren_on_return = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3138 | |
Michal Vasko | 2bf4af4 | 2023-01-04 12:08:38 +0100 | [diff] [blame] | 3139 | # Add or remove unnecessary parentheses on 'throw' statement. |
| 3140 | mod_paren_on_throw = ignore # ignore/add/remove/force/not_defined |
| 3141 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3142 | # (Pawn) Whether to change optional semicolons to real semicolons. |
| 3143 | mod_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 3147 | mod_full_paren_if_bool = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3148 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 3149 | # Whether to fully parenthesize Boolean expressions after '=' |
| 3150 | # statement, as in 'x = a && b > c;' => 'x = (a && (b > c));'. |
| 3151 | mod_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));'. |
| 3155 | mod_full_paren_return_bool = false # true/false |
| 3156 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3157 | # Whether to remove superfluous semicolons. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 3158 | mod_remove_extra_semicolon = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3159 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 3160 | # Whether to remove duplicate include. |
| 3161 | mod_remove_duplicate_include = true # true/false |
| 3162 | |
Michal Vasko | 84bf6f4 | 2023-05-19 11:09:48 +0200 | [diff] [blame] | 3163 | # 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 |
| 3167 | mod_add_force_c_closebrace_comment = false # true/false |
| 3168 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3169 | # 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. |
| 3171 | mod_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. |
| 3175 | mod_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. |
| 3179 | mod_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. |
| 3183 | mod_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. |
| 3187 | mod_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. |
| 3191 | mod_add_long_ifdef_else_comment = 0 # unsigned number |
| 3192 | |
| 3193 | # Whether to take care of the case by the mod_sort_xx options. |
| 3194 | mod_sort_case_sensitive = false # true/false |
| 3195 | |
| 3196 | # Whether to sort consecutive single-line 'import' statements. |
| 3197 | mod_sort_import = false # true/false |
| 3198 | |
| 3199 | # (C#) Whether to sort consecutive single-line 'using' statements. |
| 3200 | mod_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 3205 | mod_sort_include = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3206 | |
| 3207 | # Whether to prioritize '#include' and '#import' statements that contain |
| 3208 | # filename without extension when sorting is enabled. |
| 3209 | mod_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. |
| 3213 | mod_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. |
| 3217 | mod_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. |
| 3221 | mod_sort_incl_import_ignore_extension = true # true/false |
| 3222 | |
| 3223 | # Whether to group '#include' and '#import' statements when sorting is enabled. |
| 3224 | mod_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 3228 | mod_move_case_break = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3229 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 3230 | # 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; }'. |
| 3232 | mod_move_case_return = true # true/false |
| 3233 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3234 | # 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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 3236 | mod_case_brace = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3237 | |
| 3238 | # Whether to remove a void 'return;' that appears as the last statement in a |
| 3239 | # function. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 3240 | mod_remove_empty_return = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3241 | |
| 3242 | # Add or remove the comma after the last value of an enumeration. |
Michal Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 3243 | mod_enum_last_comma = remove # ignore/add/remove/force |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3244 | |
Michal Vasko | 2bf4af4 | 2023-01-04 12:08:38 +0100 | [diff] [blame] | 3245 | # 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. |
| 3257 | mod_infinite_loop = 0 # unsigned number |
| 3258 | |
| 3259 | # Add or remove the 'int' keyword in 'int short'. |
| 3260 | mod_int_short = remove # ignore/add/remove/force/not_defined |
| 3261 | |
| 3262 | # Add or remove the 'int' keyword in 'short int'. |
| 3263 | mod_short_int = remove # ignore/add/remove/force/not_defined |
| 3264 | |
| 3265 | # Add or remove the 'int' keyword in 'int long'. |
| 3266 | mod_int_long = remove # ignore/add/remove/force/not_defined |
| 3267 | |
| 3268 | # Add or remove the 'int' keyword in 'long int'. |
| 3269 | mod_long_int = remove # ignore/add/remove/force/not_defined |
| 3270 | |
| 3271 | # Add or remove the 'int' keyword in 'int signed'. |
| 3272 | mod_int_signed = ignore # ignore/add/remove/force/not_defined |
| 3273 | |
| 3274 | # Add or remove the 'int' keyword in 'signed int'. |
| 3275 | mod_signed_int = ignore # ignore/add/remove/force/not_defined |
| 3276 | |
| 3277 | # Add or remove the 'int' keyword in 'int unsigned'. |
| 3278 | mod_int_unsigned = ignore # ignore/add/remove/force/not_defined |
| 3279 | |
| 3280 | # Add or remove the 'int' keyword in 'unsigned int'. |
| 3281 | mod_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. |
| 3286 | mod_int_prefer_int_on_left = false # true/false |
| 3287 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3288 | # (OC) Whether to organize the properties. If true, properties will be |
| 3289 | # rearranged according to the mod_sort_oc_property_*_weight factors. |
| 3290 | mod_sort_oc_properties = false # true/false |
| 3291 | |
| 3292 | # (OC) Weight of a class property modifier. |
| 3293 | mod_sort_oc_property_class_weight = 0 # number |
| 3294 | |
| 3295 | # (OC) Weight of 'atomic' and 'nonatomic'. |
| 3296 | mod_sort_oc_property_thread_safe_weight = 0 # number |
| 3297 | |
| 3298 | # (OC) Weight of 'readwrite' when organizing properties. |
| 3299 | mod_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. |
| 3303 | mod_sort_oc_property_reference_weight = 0 # number |
| 3304 | |
| 3305 | # (OC) Weight of getter type ('getter=') when organizing properties. |
| 3306 | mod_sort_oc_property_getter_weight = 0 # number |
| 3307 | |
| 3308 | # (OC) Weight of setter type ('setter=') when organizing properties. |
| 3309 | mod_sort_oc_property_setter_weight = 0 # number |
| 3310 | |
| 3311 | # (OC) Weight of nullability type ('nullable', 'nonnull', 'null_unspecified', |
| 3312 | # 'null_resettable') when organizing properties. |
| 3313 | mod_sort_oc_property_nullability_weight = 0 # number |
| 3314 | |
| 3315 | # |
| 3316 | # Preprocessor options |
| 3317 | # |
| 3318 | |
Michal Vasko | 2bf4af4 | 2023-01-04 12:08:38 +0100 | [diff] [blame] | 3319 | # 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 |
| 3327 | pp_indent_with_tabs = 0 # number |
| 3328 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3329 | # Add or remove indentation of preprocessor directives inside #if blocks |
| 3330 | # at brace level 0 (file-level). |
| 3331 | pp_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. |
| 3335 | pp_indent_at_level = false # true/false |
| 3336 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 3337 | # 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. |
| 3339 | pp_indent_at_level0 = false # true/false |
| 3340 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3341 | # 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 |
| 3347 | pp_indent_count = 0 # unsigned number |
| 3348 | |
Michal Vasko | 2bf4af4 | 2023-01-04 12:08:38 +0100 | [diff] [blame] | 3349 | # Add or remove space after # based on pp level of #if blocks. |
| 3350 | pp_space_after = ignore # ignore/add/remove/force/not_defined |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3351 | |
| 3352 | # Sets the number of spaces per level added with pp_space. |
| 3353 | pp_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. |
| 3357 | pp_indent_region = 0 # number |
| 3358 | |
| 3359 | # Whether to indent the code between #region and #endregion. |
| 3360 | pp_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 |
| 3367 | pp_indent_if = 0 # number |
| 3368 | |
| 3369 | # Whether to indent the code between #if, #else and #endif. |
| 3370 | pp_if_indent_code = false # true/false |
| 3371 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 3372 | # Whether to indent the body of an #if that encompasses all the code in the file. |
| 3373 | pp_indent_in_guard = false # true/false |
| 3374 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3375 | # Whether to indent '#define' at the brace level. If false, these are |
| 3376 | # indented from column 1. |
| 3377 | pp_define_at_level = false # true/false |
| 3378 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 3379 | # Whether to indent '#include' at the brace level. |
| 3380 | pp_include_at_level = false # true/false |
| 3381 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3382 | # Whether to ignore the '#define' body while formatting. |
| 3383 | pp_ignore_define_body = true # true/false |
| 3384 | |
Michal Vasko | 2bf4af4 | 2023-01-04 12:08:38 +0100 | [diff] [blame] | 3385 | # 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 |
| 3395 | pp_multiline_define_body_indent = 8 # number |
| 3396 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3397 | # 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 |
| 3402 | pp_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 |
| 3409 | pp_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 |
| 3416 | pp_indent_extern = false # true/false |
| 3417 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 3418 | # 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 Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3424 | # |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 3425 | # Default: 1 |
| 3426 | pp_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 |
| 3448 | pp_warn_unbalanced_if = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3449 | |
| 3450 | # |
| 3451 | # Sort includes options |
| 3452 | # |
| 3453 | |
| 3454 | # The regex for include category with priority 0. |
| 3455 | include_category_0 = "" # string |
| 3456 | |
| 3457 | # The regex for include category with priority 1. |
| 3458 | include_category_1 = "" # string |
| 3459 | |
| 3460 | # The regex for include category with priority 2. |
| 3461 | include_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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 3471 | use_indent_func_call_param = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3472 | |
| 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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 3487 | use_indent_continue_only_once = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3488 | |
| 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 Vasko | 6973015 | 2020-10-09 16:30:07 +0200 | [diff] [blame] | 3498 | indent_cpp_lambda_only_once = true # true/false |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3499 | |
| 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. |
| 3503 | use_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 |
| 3514 | use_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 |
| 3519 | use_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 |
| 3529 | warn_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. |
| 3534 | debug_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. |
| 3539 | debug_line_number_to_protocol = 0 # number |
| 3540 | |
Michal Vasko | 26bbb27 | 2022-08-02 14:54:33 +0200 | [diff] [blame] | 3541 | # Set the number of second(s) before terminating formatting the current file, |
| 3542 | # 0: no timeout. |
| 3543 | # only for linux |
| 3544 | debug_timeout = 0 # number |
| 3545 | |
| 3546 | # Set the number of characters to be printed if the text is too long, |
| 3547 | # 0: do not truncate. |
| 3548 | debug_truncate = 0 # unsigned number |
| 3549 | |
Michal Vasko | 2bf4af4 | 2023-01-04 12:08:38 +0100 | [diff] [blame] | 3550 | # sort (or not) the tracking info. |
| 3551 | # |
| 3552 | # Default: true |
| 3553 | debug_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. |
| 3557 | debug_decode_the_flags = false # true/false |
| 3558 | |
| 3559 | # insert the number of the line at the beginning of each line |
| 3560 | set_numbering_for_html_output = false # true/false |
| 3561 | |
Radek Krejci | a198c96 | 2020-08-16 10:32:10 +0200 | [diff] [blame] | 3562 | # 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 | # |