diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-10-31 12:54:59 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-10-31 12:54:59 +0100 |
commit | 376c44387c968924403618bd2e594a3332ceafe7 (patch) | |
tree | fb29d5d382c438b7af503d71e136429100010938 /contrib | |
parent | e5b14730c3f9c67671044cc2540572fdb7cca88a (diff) | |
download | taler-mdb-376c44387c968924403618bd2e594a3332ceafe7.tar.gz taler-mdb-376c44387c968924403618bd2e594a3332ceafe7.tar.bz2 taler-mdb-376c44387c968924403618bd2e594a3332ceafe7.zip |
improve uncrustify rules
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/uncrustify.cfg | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/contrib/uncrustify.cfg b/contrib/uncrustify.cfg index f56c8e7..12dd62c 100644 --- a/contrib/uncrustify.cfg +++ b/contrib/uncrustify.cfg @@ -49,8 +49,14 @@ nl_assign_brace=remove # No extra newlines that cause noisy diffs nl_start_of_file=remove +nl_before_func_body_proto = 2 +nl_before_func_body_def = 3 +nl_after_func_proto = 2 +nl_after_func_body = 3 # If there's no new line, it's not a text file! nl_end_of_file=add +nl_max_blank_in_func = 3 +nl_max = 3 sp_inside_paren = remove @@ -69,6 +75,7 @@ sp_between_ptr_star = remove sp_before_sparen = add sp_inside_fparen = remove +sp_inside_sparen = remove # add space before function call and decl: "foo (x)" sp_func_call_paren = add @@ -76,3 +83,15 @@ sp_func_proto_paren = add sp_func_proto_paren_empty = add sp_func_def_paren = add sp_func_def_paren_empty = add + +# We'd want it for "if ( (foo) || (bar) )", but not for "if (m())", +# so as uncrustify doesn't give exactly what we want => ignore +sp_paren_paren = ignore +sp_inside_paren = remove +sp_bool = force + +nl_func_type_name = force +#nl_branch_else = add +nl_else_brace = add +nl_elseif_brace = add +nl_for_brace = add |