diff options
author | Dundar Göc <gocdundar@gmail.com> | 2021-09-01 12:45:11 +0200 |
---|---|---|
committer | Dundar Göc <gocdundar@gmail.com> | 2021-09-03 21:23:23 +0200 |
commit | 15af08ad176339d1f269ce264bb0efea283c9536 (patch) | |
tree | 37290ac2300c0e2977251e48c59045c9855a3f10 /contrib | |
parent | 5f8518b3f04c2295be24912dba78d3e34ca74b91 (diff) | |
download | rneovim-15af08ad176339d1f269ce264bb0efea283c9536.tar.gz rneovim-15af08ad176339d1f269ce264bb0efea283c9536.tar.bz2 rneovim-15af08ad176339d1f269ce264bb0efea283c9536.zip |
refactor: update uncrustify config and format screen.c
Also set new option cmt_trailing_single_line_c_to_cpp to true. It
converts trailing, single-line c-comments (/**/) into cpp-comments (//).
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/uncrustify.cfg | 525 |
1 files changed, 461 insertions, 64 deletions
diff --git a/contrib/uncrustify.cfg b/contrib/uncrustify.cfg index 79923ffda0..8dbd752d05 100644 --- a/contrib/uncrustify.cfg +++ b/contrib/uncrustify.cfg @@ -1,4 +1,4 @@ -# Uncrustify_d-0.73.0_f +# Uncrustify_d-0.73.0-159-81b1bc77 # # General options @@ -149,7 +149,7 @@ sp_enum_colon = ignore # ignore/add/remove/force/not_defined # Add or remove space around preprocessor '##' concatenation operator. # # Default: add -sp_pp_concat = ignore # ignore/add/remove/force/not_defined +sp_pp_concat = ignore # ignore/add/remove/force/not_defined # Add or remove space after preprocessor '#' stringify operator. # Also affects the '#@' charizing operator. @@ -190,7 +190,7 @@ sp_before_ptr_star = ignore # ignore/add/remove/force/not_defined # variable name. If set to ignore, sp_before_ptr_star is used instead. sp_before_unnamed_ptr_star = ignore # ignore/add/remove/force/not_defined -# Add or remove space between pointer stars '*'. +# Add or remove space between pointer stars '*', as in 'int ***a;'. sp_between_ptr_star = ignore # ignore/add/remove/force/not_defined # Add or remove space after pointer star '*', if followed by a word. @@ -210,14 +210,22 @@ sp_after_ptr_star_qualifier = ignore # ignore/add/remove/force/not_defined # Overrides sp_after_ptr_star and sp_type_func. sp_after_ptr_star_func = ignore # ignore/add/remove/force/not_defined +# Add or remove space after a pointer star '*' in the trailing return of a +# function prototype or function definition. +sp_after_ptr_star_trailing = ignore # ignore/add/remove/force/not_defined + # Add or remove space after a pointer star '*', if followed by an open -# parenthesis, as in 'void* (*)(). +# parenthesis, as in 'void* (*)()'. sp_ptr_star_paren = ignore # ignore/add/remove/force/not_defined # Add or remove space before a pointer star '*', if followed by a function # prototype or function definition. sp_before_ptr_star_func = ignore # ignore/add/remove/force/not_defined +# Add or remove space before a pointer star '*' in the trailing return of a +# function prototype or function definition. +sp_before_ptr_star_trailing = ignore # ignore/add/remove/force/not_defined + # Add or remove space before a reference sign '&'. sp_before_byref = ignore # ignore/add/remove/force/not_defined @@ -251,12 +259,16 @@ sp_before_byref_func = ignore # ignore/add/remove/force/not_defined # following word. # # Default: force -sp_after_type = ignore # ignore/add/remove/force/not_defined +sp_after_type = ignore # ignore/add/remove/force/not_defined # Add or remove space between 'decltype(...)' and word, # brace or function call. sp_after_decltype = ignore # ignore/add/remove/force/not_defined +# (D) Add or remove space before the parenthesis in the D constructs +# 'template Foo(' and 'class Foo('. +sp_before_template_paren = ignore # ignore/add/remove/force/not_defined + # Add or remove space between 'template' and '<'. # If set to ignore, sp_before_angle is used. sp_template_angle = ignore # ignore/add/remove/force/not_defined @@ -289,7 +301,7 @@ sp_angle_word = ignore # ignore/add/remove/force/not_defined # Add or remove space between '>' and '>' in '>>' (template stuff). # # Default: add -sp_angle_shift = ignore # ignore/add/remove/force/not_defined +sp_angle_shift = ignore # ignore/add/remove/force/not_defined # (C++11) Permit removal of the space between '>>' in 'foo<bar<int> >'. Note # that sp_angle_shift cannot remove the space without this option. @@ -313,7 +325,7 @@ sp_inside_sparen_open = remove # ignore/add/remove/force/not_defined sp_inside_sparen_close = ignore # ignore/add/remove/force/not_defined # Add or remove space between '((' or '))' of control statements. -# sp_sparen_paren = ignore # ignore/add/remove/force/not_defined +sp_sparen_paren = ignore # ignore/add/remove/force/not_defined # Add or remove space after ')' of control statements. sp_after_sparen = ignore # ignore/add/remove/force/not_defined @@ -330,6 +342,12 @@ sp_brace_close_while = ignore # ignore/add/remove/force/not_defined # Add or remove space between 'while' and '('. Overrides sp_before_sparen. sp_while_paren_open = ignore # ignore/add/remove/force/not_defined +# (D) Add or remove space between 'invariant' and '('. +sp_invariant_paren = ignore # ignore/add/remove/force/not_defined + +# (D) Add or remove space after the ')' in 'invariant (C) c'. +sp_after_invariant_paren = ignore # ignore/add/remove/force/not_defined + # Add or remove space before empty statement ';' on 'if', 'for' and 'while'. sp_special_semi = ignore # ignore/add/remove/force/not_defined @@ -341,18 +359,23 @@ sp_before_semi = ignore # ignore/add/remove/force/not_defined # Add or remove space before ';' in non-empty 'for' statements. sp_before_semi_for = ignore # ignore/add/remove/force/not_defined -# Add or remove space before a semicolon of an empty part of a for statement. +# Add or remove space before a semicolon of an empty left part of a for +# statement, as in 'for ( <here> ; ; )'. sp_before_semi_for_empty = ignore # ignore/add/remove/force/not_defined +# Add or remove space between the semicolons of an empty middle part of a for +# statement, as in 'for ( ; <here> ; )'. +sp_between_semi_for_empty = ignore # ignore/add/remove/force/not_defined + # Add or remove space after ';', except when followed by a comment. # # Default: add -sp_after_semi = ignore # ignore/add/remove/force/not_defined +sp_after_semi = ignore # ignore/add/remove/force/not_defined # Add or remove space after ';' in non-empty 'for' statements. # # Default: force -sp_after_semi_for = ignore # ignore/add/remove/force/not_defined +sp_after_semi_for = ignore # ignore/add/remove/force/not_defined # Add or remove space after the final semicolon of an empty part of a for # statement, as in 'for ( ; ; <here> )'. @@ -381,27 +404,52 @@ sp_inside_square = ignore # ignore/add/remove/force/not_defined # Add or remove space inside '[]'. sp_inside_square_empty = ignore # ignore/add/remove/force/not_defined +# (OC) Add or remove space inside a non-empty Objective-C boxed array '@[' and +# ']'. If set to ignore, sp_inside_square is used. +sp_inside_square_oc_array = ignore # ignore/add/remove/force/not_defined + # Add or remove space after ',', i.e. 'a,b' vs. 'a, b'. -sp_after_comma = add # ignore/add/remove/force/not_defined +sp_after_comma = add # ignore/add/remove/force/not_defined -# Add or remove space before ','. +# Add or remove space before ',', i.e. 'a,b' vs. 'a ,b'. # # Default: remove sp_before_comma = remove # ignore/add/remove/force/not_defined +# (C#) Add or remove space between ',' and ']' in multidimensional array type +# like 'int[,,]'. +sp_after_mdatype_commas = ignore # ignore/add/remove/force/not_defined + +# (C#) Add or remove space between '[' and ',' in multidimensional array type +# like 'int[,,]'. +sp_before_mdatype_commas = ignore # ignore/add/remove/force/not_defined + +# (C#) Add or remove space between ',' in multidimensional array type +# like 'int[,,]'. +sp_between_mdatype_commas = ignore # ignore/add/remove/force/not_defined + # Add or remove space between an open parenthesis and comma, # i.e. '(,' vs. '( ,'. # # Default: force -sp_paren_comma = ignore # ignore/add/remove/force/not_defined +sp_paren_comma = ignore # ignore/add/remove/force/not_defined + +# Add or remove space after the variadic '...' when preceded by a +# non-punctuator. +# The value REMOVE will be overriden with FORCE +sp_after_ellipsis = ignore # ignore/add/remove/force/not_defined # Add or remove space before the variadic '...' when preceded by a # non-punctuator. +# The value REMOVE will be overriden with FORCE sp_before_ellipsis = ignore # ignore/add/remove/force/not_defined # Add or remove space between a type and '...'. sp_type_ellipsis = ignore # ignore/add/remove/force/not_defined +# (D) Add or remove space between a type and '?'. +sp_type_question = ignore # ignore/add/remove/force/not_defined + # Add or remove space between ')' and '...'. sp_paren_ellipsis = ignore # ignore/add/remove/force/not_defined @@ -462,12 +510,18 @@ sp_sizeof_ellipsis_paren = ignore # ignore/add/remove/force/not_defined # Add or remove space between 'decltype' and '('. sp_decltype_paren = ignore # ignore/add/remove/force/not_defined +# (Pawn) Add or remove space after the tag keyword. +sp_after_tag = ignore # ignore/add/remove/force/not_defined + # Add or remove space inside enum '{' and '}'. sp_inside_braces_enum = ignore # ignore/add/remove/force/not_defined # Add or remove space inside struct/union '{' and '}'. sp_inside_braces_struct = ignore # ignore/add/remove/force/not_defined +# (OC) Add or remove space inside Objective-C boxed dictionary '{' and '}' +sp_inside_braces_oc_dict = ignore # ignore/add/remove/force/not_defined + # Add or remove space after open brace in an unnamed temporary # direct-list-initialization. sp_after_type_brace_init_lst_open = ignore # ignore/add/remove/force/not_defined @@ -480,7 +534,7 @@ sp_before_type_brace_init_lst_close = ignore # ignore/add/remove/force/not_def sp_inside_type_brace_init_lst = ignore # ignore/add/remove/force/not_defined # Add or remove space inside '{' and '}'. -sp_inside_braces = add # ignore/add/remove/force/not_defined +sp_inside_braces = add # ignore/add/remove/force/not_defined # Add or remove space inside '{}'. sp_inside_braces_empty = ignore # ignore/add/remove/force/not_defined @@ -540,6 +594,9 @@ sp_fparen_brace = ignore # ignore/add/remove/force/not_defined # Overrides sp_fparen_brace. sp_fparen_brace_initializer = ignore # ignore/add/remove/force/not_defined +# (Java) Add or remove space between ')' and '{{' of double brace initializer. +sp_fparen_dbrace = ignore # ignore/add/remove/force/not_defined + # Add or remove space between function name and '(' on function calls. sp_func_call_paren = ignore # ignore/add/remove/force/not_defined @@ -591,6 +648,26 @@ sp_after_throw = ignore # ignore/add/remove/force/not_defined # If set to ignore, sp_before_sparen is used. sp_catch_paren = ignore # ignore/add/remove/force/not_defined +# (OC) Add or remove space between '@catch' and '(' +# in '@catch (something) { }'. If set to ignore, sp_catch_paren is used. +sp_oc_catch_paren = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space before Objective-C protocol list +# as in '@protocol Protocol<here><Protocol_A>' or '@interface MyClass : NSObject<here><MyProtocol>'. +sp_before_oc_proto_list = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space between class name and '(' +# in '@interface className(categoryName)<ProtocolName>:BaseClass' +sp_oc_classname_paren = ignore # ignore/add/remove/force/not_defined + +# (D) Add or remove space between 'version' and '(' +# in 'version (something) { }'. If set to ignore, sp_before_sparen is used. +sp_version_paren = ignore # ignore/add/remove/force/not_defined + +# (D) Add or remove space between 'scope' and '(' +# in 'scope (something) { }'. If set to ignore, sp_before_sparen is used. +sp_scope_paren = ignore # ignore/add/remove/force/not_defined + # Add or remove space between 'super' and '(' in 'super (something)'. # # Default: remove @@ -608,10 +685,10 @@ sp_macro = ignore # ignore/add/remove/force/not_defined sp_macro_func = ignore # ignore/add/remove/force/not_defined # Add or remove space between 'else' and '{' if on the same line. -sp_else_brace = add # ignore/add/remove/force/not_defined +sp_else_brace = add # ignore/add/remove/force/not_defined # Add or remove space between '}' and 'else' if on the same line. -sp_brace_else = add # ignore/add/remove/force/not_defined +sp_brace_else = add # ignore/add/remove/force/not_defined # Add or remove space between '}' and the name of a typedef on the same line. sp_brace_typedef = ignore # ignore/add/remove/force/not_defined @@ -620,9 +697,18 @@ sp_brace_typedef = ignore # ignore/add/remove/force/not_defined # 'catch' are on the same line, as in 'catch (decl) <here> {'. sp_catch_brace = ignore # ignore/add/remove/force/not_defined +# (OC) Add or remove space before the '{' of a '@catch' statement, if the '{' +# and '@catch' are on the same line, as in '@catch (decl) <here> {'. +# If set to ignore, sp_catch_brace is used. +sp_oc_catch_brace = ignore # ignore/add/remove/force/not_defined + # Add or remove space between '}' and 'catch' if on the same line. sp_brace_catch = ignore # ignore/add/remove/force/not_defined +# (OC) Add or remove space between '}' and '@catch' if on the same line. +# If set to ignore, sp_brace_catch is used. +sp_oc_brace_catch = ignore # ignore/add/remove/force/not_defined + # Add or remove space between 'finally' and '{' if on the same line. sp_finally_brace = ignore # ignore/add/remove/force/not_defined @@ -642,7 +728,7 @@ sp_word_brace_init_lst = ignore # ignore/add/remove/force/not_defined # Add or remove space between a variable and '{' for a namespace. # # Default: add -sp_word_brace_ns = ignore # ignore/add/remove/force/not_defined +sp_word_brace_ns = ignore # ignore/add/remove/force/not_defined # Add or remove space before the '::' operator. sp_before_dc = ignore # ignore/add/remove/force/not_defined @@ -650,6 +736,9 @@ sp_before_dc = ignore # ignore/add/remove/force/not_defined # Add or remove space after the '::' operator. sp_after_dc = ignore # ignore/add/remove/force/not_defined +# (D) Add or remove around the D named array initializer ':' operator. +sp_d_array_colon = ignore # ignore/add/remove/force/not_defined + # Add or remove space after the '!' (not) unary operator. # # Default: remove @@ -691,7 +780,76 @@ sp_incdec = ignore # ignore/add/remove/force/not_defined # Add or remove space before a backslash-newline at the end of a line. # # Default: add -sp_before_nl_cont = ignore # ignore/add/remove/force/not_defined +sp_before_nl_cont = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space after the scope '+' or '-', as in '-(void) foo;' +# or '+(int) bar;'. +sp_after_oc_scope = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space after the colon in message specs, +# i.e. '-(int) f:(int) x;' vs. '-(int) f: (int) x;'. +sp_after_oc_colon = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space before the colon in message specs, +# i.e. '-(int) f: (int) x;' vs. '-(int) f : (int) x;'. +sp_before_oc_colon = ignore # ignore/add/remove/force/not_defined + +# (OC) 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/not_defined + +# (OC) 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/not_defined + +# (OC) Add or remove space after the colon in message specs, +# i.e. '[object setValue:1];' vs. '[object setValue: 1];'. +sp_after_send_oc_colon = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space before the colon in message specs, +# i.e. '[object setValue:1];' vs. '[object setValue :1];'. +sp_before_send_oc_colon = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space after the (type) in message specs, +# i.e. '-(int)f: (int) x;' vs. '-(int)f: (int)x;'. +sp_after_oc_type = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space after the first (type) in message specs, +# i.e. '-(int) f:(int)x;' vs. '-(int)f:(int)x;'. +sp_after_oc_return_type = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space between '@selector' and '(', +# i.e. '@selector(msgName)' vs. '@selector (msgName)'. +# Also applies to '@protocol()' constructs. +sp_after_oc_at_sel = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space between '@selector(x)' and the following word, +# i.e. '@selector(foo) a:' vs. '@selector(foo)a:'. +sp_after_oc_at_sel_parens = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space inside '@selector' parentheses, +# i.e. '@selector(foo)' vs. '@selector( foo )'. +# Also applies to '@protocol()' constructs. +sp_inside_oc_at_sel_parens = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space before a block pointer caret, +# i.e. '^int (int arg){...}' vs. ' ^int (int arg){...}'. +sp_before_oc_block_caret = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space after a block pointer caret, +# i.e. '^int (int arg){...}' vs. '^ int (int arg){...}'. +sp_after_oc_block_caret = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space between the receiver and selector in a message, +# as in '[receiver selector ...]'. +sp_after_oc_msg_receiver = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space after '@property'. +sp_after_oc_property = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove space between '@synchronized' and the open parenthesis, +# i.e. '@synchronized(foo)' vs. '@synchronized (foo)'. +sp_after_oc_synchronized = ignore # ignore/add/remove/force/not_defined # Add or remove space around the ':' in 'b ? t : f'. sp_cond_colon = ignore # ignore/add/remove/force/not_defined @@ -729,6 +887,9 @@ sp_cond_ternary_short = ignore # ignore/add/remove/force/not_defined # sense here. sp_case_label = ignore # ignore/add/remove/force/not_defined +# (D) Add or remove space around the D '..' operator. +sp_range = ignore # ignore/add/remove/force/not_defined + # Add or remove space after ':' in a Java/C++11 range-based 'for', # as in 'for (Type var : <here> expr)'. sp_after_for_colon = ignore # ignore/add/remove/force/not_defined @@ -737,6 +898,9 @@ sp_after_for_colon = ignore # ignore/add/remove/force/not_defined # as in 'for (Type var <here> : expr)'. sp_before_for_colon = ignore # ignore/add/remove/force/not_defined +# (D) Add or remove space between 'extern' and '(' as in 'extern <here> (C)'. +sp_extern_paren = ignore # ignore/add/remove/force/not_defined + # Add or remove space after the opening of a C++ comment, as in '// <here> A'. sp_cmt_cpp_start = ignore # ignore/add/remove/force/not_defined @@ -785,11 +949,14 @@ sp_inside_newop_paren_open = ignore # ignore/add/remove/force/not_defined sp_inside_newop_paren_close = ignore # ignore/add/remove/force/not_defined # Add or remove space before a trailing or embedded comment. -sp_before_tr_emb_cmt = add # ignore/add/remove/force/not_defined +sp_before_tr_emb_cmt = add # ignore/add/remove/force/not_defined # Number of spaces before a trailing or embedded comment. sp_num_before_tr_emb_cmt = 2 # unsigned number +# (Java) Add or remove space between an annotation and the open parenthesis. +sp_annotation_paren = ignore # ignore/add/remove/force/not_defined + # If true, vbrace tokens are dropped to the previous token and skipped. sp_skip_vbrace_tokens = false # true/false @@ -873,6 +1040,13 @@ indent_brace_parent = false # true/false # in '({\n'. indent_paren_open_brace = false # true/false +# (C#) Whether to indent the brace of a C# delegate by another level. +indent_cs_delegate_brace = false # true/false + +# (C#) Whether to indent a C# delegate (to handle delegates with no brace) by +# another level. +indent_cs_delegate_body = false # true/false + # Whether to indent the body of a 'namespace'. indent_namespace = false # true/false @@ -989,7 +1163,7 @@ indent_func_throw = 0 # unsigned number # false: do not add an indent for the brace on the same line as the macro # # Default: true -indent_macro_brace = false # true/false +indent_macro_brace = false # true/false # The number of spaces to indent a continued '->' or '.'. # Usually set to 0, 1, or indent_columns. @@ -1000,7 +1174,10 @@ indent_member = 0 # unsigned number indent_member_single = false # true/false # Spaces to indent single line ('//') comments on lines before code. -indent_sing_line_comments = 0 # unsigned number +indent_single_line_comments_before = 0 # unsigned number + +# Spaces to indent single line ('//') comments on lines after code. +indent_single_line_comments_after = 0 # unsigned number # When opening a paren for a control statement (if, for, while, etc), increase # the indent level by this value. Negative values decrease the indent level. @@ -1008,7 +1185,7 @@ indent_sparen_extra = 0 # number # Whether to indent trailing single line ('//') comments relative to the code # instead of trying to keep the same absolute column. -indent_relative_single_line_comments = true # true/false +indent_relative_single_line_comments = true # true/false # Spaces to indent 'case' from 'switch'. Usually 0 or indent_columns. # It might wise to choose the same value for the option indent_case_brace. @@ -1079,7 +1256,7 @@ indent_paren_after_func_decl = false # true/false # Whether to indent the open parenthesis of a function call, # if the parenthesis is on its own line. -indent_paren_after_func_call = true # true/false +indent_paren_after_func_call = true # true/false # Whether to indent a comma when inside a brace. # If true, aligns under the open brace. @@ -1128,6 +1305,50 @@ indent_off_after_assign = false # true/false # Default: true indent_align_paren = true # true/false +# (OC) Whether to indent Objective-C code inside message selectors. +indent_oc_inside_msg_sel = false # true/false + +# (OC) Whether to indent Objective-C blocks at brace level instead of usual +# rules. +indent_oc_block = false # true/false + +# (OC) Indent for Objective-C blocks in a message relative to the parameter +# name. +# +# =0: Use indent_oc_block rules +# >0: Use specified number of spaces to indent +indent_oc_block_msg = 0 # unsigned number + +# (OC) Minimum indent for subsequent parameters +indent_oc_msg_colon = 0 # unsigned number + +# (OC) Whether to prioritize aligning with initial colon (and stripping spaces +# from lines, if necessary). +# +# Default: true +indent_oc_msg_prioritize_first_colon = true # true/false + +# (OC) Whether to indent blocks the way that Xcode does by default +# (from the keyword if the parameter is on its own line; otherwise, from the +# previous indentation level). Requires indent_oc_block_msg=true. +indent_oc_block_msg_xcode_style = false # true/false + +# (OC) Whether to indent blocks from where the brace is, relative to a +# message keyword. Requires indent_oc_block_msg=true. +indent_oc_block_msg_from_keyword = false # true/false + +# (OC) Whether to indent blocks from where the brace is, relative to a message +# colon. Requires indent_oc_block_msg=true. +indent_oc_block_msg_from_colon = false # true/false + +# (OC) Whether to indent blocks from where the block caret is. +# Requires indent_oc_block_msg=true. +indent_oc_block_msg_from_caret = false # true/false + +# (OC) Whether to indent blocks from where the brace caret is. +# Requires indent_oc_block_msg=true. +indent_oc_block_msg_from_brace = false # true/false + # When indenting after virtual brace open and newline add further spaces to # reach this minimum indent. indent_min_vbrace_open = 0 # unsigned number @@ -1153,7 +1374,12 @@ indent_cpp_lambda_body = false # true/false # add the indent for the return. # # Default: true -indent_compound_literal_return = false # true/false +indent_compound_literal_return = false # true/false + +# (C#) Whether to indent a 'using' block if no braces are used. +# +# Default: true +indent_using_block = true # true/false # How to indent the continuation of ternary operator. # @@ -1202,6 +1428,9 @@ nl_enum_leave_one_liners = false # true/false # Don't split one-line get or set functions. nl_getset_leave_one_liners = false # true/false +# (C#) Don't split one-line property get or set functions. +nl_cs_property_leave_one_liners = false # true/false + # Don't split one-line function definitions, as in 'int foo() { return 0; }'. # might modify nl_func_type_name nl_func_leave_one_liners = false # true/false @@ -1221,6 +1450,30 @@ nl_do_leave_one_liners = false # true/false # Don't split one-line for statements, as in 'for(...) b++;'. nl_for_leave_one_liners = false # true/false +# (OC) Don't split one-line Objective-C messages. +nl_oc_msg_leave_one_liner = false # true/false + +# (OC) Add or remove newline between method declaration and '{'. +nl_oc_mdef_brace = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove newline between Objective-C block signature and '{'. +nl_oc_block_brace = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove blank line before '@interface' statement. +nl_oc_before_interface = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove blank line before '@implementation' statement. +nl_oc_before_implementation = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove blank line before '@end' statement. +nl_oc_before_end = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove newline between '@interface' and '{'. +nl_oc_interface_brace = ignore # ignore/add/remove/force/not_defined + +# (OC) Add or remove newline between '@implementation' and '{'. +nl_oc_implementation_brace = ignore # ignore/add/remove/force/not_defined + # Add or remove newlines at the start of the file. nl_start_of_file = ignore # ignore/add/remove/force/not_defined @@ -1238,9 +1491,16 @@ nl_end_of_file_min = 0 # unsigned number # Add or remove newline between '=' and '{'. nl_assign_brace = ignore # ignore/add/remove/force/not_defined +# (D) Add or remove newline between '=' and '['. +nl_assign_square = ignore # ignore/add/remove/force/not_defined + # Add or remove newline between '[]' and '{'. nl_tsquare_brace = ignore # ignore/add/remove/force/not_defined +# (D) Add or remove newline after '= ['. Will also affect the newline before +# the ']'. +nl_after_square_assign = ignore # ignore/add/remove/force/not_defined + # 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/not_defined @@ -1307,9 +1567,17 @@ nl_for_brace = ignore # ignore/add/remove/force/not_defined # 'catch (decl) <here> {'. nl_catch_brace = ignore # ignore/add/remove/force/not_defined +# (OC) Add or remove newline before the '{' of a '@catch' statement, as in +# '@catch (decl) <here> {'. If set to ignore, nl_catch_brace is used. +nl_oc_catch_brace = ignore # ignore/add/remove/force/not_defined + # Add or remove newline between '}' and 'catch'. nl_brace_catch = ignore # ignore/add/remove/force/not_defined +# (OC) Add or remove newline between '}' and '@catch'. If set to ignore, +# nl_brace_catch is used. +nl_oc_brace_catch = ignore # ignore/add/remove/force/not_defined + # Add or remove newline between '}' and ']'. nl_brace_square = ignore # ignore/add/remove/force/not_defined @@ -1319,6 +1587,18 @@ nl_brace_fparen = ignore # ignore/add/remove/force/not_defined # Add or remove newline between 'while' and '{'. nl_while_brace = ignore # ignore/add/remove/force/not_defined +# (D) Add or remove newline between 'scope (x)' and '{'. +nl_scope_brace = ignore # ignore/add/remove/force/not_defined + +# (D) Add or remove newline between 'unittest' and '{'. +nl_unittest_brace = ignore # ignore/add/remove/force/not_defined + +# (D) Add or remove newline between 'version (x)' and '{'. +nl_version_brace = ignore # ignore/add/remove/force/not_defined + +# (C#) Add or remove newline between 'using' and '{'. +nl_using_brace = ignore # ignore/add/remove/force/not_defined + # Add or remove newline between two open or close braces. Due to general # newline/brace handling, REMOVE may not work. nl_brace_brace = ignore # ignore/add/remove/force/not_defined @@ -1584,6 +1864,10 @@ nl_template_args = false # true/false # Whether to add a newline before '>' of a template parameter list. nl_template_end = false # true/false +# (OC) Whether to put each Objective-C message parameter on a separate line. +# See nl_oc_msg_leave_one_liner. +nl_oc_msg_args = false # true/false + # Add or remove newline between function signature and '{'. nl_fdef_brace = ignore # ignore/add/remove/force/not_defined @@ -1600,6 +1884,10 @@ nl_return_expr = ignore # ignore/add/remove/force/not_defined # Whether to add a newline after semicolons, except in 'for' statements. nl_after_semicolon = false # true/false +# (Java) Add or remove newline between the ')' and '{{' of the double brace +# initializer. +nl_paren_dbrace_open = ignore # ignore/add/remove/force/not_defined + # Whether to add a newline after the type in an unnamed temporary # direct-list-initialization. nl_type_brace_init_lst = ignore # ignore/add/remove/force/not_defined @@ -1612,8 +1900,10 @@ nl_type_brace_init_lst_open = ignore # ignore/add/remove/force/not_defined # direct-list-initialization. nl_type_brace_init_lst_close = ignore # ignore/add/remove/force/not_defined -# Whether to add a newline after '{'. This also adds a newline before the -# matching '}'. +# Whether to add a newline before '{'. +nl_before_brace_open = false # true/false + +# Whether to add a newline after '{'. nl_after_brace_open = false # true/false # Whether to add a newline between the open brace and a trailing single-line @@ -1693,6 +1983,12 @@ nl_before_do = ignore # ignore/add/remove/force/not_defined # Add or remove blank line after 'do/while' statement. nl_after_do = ignore # ignore/add/remove/force/not_defined +# Ignore nl_before_{if,for,switch,do,synchronized} if the control +# statement is immediately after a case statement. +# if nl_before_{if,for,switch,do} is set to remove, this option +# does nothing. +nl_before_ignore_after_case = false # true/false + # Whether to put a blank line before 'return' statements, unless after an open # brace. nl_before_return = false # true/false @@ -1704,6 +2000,9 @@ nl_after_return = false # true/false # Whether to put a blank line before a member '.' or '->' operators. nl_before_member = ignore # ignore/add/remove/force/not_defined +# (Java) Whether to put a blank line after a member '.' or '->' operators. +nl_after_member = ignore # ignore/add/remove/force/not_defined + # Whether to double-space commented-entries in 'struct'/'union'/'enum'. nl_ds_struct_enum_cmt = false # true/false @@ -1741,7 +2040,7 @@ nl_create_while_one_liner = false # true/false # a single line. nl_create_func_def_one_liner = false # true/false -# Whether to split one-line simple unbraced if statements into three lines by +# Whether to split one-line simple list definitions into three lines by # adding newlines, as in 'int a[12] = { <here> 0 <here> };'. nl_create_list_one_liner = false # true/false @@ -1885,6 +2184,9 @@ nl_after_multiline_comment = false # true/false # Whether to force a newline after a label's colon. nl_after_label_colon = false # true/false +# The number of newlines before a struct definition. +nl_before_struct = 0 # unsigned number + # The number of newlines after '}' or ';' of a struct/enum/union definition. nl_after_struct = 0 # unsigned number @@ -1937,11 +2239,25 @@ nl_comment_func_def = 0 # unsigned number # 0: No change (default). nl_after_try_catch_finally = 0 # unsigned number +# (C#) The number of newlines before and after a property, indexer or event +# declaration. +# +# 0: No change (default). +nl_around_cs_property = 0 # unsigned number + +# (C#) The number of newlines between the get/set/add/remove handlers. +# +# 0: No change (default). +nl_between_get_set = 0 # unsigned number + +# (C#) Add or remove newline between property and the '{'. +nl_property_brace = ignore # ignore/add/remove/force/not_defined + # Whether to remove blank lines after '{'. -eat_blanks_after_open_brace = true # true/false +eat_blanks_after_open_brace = true # true/false # Whether to remove blank lines before '}'. -eat_blanks_before_close_brace = true # true/false +eat_blanks_before_close_brace = true # true/false # How aggressively to remove extra newlines not in preprocessor. # @@ -1950,6 +2266,13 @@ eat_blanks_before_close_brace = true # true/false # 2: Remove all newlines and reformat completely by config nl_remove_extra_newlines = 0 # unsigned number +# (Java) Add or remove newline after an annotation statement. Only affects +# annotations that are after a newline. +nl_after_annotation = ignore # ignore/add/remove/force/not_defined + +# (Java) Add or remove newline between two annotations. +nl_between_annotation = ignore # ignore/add/remove/force/not_defined + # The number of newlines before a whole-file #ifdef. # # 0: No change (default). @@ -2021,7 +2344,7 @@ pos_shift = ignore # ignore/break/force/lead/trail/join/ # # Try to limit code width to N columns. -code_width = 100 # unsigned number +code_width = 100 # unsigned number # Whether to fully split long 'for' statements at semi-colons. ls_for_split_full = false # true/false @@ -2299,6 +2622,11 @@ align_single_line_brace = false # true/false # Gap for align_single_line_brace. align_single_line_brace_gap = 0 # unsigned number +# (OC) The span for aligning Objective-C message specifications. +# +# 0: Don't align (default). +align_oc_msg_spec_span = 0 # unsigned number + # Whether to align macros wrapped with a backslash and a newline. This will # not work right if the macro contains a multi-line comment. align_nl_cont = false # true/false @@ -2327,6 +2655,25 @@ align_eigen_comma_init = false # true/false # Whether to align text after 'asm volatile ()' colons. align_asm_colon = false # true/false +# (OC) Span for aligning parameters in an Objective-C message call +# on the ':'. +# +# 0: Don't align. +align_oc_msg_colon_span = 0 # unsigned number + +# (OC) Whether to always align with the first parameter, even if it is too +# short. +align_oc_msg_colon_first = false # true/false + +# (OC) Whether to align parameters in an Objective-C '+' or '-' declaration +# on the ':'. +align_oc_decl_colon = false # true/false + +# (OC) Whether to not align parameters in an Objectve-C message call if first +# colon is not on next line of the message call (the same way Xcode does +# aligment) +align_oc_msg_colon_xcode_like = false # true/false + # # Comment modification options # @@ -2378,7 +2725,7 @@ cmt_reflow_indent_to_paragraph_start = false # true/false # Whether to convert all tabs to spaces in comments. If false, tabs in # comments are left alone, unless used for indenting. -cmt_convert_tab_to_spaces = true # true/false +cmt_convert_tab_to_spaces = true # true/false # Whether to apply changes to multi-line comments, including cmt_width, # keyword substitution and leading chars. @@ -2402,6 +2749,9 @@ cmt_align_doxygen_javadoc_tags = false # true/false # Default: 1 cmt_sp_before_doxygen_javadoc_tags = 1 # unsigned number +# Whether to change trailing, single-line c-comments into cpp-comments. +cmt_trailing_single_line_c_to_cpp = true # true/false + # Whether to group c-comments that look like they are in a block. cmt_c_group = false # true/false @@ -2511,11 +2861,14 @@ cmt_insert_before_ctor_dtor = false # true/false mod_full_brace_do = ignore # ignore/add/remove/force/not_defined # Add or remove braces on a single-line 'for' statement. -mod_full_brace_for = add # ignore/add/remove/force/not_defined +mod_full_brace_for = add # ignore/add/remove/force/not_defined + +# (Pawn) Add or remove braces on a single-line function definition. +mod_full_brace_function = ignore # ignore/add/remove/force/not_defined # Add or remove braces on a single-line 'if' statement. Braces will not be # removed if the braced statement contains an 'else'. -mod_full_brace_if = add # ignore/add/remove/force/not_defined +mod_full_brace_if = add # ignore/add/remove/force/not_defined # Whether to enforce that all blocks of an 'if'/'else if'/'else' chain either # have, or do not have, braces. If true, braces will be added if any block @@ -2531,7 +2884,7 @@ mod_full_brace_if_chain = false # true/false mod_full_brace_if_chain_only = false # true/false # Add or remove braces on single-line 'while' statement. -mod_full_brace_while = add # ignore/add/remove/force/not_defined +mod_full_brace_while = add # ignore/add/remove/force/not_defined # Add or remove braces on single-line 'using ()' statement. mod_full_brace_using = ignore # ignore/add/remove/force/not_defined @@ -2558,6 +2911,9 @@ mod_full_brace_nl_block_rem_mlcond = false # true/false # Add or remove unnecessary parenthesis on 'return' statement. mod_paren_on_return = ignore # ignore/add/remove/force/not_defined +# (Pawn) Whether to change optional semicolons to real semicolons. +mod_pawn_semicolon = false # true/false + # Whether to fully parenthesize Boolean expressions in 'while' and 'if' # statement, as in 'if (a && b > c)' => 'if (a && (b > c))'. mod_full_paren_if_bool = false # true/false @@ -2565,6 +2921,9 @@ mod_full_paren_if_bool = false # true/false # Whether to remove superfluous semicolons. mod_remove_extra_semicolon = false # true/false +# Whether to remove duplicate include. +mod_remove_duplicate_include = false # true/false + # If a function 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_function_closebrace_comment = 0 # unsigned number @@ -2595,10 +2954,13 @@ mod_sort_case_sensitive = false # true/false # Whether to sort consecutive single-line 'import' statements. mod_sort_import = false # true/false +# (C#) Whether to sort consecutive single-line 'using' statements. +mod_sort_using = false # true/false + # Whether to sort consecutive single-line '#include' statements (C/C++) and # '#import' statements (Objective-C). Be aware that this has the potential to # break your code if your includes/imports have ordering dependencies. -mod_sort_include = true # true/false +mod_sort_include = true # true/false # Whether to prioritize '#include' and '#import' statements that contain # filename without extension when sorting is enabled. @@ -2610,14 +2972,14 @@ mod_sort_incl_import_prioritize_extensionless = false # true/false # Whether to prioritize '#include' and '#import' statements that contain # angle over quotes when sorting is enabled. -mod_sort_incl_import_prioritize_angle_over_quotes = true # true/false +mod_sort_incl_import_prioritize_angle_over_quotes = true # true/false # Whether to ignore file extension in '#include' and '#import' statements # for sorting comparison. mod_sort_incl_import_ignore_extension = false # true/false # Whether to group '#include' and '#import' statements when sorting is enabled. -mod_sort_incl_import_grouping_enabled = true # true/false +mod_sort_incl_import_grouping_enabled = true # true/false # Whether to move a 'break' that appears after a fully braced 'case' before # the close brace, as in 'case X: { ... } break;' => 'case X: { ... break; }'. @@ -2634,6 +2996,33 @@ mod_remove_empty_return = false # true/false # Add or remove the comma after the last value of an enumeration. mod_enum_last_comma = ignore # ignore/add/remove/force/not_defined +# (OC) Whether to organize the properties. If true, properties will be +# rearranged according to the mod_sort_oc_property_*_weight factors. +mod_sort_oc_properties = false # true/false + +# (OC) Weight of a class property modifier. +mod_sort_oc_property_class_weight = 0 # number + +# (OC) Weight of 'atomic' and 'nonatomic'. +mod_sort_oc_property_thread_safe_weight = 0 # number + +# (OC) Weight of 'readwrite' when organizing properties. +mod_sort_oc_property_readwrite_weight = 0 # number + +# (OC) Weight of a reference type specifier ('retain', 'copy', 'assign', +# 'weak', 'strong') when organizing properties. +mod_sort_oc_property_reference_weight = 0 # number + +# (OC) Weight of getter type ('getter=') when organizing properties. +mod_sort_oc_property_getter_weight = 0 # number + +# (OC) Weight of setter type ('setter=') when organizing properties. +mod_sort_oc_property_setter_weight = 0 # number + +# (OC) Weight of nullability type ('nullable', 'nonnull', 'null_unspecified', +# 'null_resettable') when organizing properties. +mod_sort_oc_property_nullability_weight = 0 # number + # # Preprocessor options # @@ -2677,6 +3066,9 @@ pp_indent_if = 0 # number # Whether to indent the code between #if, #else and #endif. pp_if_indent_code = false # true/false +# Whether to indent the body of an #if that encompasses all the code in the file. +pp_indent_in_guard = false # true/false + # Whether to indent '#define' at the brace level. If false, these are # indented from column 1. pp_define_at_level = false # true/false @@ -2786,6 +3178,12 @@ use_form_feed_no_more_as_whitespace_character = false # true/false # Warn levels - 1: error, 2: warning (default), 3: note # +# (C#) Warning is given if doing tab-to-\t replacement and we have found one +# in a C# verbatim string literal. +# +# Default: 2 +warn_level_tabs_found_in_verbatim_string_literals = 2 # unsigned number + # Limit the number of loops. # Used by uncrustify.cpp to exit from infinite loop. # 0: no limit. @@ -2857,30 +3255,29 @@ debug_truncate = 0 # unsigned number # `macro-close END_MESSAGE_MAP` # # -# option(s) with 'not default' value: 0 -# - -set PREPROC FUNC_API_CHECK_TEXTLOCK -set PREPROC FUNC_API_DEPRECATED_SINCE -set PREPROC FUNC_API_FAST -set PREPROC FUNC_API_LUA_ONLY -set PREPROC FUNC_API_NOEXPORT -set PREPROC FUNC_API_REMOTE_ONLY -set PREPROC FUNC_API_SINCE -set PREPROC FUNC_ATTR_ALWAYS_INLINE -set PREPROC FUNC_ATTR_CONST -set PREPROC FUNC_ATTR_MALLOC -set PREPROC FUNC_ATTR_NONNULL_ALL -set PREPROC FUNC_ATTR_NONNULL_ARG -set PREPROC FUNC_ATTR_NONNULL_RET -set PREPROC FUNC_ATTR_NORETURN -set PREPROC FUNC_ATTR_NO_SANITIZE_UNDEFINED -set PREPROC FUNC_ATTR_PRINTF -set PREPROC FUNC_ATTR_PURE -set PREPROC FUNC_ATTR_UNUSED -set PREPROC FUNC_ATTR_WARN_UNUSED_RESULT -set PREPROC REAL_FATTR_ALWAYS_INLINE -set PREPROC REAL_FATTR_CONST -set PREPROC REAL_FATTR_NONNULL_ALL -set PREPROC REAL_FATTR_PURE -set PREPROC REAL_FATTR_WARN_UNUSED_RESULT +set PREPROC FUNC_API_CHECK_TEXTLOCK +set PREPROC FUNC_API_DEPRECATED_SINCE +set PREPROC FUNC_API_FAST +set PREPROC FUNC_API_LUA_ONLY +set PREPROC FUNC_API_NOEXPORT +set PREPROC FUNC_API_REMOTE_ONLY +set PREPROC FUNC_API_SINCE +set PREPROC FUNC_ATTR_ALWAYS_INLINE +set PREPROC FUNC_ATTR_CONST +set PREPROC FUNC_ATTR_MALLOC +set PREPROC FUNC_ATTR_NONNULL_ALL +set PREPROC FUNC_ATTR_NONNULL_ARG +set PREPROC FUNC_ATTR_NONNULL_RET +set PREPROC FUNC_ATTR_NORETURN +set PREPROC FUNC_ATTR_NO_SANITIZE_UNDEFINED +set PREPROC FUNC_ATTR_PRINTF +set PREPROC FUNC_ATTR_PURE +set PREPROC FUNC_ATTR_UNUSED +set PREPROC FUNC_ATTR_WARN_UNUSED_RESULT +set PREPROC REAL_FATTR_ALWAYS_INLINE +set PREPROC REAL_FATTR_CONST +set PREPROC REAL_FATTR_NONNULL_ALL +set PREPROC REAL_FATTR_PURE +set PREPROC REAL_FATTR_WARN_UNUSED_RESULT +# option(s) with 'not default' value: 56 +# |