From 20f85c688334859635b21b95951b1e115540c69d Mon Sep 17 00:00:00 2001 From: Ben Gardner Date: Tue, 1 Jan 2013 15:59:23 -0600 Subject: [PATCH] Run scripts/update-defaults.sh --- documentation/htdocs/default.cfg | 182 +++++++++++++++++++++++++++---- etc/defaults.cfg | 182 +++++++++++++++++++++++++++---- 2 files changed, 326 insertions(+), 38 deletions(-) diff --git a/documentation/htdocs/default.cfg b/documentation/htdocs/default.cfg index e771038707..787ef6508f 100644 --- a/documentation/htdocs/default.cfg +++ b/documentation/htdocs/default.cfg @@ -1,4 +1,4 @@ -# Uncrustify 0.59 +# Uncrustify 0.60 # # General options @@ -24,10 +24,10 @@ string_escape_char2 = 0 # number # Improvements to template detection may make this option obsolete. tok_split_gte = false # false/true -# Control what to do with the UTF-8 BOM (recommed 'remove') +# Control what to do with the UTF-8 BOM (recommend 'remove') utf8_bom = ignore # ignore/add/remove/force -# If the file only contains chars between 128 and 255 and is not UTF-8, then output as UTF-8 +# If the file contains bytes with values between 128 and 255, but is not UTF-8, then output as UTF-8 utf8_byte = false # false/true # Force the output encoding to UTF-8 @@ -42,7 +42,7 @@ utf8_force = false # false/true indent_columns = 8 # number # The continuation indent. If non-zero, this overrides the indent of '(' and '=' continuation indents. -# For FreeBSD, this is set to 4. +# For FreeBSD, this is set to 4. Negative value is absolute and not increased for each ( level indent_continue = 0 # number # How to use tabs when indenting code @@ -99,6 +99,9 @@ indent_class = false # false/true # Whether to indent the stuff after a leading class colon indent_class_colon = false # false/true +# Virtual indent from the ':' for member initializers. Default is 2 +indent_ctor_init_leading = 2 # number + # Additional indenting for constructor initializer list indent_ctor_init = 0 # number @@ -112,6 +115,10 @@ indent_var_def_blk = 0 # number # Indent continued variable declarations instead of aligning. indent_var_def_cont = false # false/true +# True: force indentation of function definition to start in column 1 +# False: use the default behavior +indent_func_def_force_col1 = false # false/true + # True: indent continued function call parameters one indent level # False: align parameters under the open paren indent_func_call_param = false # false/true @@ -207,6 +214,16 @@ indent_preserve_sql = false # false/true # If FALSE or the '=' is followed by a newline, the next line is indent one tab. indent_align_assign = true # false/true +# Indent OC blocks at brace level instead of usual rules. +indent_oc_block = false # false/true + +# Indent OC blocks in a message relative to the parameter name. +# 0=use indent_oc_block rules, 1+=spaces to indent +indent_oc_block_msg = 0 # number + +# Minimum indent for subsequent parameters +indent_oc_msg_colon = 0 # number + # # Spacing options # @@ -217,6 +234,12 @@ sp_arith = ignore # ignore/add/remove/force # Add or remove space around assignment operator '=', '+=', etc sp_assign = ignore # ignore/add/remove/force +# Add or remove space around '=' in C++11 lambda capture specifications. Overrides sp_assign +sp_cpp_lambda_assign = ignore # ignore/add/remove/force + +# Add or remove space after the capture specification in C++11 lambda. +sp_cpp_lambda_paren = ignore # ignore/add/remove/force + # Add or remove space around assignment operator '=' in a prototype sp_assign_default = ignore # ignore/add/remove/force @@ -238,8 +261,11 @@ sp_enum_after_assign = ignore # ignore/add/remove/force # Add or remove space around preprocessor '##' concatenation operator. Default=Add sp_pp_concat = add # ignore/add/remove/force -# Add or remove space after preprocessor '#' stringify operator. Also affects the '#@' charizing operator. Default=Add -sp_pp_stringify = add # ignore/add/remove/force +# Add or remove space after preprocessor '#' stringify operator. Also affects the '#@' charizing operator. +sp_pp_stringify = ignore # ignore/add/remove/force + +# Add or remove space before preprocessor '#' stringify operator as in '#define x(y) L#y'. +sp_before_pp_stringify = ignore # ignore/add/remove/force # Add or remove space around boolean operators '&&' and '||' sp_bool = ignore # ignore/add/remove/force @@ -275,6 +301,9 @@ sp_after_ptr_star = ignore # ignore/add/remove/force # Add or remove space after a pointer star '*', if followed by a func proto/def. sp_after_ptr_star_func = ignore # ignore/add/remove/force +# Add or remove space after a pointer star '*', if followed by an open paren (function types). +sp_ptr_star_paren = ignore # ignore/add/remove/force + # Add or remove space before a pointer star '*', if followed by a func proto/def. sp_before_ptr_star_func = ignore # ignore/add/remove/force @@ -297,6 +326,9 @@ sp_before_byref_func = ignore # ignore/add/remove/force # Add or remove space between type and word. Default=Force sp_after_type = force # ignore/add/remove/force +# Add or remove space before the paren in the D constructs 'template Foo(' and 'class Foo('. +sp_before_template_paren = ignore # ignore/add/remove/force + # Add or remove space in 'template <' vs 'template<'. # If set to ignore, sp_before_angle is used. sp_template_angle = ignore # ignore/add/remove/force @@ -319,6 +351,10 @@ sp_angle_word = ignore # ignore/add/remove/force # Add or remove space between '>' and '>' in '>>' (template stuff C++/C# only). Default=Add sp_angle_shift = add # ignore/add/remove/force +# Permit removal of the space between '>>' in 'foo >' (C++11 only). Default=False +# sp_angle_shift cannot remove the space without this option. +sp_permit_cpp11_shift = false # false/true + # Add or remove space before '(' of 'if', 'for', 'switch', and 'while' sp_before_sparen = ignore # ignore/add/remove/force @@ -328,6 +364,9 @@ sp_inside_sparen = ignore # ignore/add/remove/force # Add or remove space before if-condition ')'. Overrides sp_inside_sparen. sp_inside_sparen_close = ignore # ignore/add/remove/force +# Add or remove space before if-condition '('. Overrides sp_inside_sparen. +sp_inside_sparen_open = ignore # ignore/add/remove/force + # Add or remove space after ')' of 'if', 'for', 'switch', and 'while' sp_after_sparen = ignore # ignore/add/remove/force @@ -440,6 +479,12 @@ sp_inside_fparens = ignore # ignore/add/remove/force # Add or remove space inside function '(' and ')' sp_inside_fparen = ignore # ignore/add/remove/force +# Add or remove space inside the first parens in the function type: 'void (*x)(...)' +sp_inside_tparen = ignore # ignore/add/remove/force + +# Add or remove between the parens in the function type: 'void (*x)(...)' +sp_after_tparen_close = ignore # ignore/add/remove/force + # Add or remove space between ']' and '(' when part of a function call. sp_square_fparen = ignore # ignore/add/remove/force @@ -472,6 +517,9 @@ sp_defined_paren = ignore # ignore/add/remove/force # Add or remove space between 'throw' and '(' in 'throw (something)' sp_throw_paren = ignore # ignore/add/remove/force +# Add or remove space between 'throw' and anything other than '(' as in '@throw [...];' +sp_after_throw = ignore # ignore/add/remove/force + # Add or remove space between 'catch' and '(' in 'catch (something) { }' # If set to ignore, sp_before_sparen is used. sp_catch_paren = ignore # ignore/add/remove/force @@ -563,6 +611,14 @@ sp_after_oc_colon = ignore # ignore/add/remove/force # '-(int) f: (int) x;' vs '-(int) f : (int) x;' sp_before_oc_colon = ignore # ignore/add/remove/force +# Add or remove space after the colon in immutable dictionary expression +# 'NSDictionary *test = @{@"foo" :@"bar"};' +sp_after_oc_dict_colon = ignore # ignore/add/remove/force + +# Add or remove space before the colon in immutable dictionary expression +# 'NSDictionary *test = @{@"foo" :@"bar"};' +sp_before_oc_dict_colon = ignore # ignore/add/remove/force + # Add or remove space after the colon in message specs # '[object setValue:1];' vs '[object setValue: 1];' sp_after_send_oc_colon = ignore # ignore/add/remove/force @@ -601,6 +657,13 @@ sp_before_oc_block_caret = ignore # ignore/add/remove/force # '^int (int arg){...}' vs. '^ int (int arg){...}' sp_after_oc_block_caret = ignore # ignore/add/remove/force +# Add or remove space between the receiver and selector in a message. +# '[receiver selector ...]' +sp_after_oc_msg_receiver = ignore # ignore/add/remove/force + +# Add or remove space after @property. +sp_after_oc_property = ignore # ignore/add/remove/force + # Add or remove space around the ':' in 'b ? t : f' sp_cond_colon = ignore # ignore/add/remove/force @@ -613,6 +676,15 @@ sp_case_label = ignore # ignore/add/remove/force # Control the space around the D '..' operator. sp_range = ignore # ignore/add/remove/force +# Control the spacing after ':' in 'for (TYPE VAR : EXPR)' (Java) +sp_after_for_colon = ignore # ignore/add/remove/force + +# Control the spacing before ':' in 'for (TYPE VAR : EXPR)' (Java) +sp_before_for_colon = ignore # ignore/add/remove/force + +# Control the spacing in 'extern (C)' (D) +sp_extern_paren = ignore # ignore/add/remove/force + # Control the space after the opening of a C++ comment '// A' vs '//A' sp_cmt_cpp_start = ignore # ignore/add/remove/force @@ -628,6 +700,9 @@ sp_before_tr_emb_cmt = ignore # ignore/add/remove/force # Number of spaces before a trailing or embedded comment sp_num_before_tr_emb_cmt = 0 # number +# Control space between a Java annotation and the open paren. +sp_annotation_paren = ignore # ignore/add/remove/force + # # Code alignment (not left column spaces/tabs) # @@ -772,6 +847,9 @@ align_oc_msg_spec_span = 0 # number # This will not work right if the macro contains a multi-line comment. align_nl_cont = false # false/true +# # Align macro functions and variables together +align_pp_define_together = false # false/true + # The minimum space between label and value of a preprocessor define align_pp_define_gap = 0 # number @@ -784,6 +862,9 @@ align_left_shift = true # false/true # Span for aligning parameters in an Obj-C message call on the ':' (0=don't align) align_oc_msg_colon_span = 0 # number +# If true, always align with the first parameter, even if it is too short. +align_oc_msg_colon_first = false # false/true + # Aligning parameters in an Obj-C '+' or '-' declaration on the ':' align_oc_decl_colon = false # false/true @@ -812,6 +893,9 @@ nl_func_leave_one_liners = false # false/true # Don't split one-line if/else statements - 'if(a) b++;' nl_if_leave_one_liners = false # false/true +# Don't split one-line OC messages +nl_oc_msg_leave_one_liner = false # false/true + # Add or remove newlines at the start of the file nl_start_of_file = ignore # ignore/add/remove/force @@ -833,10 +917,34 @@ nl_assign_square = ignore # ignore/add/remove/force # Add or remove newline after '= [' (D only). Will also affect the newline before the ']' nl_after_square_assign = ignore # ignore/add/remove/force -# The number of blank lines after a block of variable definitions at the top of a function body. -# 0=no change (default) +# The number of blank lines after a block of variable definitions at the top of a function body +# 0 = No change (default) nl_func_var_def_blk = 0 # number +# The number of newlines before a block of typedefs +# 0 = No change (default) +nl_typedef_blk_start = 0 # number + +# The number of newlines after a block of typedefs +# 0 = No change (default) +nl_typedef_blk_end = 0 # number + +# The maximum consecutive newlines within a block of typedefs +# 0 = No change (default) +nl_typedef_blk_in = 0 # number + +# The number of newlines before a block of variable definitions not at the top of a function body +# 0 = No change (default) +nl_var_def_blk_start = 0 # number + +# The number of newlines after a block of variable definitions not at the top of a function body +# 0 = No change (default) +nl_var_def_blk_end = 0 # number + +# The maximum consecutive newlines within a block of variable definitions +# 0 = No change (default) +nl_var_def_blk_in = 0 # number + # Add or remove newline between a function call's ')' and '{', as in: # list_for_each(item, &list) { } nl_fcall_brace = ignore # ignore/add/remove/force @@ -890,6 +998,15 @@ nl_brace_catch = ignore # ignore/add/remove/force # Add or remove newline between 'while' and '{' nl_while_brace = ignore # ignore/add/remove/force +# Add or remove newline between 'scope (x)' and '{' (D) +nl_scope_brace = ignore # ignore/add/remove/force + +# Add or remove newline between 'unittest' and '{' (D) +nl_unittest_brace = ignore # ignore/add/remove/force + +# Add or remove newline between 'version (x)' and '{' (D) +nl_version_brace = ignore # ignore/add/remove/force + # Add or remove newline between 'using' and '{' nl_using_brace = ignore # ignore/add/remove/force @@ -993,12 +1110,13 @@ nl_func_decl_empty = ignore # ignore/add/remove/force # Add or remove newline between '()' in a function definition. nl_func_def_empty = ignore # ignore/add/remove/force +# Whether to put each OC message parameter on a separate line +# See nl_oc_msg_leave_one_liner +nl_oc_msg_args = false # false/true + # Add or remove newline between function signature and '{' nl_fdef_brace = ignore # ignore/add/remove/force -# Whether to put a newline after 'return' statement -nl_after_return = false # false/true - # Add or remove a newline between the return keyword and return expression. nl_return_expr = ignore # ignore/add/remove/force @@ -1029,6 +1147,10 @@ nl_after_brace_close = false # false/true # Would add a newline before return in: 'if (foo) a++; return;' nl_after_vbrace_close = false # false/true +# Control the newline between the close brace and 'b' in: 'struct { int a; } b;' +# Affects enums, unions, and structures. If set to ignore, uses nl_after_brace_close +nl_brace_struct_var = ignore # ignore/add/remove/force + # Whether to alter newlines in '#define' macros nl_define_macro = false # false/true @@ -1093,29 +1215,29 @@ nl_create_while_one_liner = false # false/true # # The position of arithmetic operators in wrapped expressions -pos_arith = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_arith = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of assignment in wrapped expressions. # Do not affect '=' followed by '{' -pos_assign = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_assign = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of boolean operators in wrapped expressions -pos_bool = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_bool = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of comparison operators in wrapped expressions -pos_compare = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_compare = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of conditional (b ? t : f) operators in wrapped expressions -pos_conditional = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_conditional = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of the comma in wrapped expressions -pos_comma = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of the comma in the constructor initialization list -pos_class_comma = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_class_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of colons between constructor and member initialization -pos_class_colon = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_class_colon = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # # Line Splitting options @@ -1130,6 +1252,9 @@ ls_for_split_full = false # false/true # Whether to fully split long function protos/calls at commas ls_func_split_full = false # false/true +# Whether to split lines as close to code_width as possible and ignore some groupings +ls_code_width = false # false/true + # # Blank line options # @@ -1207,6 +1332,25 @@ eat_blanks_after_open_brace = false # false/true # Whether to remove blank lines before '}' eat_blanks_before_close_brace = false # false/true +# How aggressively to remove extra newlines not in preproc. +# 0: No change +# 1: Remove most newlines not handled by other config +# 2: Remove all newlines and reformat completely by config +nl_remove_extra_newlines = 0 # number + +# Whether to put a blank line before 'return' statements, unless after an open brace. +nl_before_return = false # false/true + +# Whether to put a blank line after 'return' statements, unless followed by a close brace. +nl_after_return = false # false/true + +# Whether to put a newline after a Java annotation statement. +# Only affects annotations that are after a newline. +nl_after_annotation = ignore # ignore/add/remove/force + +# Controls the newline between two annotations. +nl_between_annotation = ignore # ignore/add/remove/force + # # Code modifying options (non-whitespace) # diff --git a/etc/defaults.cfg b/etc/defaults.cfg index e771038707..787ef6508f 100644 --- a/etc/defaults.cfg +++ b/etc/defaults.cfg @@ -1,4 +1,4 @@ -# Uncrustify 0.59 +# Uncrustify 0.60 # # General options @@ -24,10 +24,10 @@ string_escape_char2 = 0 # number # Improvements to template detection may make this option obsolete. tok_split_gte = false # false/true -# Control what to do with the UTF-8 BOM (recommed 'remove') +# Control what to do with the UTF-8 BOM (recommend 'remove') utf8_bom = ignore # ignore/add/remove/force -# If the file only contains chars between 128 and 255 and is not UTF-8, then output as UTF-8 +# If the file contains bytes with values between 128 and 255, but is not UTF-8, then output as UTF-8 utf8_byte = false # false/true # Force the output encoding to UTF-8 @@ -42,7 +42,7 @@ utf8_force = false # false/true indent_columns = 8 # number # The continuation indent. If non-zero, this overrides the indent of '(' and '=' continuation indents. -# For FreeBSD, this is set to 4. +# For FreeBSD, this is set to 4. Negative value is absolute and not increased for each ( level indent_continue = 0 # number # How to use tabs when indenting code @@ -99,6 +99,9 @@ indent_class = false # false/true # Whether to indent the stuff after a leading class colon indent_class_colon = false # false/true +# Virtual indent from the ':' for member initializers. Default is 2 +indent_ctor_init_leading = 2 # number + # Additional indenting for constructor initializer list indent_ctor_init = 0 # number @@ -112,6 +115,10 @@ indent_var_def_blk = 0 # number # Indent continued variable declarations instead of aligning. indent_var_def_cont = false # false/true +# True: force indentation of function definition to start in column 1 +# False: use the default behavior +indent_func_def_force_col1 = false # false/true + # True: indent continued function call parameters one indent level # False: align parameters under the open paren indent_func_call_param = false # false/true @@ -207,6 +214,16 @@ indent_preserve_sql = false # false/true # If FALSE or the '=' is followed by a newline, the next line is indent one tab. indent_align_assign = true # false/true +# Indent OC blocks at brace level instead of usual rules. +indent_oc_block = false # false/true + +# Indent OC blocks in a message relative to the parameter name. +# 0=use indent_oc_block rules, 1+=spaces to indent +indent_oc_block_msg = 0 # number + +# Minimum indent for subsequent parameters +indent_oc_msg_colon = 0 # number + # # Spacing options # @@ -217,6 +234,12 @@ sp_arith = ignore # ignore/add/remove/force # Add or remove space around assignment operator '=', '+=', etc sp_assign = ignore # ignore/add/remove/force +# Add or remove space around '=' in C++11 lambda capture specifications. Overrides sp_assign +sp_cpp_lambda_assign = ignore # ignore/add/remove/force + +# Add or remove space after the capture specification in C++11 lambda. +sp_cpp_lambda_paren = ignore # ignore/add/remove/force + # Add or remove space around assignment operator '=' in a prototype sp_assign_default = ignore # ignore/add/remove/force @@ -238,8 +261,11 @@ sp_enum_after_assign = ignore # ignore/add/remove/force # Add or remove space around preprocessor '##' concatenation operator. Default=Add sp_pp_concat = add # ignore/add/remove/force -# Add or remove space after preprocessor '#' stringify operator. Also affects the '#@' charizing operator. Default=Add -sp_pp_stringify = add # ignore/add/remove/force +# Add or remove space after preprocessor '#' stringify operator. Also affects the '#@' charizing operator. +sp_pp_stringify = ignore # ignore/add/remove/force + +# Add or remove space before preprocessor '#' stringify operator as in '#define x(y) L#y'. +sp_before_pp_stringify = ignore # ignore/add/remove/force # Add or remove space around boolean operators '&&' and '||' sp_bool = ignore # ignore/add/remove/force @@ -275,6 +301,9 @@ sp_after_ptr_star = ignore # ignore/add/remove/force # Add or remove space after a pointer star '*', if followed by a func proto/def. sp_after_ptr_star_func = ignore # ignore/add/remove/force +# Add or remove space after a pointer star '*', if followed by an open paren (function types). +sp_ptr_star_paren = ignore # ignore/add/remove/force + # Add or remove space before a pointer star '*', if followed by a func proto/def. sp_before_ptr_star_func = ignore # ignore/add/remove/force @@ -297,6 +326,9 @@ sp_before_byref_func = ignore # ignore/add/remove/force # Add or remove space between type and word. Default=Force sp_after_type = force # ignore/add/remove/force +# Add or remove space before the paren in the D constructs 'template Foo(' and 'class Foo('. +sp_before_template_paren = ignore # ignore/add/remove/force + # Add or remove space in 'template <' vs 'template<'. # If set to ignore, sp_before_angle is used. sp_template_angle = ignore # ignore/add/remove/force @@ -319,6 +351,10 @@ sp_angle_word = ignore # ignore/add/remove/force # Add or remove space between '>' and '>' in '>>' (template stuff C++/C# only). Default=Add sp_angle_shift = add # ignore/add/remove/force +# Permit removal of the space between '>>' in 'foo >' (C++11 only). Default=False +# sp_angle_shift cannot remove the space without this option. +sp_permit_cpp11_shift = false # false/true + # Add or remove space before '(' of 'if', 'for', 'switch', and 'while' sp_before_sparen = ignore # ignore/add/remove/force @@ -328,6 +364,9 @@ sp_inside_sparen = ignore # ignore/add/remove/force # Add or remove space before if-condition ')'. Overrides sp_inside_sparen. sp_inside_sparen_close = ignore # ignore/add/remove/force +# Add or remove space before if-condition '('. Overrides sp_inside_sparen. +sp_inside_sparen_open = ignore # ignore/add/remove/force + # Add or remove space after ')' of 'if', 'for', 'switch', and 'while' sp_after_sparen = ignore # ignore/add/remove/force @@ -440,6 +479,12 @@ sp_inside_fparens = ignore # ignore/add/remove/force # Add or remove space inside function '(' and ')' sp_inside_fparen = ignore # ignore/add/remove/force +# Add or remove space inside the first parens in the function type: 'void (*x)(...)' +sp_inside_tparen = ignore # ignore/add/remove/force + +# Add or remove between the parens in the function type: 'void (*x)(...)' +sp_after_tparen_close = ignore # ignore/add/remove/force + # Add or remove space between ']' and '(' when part of a function call. sp_square_fparen = ignore # ignore/add/remove/force @@ -472,6 +517,9 @@ sp_defined_paren = ignore # ignore/add/remove/force # Add or remove space between 'throw' and '(' in 'throw (something)' sp_throw_paren = ignore # ignore/add/remove/force +# Add or remove space between 'throw' and anything other than '(' as in '@throw [...];' +sp_after_throw = ignore # ignore/add/remove/force + # Add or remove space between 'catch' and '(' in 'catch (something) { }' # If set to ignore, sp_before_sparen is used. sp_catch_paren = ignore # ignore/add/remove/force @@ -563,6 +611,14 @@ sp_after_oc_colon = ignore # ignore/add/remove/force # '-(int) f: (int) x;' vs '-(int) f : (int) x;' sp_before_oc_colon = ignore # ignore/add/remove/force +# Add or remove space after the colon in immutable dictionary expression +# 'NSDictionary *test = @{@"foo" :@"bar"};' +sp_after_oc_dict_colon = ignore # ignore/add/remove/force + +# Add or remove space before the colon in immutable dictionary expression +# 'NSDictionary *test = @{@"foo" :@"bar"};' +sp_before_oc_dict_colon = ignore # ignore/add/remove/force + # Add or remove space after the colon in message specs # '[object setValue:1];' vs '[object setValue: 1];' sp_after_send_oc_colon = ignore # ignore/add/remove/force @@ -601,6 +657,13 @@ sp_before_oc_block_caret = ignore # ignore/add/remove/force # '^int (int arg){...}' vs. '^ int (int arg){...}' sp_after_oc_block_caret = ignore # ignore/add/remove/force +# Add or remove space between the receiver and selector in a message. +# '[receiver selector ...]' +sp_after_oc_msg_receiver = ignore # ignore/add/remove/force + +# Add or remove space after @property. +sp_after_oc_property = ignore # ignore/add/remove/force + # Add or remove space around the ':' in 'b ? t : f' sp_cond_colon = ignore # ignore/add/remove/force @@ -613,6 +676,15 @@ sp_case_label = ignore # ignore/add/remove/force # Control the space around the D '..' operator. sp_range = ignore # ignore/add/remove/force +# Control the spacing after ':' in 'for (TYPE VAR : EXPR)' (Java) +sp_after_for_colon = ignore # ignore/add/remove/force + +# Control the spacing before ':' in 'for (TYPE VAR : EXPR)' (Java) +sp_before_for_colon = ignore # ignore/add/remove/force + +# Control the spacing in 'extern (C)' (D) +sp_extern_paren = ignore # ignore/add/remove/force + # Control the space after the opening of a C++ comment '// A' vs '//A' sp_cmt_cpp_start = ignore # ignore/add/remove/force @@ -628,6 +700,9 @@ sp_before_tr_emb_cmt = ignore # ignore/add/remove/force # Number of spaces before a trailing or embedded comment sp_num_before_tr_emb_cmt = 0 # number +# Control space between a Java annotation and the open paren. +sp_annotation_paren = ignore # ignore/add/remove/force + # # Code alignment (not left column spaces/tabs) # @@ -772,6 +847,9 @@ align_oc_msg_spec_span = 0 # number # This will not work right if the macro contains a multi-line comment. align_nl_cont = false # false/true +# # Align macro functions and variables together +align_pp_define_together = false # false/true + # The minimum space between label and value of a preprocessor define align_pp_define_gap = 0 # number @@ -784,6 +862,9 @@ align_left_shift = true # false/true # Span for aligning parameters in an Obj-C message call on the ':' (0=don't align) align_oc_msg_colon_span = 0 # number +# If true, always align with the first parameter, even if it is too short. +align_oc_msg_colon_first = false # false/true + # Aligning parameters in an Obj-C '+' or '-' declaration on the ':' align_oc_decl_colon = false # false/true @@ -812,6 +893,9 @@ nl_func_leave_one_liners = false # false/true # Don't split one-line if/else statements - 'if(a) b++;' nl_if_leave_one_liners = false # false/true +# Don't split one-line OC messages +nl_oc_msg_leave_one_liner = false # false/true + # Add or remove newlines at the start of the file nl_start_of_file = ignore # ignore/add/remove/force @@ -833,10 +917,34 @@ nl_assign_square = ignore # ignore/add/remove/force # Add or remove newline after '= [' (D only). Will also affect the newline before the ']' nl_after_square_assign = ignore # ignore/add/remove/force -# The number of blank lines after a block of variable definitions at the top of a function body. -# 0=no change (default) +# The number of blank lines after a block of variable definitions at the top of a function body +# 0 = No change (default) nl_func_var_def_blk = 0 # number +# The number of newlines before a block of typedefs +# 0 = No change (default) +nl_typedef_blk_start = 0 # number + +# The number of newlines after a block of typedefs +# 0 = No change (default) +nl_typedef_blk_end = 0 # number + +# The maximum consecutive newlines within a block of typedefs +# 0 = No change (default) +nl_typedef_blk_in = 0 # number + +# The number of newlines before a block of variable definitions not at the top of a function body +# 0 = No change (default) +nl_var_def_blk_start = 0 # number + +# The number of newlines after a block of variable definitions not at the top of a function body +# 0 = No change (default) +nl_var_def_blk_end = 0 # number + +# The maximum consecutive newlines within a block of variable definitions +# 0 = No change (default) +nl_var_def_blk_in = 0 # number + # Add or remove newline between a function call's ')' and '{', as in: # list_for_each(item, &list) { } nl_fcall_brace = ignore # ignore/add/remove/force @@ -890,6 +998,15 @@ nl_brace_catch = ignore # ignore/add/remove/force # Add or remove newline between 'while' and '{' nl_while_brace = ignore # ignore/add/remove/force +# Add or remove newline between 'scope (x)' and '{' (D) +nl_scope_brace = ignore # ignore/add/remove/force + +# Add or remove newline between 'unittest' and '{' (D) +nl_unittest_brace = ignore # ignore/add/remove/force + +# Add or remove newline between 'version (x)' and '{' (D) +nl_version_brace = ignore # ignore/add/remove/force + # Add or remove newline between 'using' and '{' nl_using_brace = ignore # ignore/add/remove/force @@ -993,12 +1110,13 @@ nl_func_decl_empty = ignore # ignore/add/remove/force # Add or remove newline between '()' in a function definition. nl_func_def_empty = ignore # ignore/add/remove/force +# Whether to put each OC message parameter on a separate line +# See nl_oc_msg_leave_one_liner +nl_oc_msg_args = false # false/true + # Add or remove newline between function signature and '{' nl_fdef_brace = ignore # ignore/add/remove/force -# Whether to put a newline after 'return' statement -nl_after_return = false # false/true - # Add or remove a newline between the return keyword and return expression. nl_return_expr = ignore # ignore/add/remove/force @@ -1029,6 +1147,10 @@ nl_after_brace_close = false # false/true # Would add a newline before return in: 'if (foo) a++; return;' nl_after_vbrace_close = false # false/true +# Control the newline between the close brace and 'b' in: 'struct { int a; } b;' +# Affects enums, unions, and structures. If set to ignore, uses nl_after_brace_close +nl_brace_struct_var = ignore # ignore/add/remove/force + # Whether to alter newlines in '#define' macros nl_define_macro = false # false/true @@ -1093,29 +1215,29 @@ nl_create_while_one_liner = false # false/true # # The position of arithmetic operators in wrapped expressions -pos_arith = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_arith = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of assignment in wrapped expressions. # Do not affect '=' followed by '{' -pos_assign = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_assign = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of boolean operators in wrapped expressions -pos_bool = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_bool = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of comparison operators in wrapped expressions -pos_compare = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_compare = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of conditional (b ? t : f) operators in wrapped expressions -pos_conditional = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_conditional = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of the comma in wrapped expressions -pos_comma = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of the comma in the constructor initialization list -pos_class_comma = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_class_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of colons between constructor and member initialization -pos_class_colon = ignore # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_class_colon = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # # Line Splitting options @@ -1130,6 +1252,9 @@ ls_for_split_full = false # false/true # Whether to fully split long function protos/calls at commas ls_func_split_full = false # false/true +# Whether to split lines as close to code_width as possible and ignore some groupings +ls_code_width = false # false/true + # # Blank line options # @@ -1207,6 +1332,25 @@ eat_blanks_after_open_brace = false # false/true # Whether to remove blank lines before '}' eat_blanks_before_close_brace = false # false/true +# How aggressively to remove extra newlines not in preproc. +# 0: No change +# 1: Remove most newlines not handled by other config +# 2: Remove all newlines and reformat completely by config +nl_remove_extra_newlines = 0 # number + +# Whether to put a blank line before 'return' statements, unless after an open brace. +nl_before_return = false # false/true + +# Whether to put a blank line after 'return' statements, unless followed by a close brace. +nl_after_return = false # false/true + +# Whether to put a newline after a Java annotation statement. +# Only affects annotations that are after a newline. +nl_after_annotation = ignore # ignore/add/remove/force + +# Controls the newline between two annotations. +nl_between_annotation = ignore # ignore/add/remove/force + # # Code modifying options (non-whitespace) #