diff --git a/.uncrustify.cfg b/.uncrustify.cfg index 43d15f1b..d133a48b 100644 --- a/.uncrustify.cfg +++ b/.uncrustify.cfg @@ -45,7 +45,7 @@ nl_switch_brace = remove # "switch () {" vs "switch () \n nl_brace_while = remove # "} while" vs "} \n while" - cuddle while nl_brace_else = remove # "} else" vs "} \n else" - cuddle else nl_namespace_brace = force # "namespace name {" vs "namespace name \n {" -nl_func_var_def_blk = 1 +nl_func_var_def_blk = 0 nl_fcall_brace = remove # "list_for_each() {" vs "list_for_each()\n{" nl_fdef_brace = add # "int foo() {" vs "int foo()\n{" nl_after_label_colon = false # "fail:\nfree(foo);" vs "fail: free(foo);" @@ -68,11 +68,10 @@ nl_func_call_end_multi_line = false # Source code modifications mod_paren_on_return = remove # "return 1;" vs "return (1);" -mod_full_brace_if = remove # "if (a) a--;" vs "if (a) { a--; }" -mod_full_brace_if_chain = true -mod_full_brace_for = remove # "for () a--;" vs "for () { a--; }" +mod_full_brace_if = ignore # "if (a) a--;" vs "if (a) { a--; }" +mod_full_brace_for = ignore # "for () a--;" vs "for () { a--; }" mod_full_brace_do = force # "do a--; while ();" vs "do { a--; } while ();" -mod_full_brace_while = remove # "while (a) a--;" vs "while (a) { a--; }" +mod_full_brace_while = ignore # "while (a) a--;" vs "while (a) { a--; }" mod_full_brace_nl = 3 # don't remove if more than 3 newlines # Spacing @@ -83,18 +82,18 @@ sp_after_byref = remove sp_after_byref_func = remove sp_after_cast = force # "(int) a" vs "(int)a" sp_after_class_colon = force -sp_after_comma = add +sp_after_comma = force sp_after_dc = remove sp_after_new = force sp_after_operator = remove sp_after_operator_sym = remove sp_after_ptr_star = remove # "int *foo" vs "int * foo" sp_after_ptr_star_func = remove -sp_after_semi = add -sp_after_semi_for = add +sp_after_semi = force +sp_after_semi_for = force sp_after_semi_for_empty = remove sp_after_sparen = force # "if () {" vs "if (){" -sp_after_type = add +sp_after_type = force sp_angle_paren = remove sp_angle_shift = ignore sp_angle_word = force @@ -150,10 +149,10 @@ sp_func_proto_paren = remove # "int foo ();" vs "int foo();" sp_getset_brace = force sp_incdec = remove sp_inside_angle = remove -sp_inside_braces = add # "{ 1 }" vs "{1}" +sp_inside_braces = force # "{ 1 }" vs "{1}" sp_inside_braces_empty = remove -sp_inside_braces_enum = add # "{ 1 }" vs "{1}" -sp_inside_braces_struct = add # "{ 1 }" vs "{1}" +sp_inside_braces_enum = force # "{ 1 }" vs "{1}" +sp_inside_braces_struct = force # "{ 1 }" vs "{1}" sp_inside_fparen = remove sp_inside_fparens = remove sp_inside_paren = remove @@ -202,7 +201,7 @@ align_on_tabstop = false # align on tabstops align_enum_equ_span = 4 # '=' in enum definition align_nl_cont = true align_assign_span = 0 -align_struct_init_span = 0 # align stuff in a structure init '= { }' +align_struct_init_span = 3 # align stuff in a structure init '= { }' align_right_cmt_span = 3 align_pp_define_span = 2 align_pp_define_gap = 4