enhanced beautification, better formatting, upgrade to 0.60 uncrustify.cfg

This commit is contained in:
Dick Hollenbeck 2013-08-26 15:15:00 -05:00
parent c40f5917c1
commit 0c2e03ae32
1 changed files with 543 additions and 433 deletions

View File

@ -1,4 +1,4 @@
# Uncrustify 0.59
# Uncrustify 0.60
#
# General options
@ -28,10 +28,10 @@ tok_split_gte = false # false/true
utf8_bom = ignore # ignore/add/remove/force
# 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
utf8_byte = true # false/true
# Force the output encoding to UTF-8
utf8_force = false # false/true
utf8_force = true # false/true
#
# Indenting
@ -121,31 +121,31 @@ 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
indent_func_call_param = true # false/true
# Same as indent_func_call_param, but for function defs
indent_func_def_param = false # false/true
indent_func_def_param = true # false/true
# Same as indent_func_call_param, but for function protos
indent_func_proto_param = false # false/true
indent_func_proto_param = true # false/true
# Same as indent_func_call_param, but for class declarations
indent_func_class_param = false # false/true
indent_func_class_param = true # false/true
# Same as indent_func_call_param, but for class variable constructors
indent_func_ctor_var_param = false # false/true
indent_func_ctor_var_param = true # false/true
# Same as indent_func_call_param, but for templates
indent_template_param = false # false/true
indent_template_param = true # false/true
# Double the indent for indent_func_xxx_param options
indent_func_param_double = false # false/true
indent_func_param_double = true # false/true
# Indentation column for standalone 'const' function decl/proto qualifier
indent_func_const = 0 # number
# Indentation column for standalone 'throw' function decl/proto qualifier
indent_func_throw = 0 # number
indent_func_throw = 1 # number
# The number of spaces to indent a continued '->' or '.'
# Usually set to 0, 1, or indent_columns.
@ -214,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
#
@ -251,9 +261,12 @@ 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
# Add or remove space after preprocessor '#' stringify operator. Also affects the '#@' charizing operator.
sp_pp_stringify = add # 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
@ -263,9 +276,12 @@ sp_compare = ignore # ignore/add/remove/force
# Add or remove space inside '(' and ')'
sp_inside_paren = ignore # ignore/add/remove/force
# Add or remove space between nested parens
# Add or remove space between nested parens: '((' vs ') )'
sp_paren_paren = ignore # ignore/add/remove/force
# Add or remove space between back-to-back parens: ')(' vs ') ('
sp_cparen_oparen = ignore # ignore/add/remove/force
# Whether to balance spaces inside nested parens
sp_balance_nested_parens = true # false/true
@ -288,6 +304,9 @@ sp_after_ptr_star = force # 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
@ -348,6 +367,9 @@ sp_inside_sparen = add # 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
@ -442,7 +464,7 @@ sp_inside_braces_struct = add # ignore/add/remove/force
sp_inside_braces = add # ignore/add/remove/force
# Add or remove space inside '{}'
sp_inside_braces_empty = ignore # ignore/add/remove/force
sp_inside_braces_empty = remove # ignore/add/remove/force
# Add or remove space between return type and function name
# A minimum of 1 is forced except for pointer return types.
@ -460,6 +482,12 @@ sp_inside_fparens = remove # ignore/add/remove/force
# Add or remove space inside function '(' and ')'
sp_inside_fparen = add # 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 = remove # ignore/add/remove/force
# Add or remove space between ']' and '(' when part of a function call.
sp_square_fparen = ignore # ignore/add/remove/force
@ -471,7 +499,7 @@ sp_func_call_paren = remove # ignore/add/remove/force
# Add or remove space between function name and '()' on function calls without parameters.
# If set to 'ignore' (the default), sp_func_call_paren is used.
sp_func_call_paren_empty = ignore # ignore/add/remove/force
sp_func_call_paren_empty = remove # ignore/add/remove/force
# Add or remove space between the user function name and '(' on function calls
# You need to set a keyword to be a user function, like this: 'set func_call_user _' in the config file.
@ -492,6 +520,9 @@ sp_defined_paren = remove # 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 = add # 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 = remove # ignore/add/remove/force
@ -537,6 +568,12 @@ sp_try_brace = add # ignore/add/remove/force
# Add or remove space between get/set and '{' if on the same line
sp_getset_brace = add # ignore/add/remove/force
# Add or remove space between a variable and '{' for C++ uniform initialization
sp_word_brace = add # ignore/add/remove/force
# Add or remove space between a variable and '{' for a namespace
sp_word_brace_ns = add # ignore/add/remove/force
# Add or remove space before the '::' operator
sp_before_dc = ignore # ignore/add/remove/force
@ -583,6 +620,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
@ -621,18 +666,46 @@ 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 = add # ignore/add/remove/force
# Add or remove space before the ':' in 'b ? t : f'. Overrides sp_cond_colon.
sp_cond_colon_before = ignore # ignore/add/remove/force
# Add or remove space after the ':' in 'b ? t : f'. Overrides sp_cond_colon.
sp_cond_colon_after = ignore # ignore/add/remove/force
# Add or remove space around the '?' in 'b ? t : f'
sp_cond_question = add # ignore/add/remove/force
# Add or remove space before the '?' in 'b ? t : f'. Overrides sp_cond_question.
sp_cond_question_before = ignore # ignore/add/remove/force
# Add or remove space after the '?' in 'b ? t : f'. Overrides sp_cond_question.
sp_cond_question_after = ignore # ignore/add/remove/force
# Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make sense here.
sp_case_label = force # 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 = force # ignore/add/remove/force
# Control the spacing before ':' in 'for (TYPE VAR : EXPR)' (Java)
sp_before_for_colon = force # 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 = force # ignore/add/remove/force
@ -648,6 +721,9 @@ sp_before_tr_emb_cmt = add # ignore/add/remove/force
# Number of spaces before a trailing or embedded comment
sp_num_before_tr_emb_cmt = 4 # 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)
#
@ -664,15 +740,18 @@ align_on_tabstop = true # false/true
# Whether to left-align numbers
align_number_left = true # false/true
# Whether to keep whitespace not required for alignment.
align_keep_extra_space = false # false/true
# Align variable definitions in prototypes and functions
align_func_params = true # false/true
align_func_params = false # false/true
# Align parameters in single-line functions that have the same name.
# The function names must already be aligned with each other.
align_same_func_call_params = false # false/true
# The span for aligning variable definitions (0=don't align)
align_var_def_span = 3 # number
align_var_def_span = 1 # number
# How to align the star in variable definitions.
# 0=Part of the type 'void * foo;'
@ -687,13 +766,13 @@ align_var_def_star_style = 0 # number
align_var_def_amp_style = 0 # number
# The threshold for aligning variable definitions (0=no limit)
align_var_def_thresh = 12 # number
align_var_def_thresh = 1 # number
# The gap for aligning variable definitions
align_var_def_gap = 0 # number
align_var_def_gap = 1 # number
# Whether to align the colon in struct bit fields
align_var_def_colon = false # false/true
align_var_def_colon = true # false/true
# Whether to align any attribute after the variable name
align_var_def_attribute = false # false/true
@ -705,22 +784,22 @@ align_var_def_inline = false # false/true
align_assign_span = 1 # number
# The threshold for aligning on '=' in assignments (0=no limit)
align_assign_thresh = 4 # number
align_assign_thresh = 1 # number
# The span for aligning on '=' in enums (0=don't align)
align_enum_equ_span = 3 # number
align_enum_equ_span = 1 # number
# The threshold for aligning on '=' in enums (0=no limit)
align_enum_equ_thresh = 2 # number
align_enum_equ_thresh = 1 # number
# The span for aligning struct/union (0=don't align)
align_var_struct_span = 1 # number
# The threshold for aligning struct/union member definitions (0=no limit)
align_var_struct_thresh = 0 # number
align_var_struct_thresh = 1 # number
# The gap for aligning struct/union member definitions
align_var_struct_gap = 0 # number
align_var_struct_gap = 1 # number
# The span for aligning struct initializer values (0=don't align)
align_struct_init_span = 1 # number
@ -729,7 +808,7 @@ align_struct_init_span = 1 # number
align_typedef_gap = 1 # number
# The span for aligning single-line typedefs (0=don't align)
align_typedef_span = 2 # number
align_typedef_span = 1 # number
# How to align typedef'd functions with other typedefs
# 0: Don't mix them at all
@ -741,7 +820,7 @@ align_typedef_func = 0 # number
# 0: Align on typedef type, ignore '*'
# 1: The '*' is part of type name: typedef int *pint;
# 2: The '*' is part of the type, but dangling: typedef int *pint;
align_typedef_star_style = 2 # number
align_typedef_star_style = 0 # number
# Controls the positioning of the '&' in typedefs. Just try it.
# 0: Align on typedef type, ignore '&'
@ -763,7 +842,7 @@ align_right_cmt_gap = 0 # number
align_right_cmt_at_col = 0 # number
# The span for aligning function prototypes (0=don't align)
align_func_proto_span = 5 # number
align_func_proto_span = 1 # number
# Minimum gap between the return type and the function name.
align_func_proto_gap = 0 # number
@ -799,7 +878,7 @@ align_pp_define_together = false # false/true
align_pp_define_gap = 1 # number
# The span for aligning on '#define' bodies (0=don't align)
align_pp_define_span = 1 # number
align_pp_define_span = 2 # number
# Align lines that start with '<<' with previous '<<'. Default=true
align_left_shift = true # false/true
@ -807,6 +886,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
@ -832,9 +914,15 @@ nl_getset_leave_one_liners = false # false/true
# Don't split one-line function definitions - 'int foo() { return 0; }'
nl_func_leave_one_liners = false # false/true
# Don't split one-line C++11 lambdas - '[]() { return 0; }'
nl_cpp_lambda_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
@ -889,13 +977,13 @@ nl_var_def_blk_in = 0 # number
nl_fcall_brace = remove # ignore/add/remove/force
# Add or remove newline between 'enum' and '{'
nl_enum_brace = remove # ignore/add/remove/force
nl_enum_brace = force # ignore/add/remove/force
# Add or remove newline between 'struct and '{'
nl_struct_brace = add # ignore/add/remove/force
nl_struct_brace = force # ignore/add/remove/force
# Add or remove newline between 'union' and '{'
nl_union_brace = add # ignore/add/remove/force
nl_union_brace = force # ignore/add/remove/force
# Add or remove newline between 'if' and '{'
nl_if_brace = force # ignore/add/remove/force
@ -914,10 +1002,10 @@ nl_else_brace = force # ignore/add/remove/force
nl_else_if = remove # ignore/add/remove/force
# Add or remove newline between '}' and 'finally'
nl_brace_finally = ignore # ignore/add/remove/force
nl_brace_finally = force # ignore/add/remove/force
# Add or remove newline between 'finally' and '{'
nl_finally_brace = ignore # ignore/add/remove/force
nl_finally_brace = force # ignore/add/remove/force
# Add or remove newline between 'try' and '{'
nl_try_brace = force # ignore/add/remove/force
@ -979,10 +1067,10 @@ nl_before_throw = ignore # ignore/add/remove/force
nl_after_case = true # false/true
# Add or remove a newline between a case ':' and '{'. Overrides nl_after_case.
nl_case_colon_brace = ignore # ignore/add/remove/force
nl_case_colon_brace = force # ignore/add/remove/force
# Newline between namespace and {
nl_namespace_brace = ignore # ignore/add/remove/force
nl_namespace_brace = remove # ignore/add/remove/force
# Add or remove newline between 'template<>' and whatever follows.
nl_template_class = force # ignore/add/remove/force
@ -1014,10 +1102,10 @@ nl_func_paren = remove # ignore/add/remove/force
nl_func_def_paren = remove # ignore/add/remove/force
# Add or remove newline after '(' in a function declaration
nl_func_decl_start = ignore # ignore/add/remove/force
nl_func_decl_start = remove # ignore/add/remove/force
# Add or remove newline after '(' in a function definition
nl_func_def_start = ignore # ignore/add/remove/force
nl_func_def_start = remove # ignore/add/remove/force
# Overrides nl_func_decl_start when there is only one parameter.
nl_func_decl_start_single = remove # ignore/add/remove/force
@ -1049,9 +1137,16 @@ nl_func_decl_empty = remove # ignore/add/remove/force
# Add or remove newline between '()' in a function definition.
nl_func_def_empty = remove # 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 = force # ignore/add/remove/force
# Add or remove newline between C++11 lambda signature and '{'
nl_cpp_ldef_brace = ignore # ignore/add/remove/force
# Add or remove a newline between the return keyword and return expression.
nl_return_expr = remove # ignore/add/remove/force
@ -1082,6 +1177,10 @@ nl_after_brace_close = true # false/true
# Would add a newline before return in: 'if (foo) a++; return;'
nl_after_vbrace_close = true # 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
@ -1175,7 +1274,7 @@ pos_class_colon = trail # ignore/join/lead/lead_brea
#
# Try to limit code width to N number of columns
code_width = 99 # number
code_width = 100 # number
# Whether to fully split long 'for' statements at semi-colons
ls_for_split_full = true # false/true
@ -1232,7 +1331,7 @@ nl_after_class = 0 # number
# The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
# Will not change the newline count if after a brace open.
# 0 = No change.
nl_before_access_spec = 1 # number
nl_before_access_spec = 2 # number
# The number of newlines after a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
# 0 = No change.
@ -1275,6 +1374,13 @@ 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)
#
@ -1320,6 +1426,10 @@ mod_remove_extra_semicolon = false # false/true
# the close brace, a comment will be added.
mod_add_long_function_closebrace_comment = 0 # number
# If a namespace body exceeds the specified number of newlines and doesn't have a comment after
# the close brace, a comment will be added.
mod_add_long_namespace_closebrace_comment = 0 # number
# If a switch body exceeds the specified number of newlines and doesn't have a comment after
# the close brace, a comment will be added.
mod_add_long_switch_closebrace_comment = 0 # number