aboutsummaryrefslogtreecommitdiff
path: root/contrib/uncrustify.cfg
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-31 13:03:48 +0100
committerChristian Grothoff <christian@grothoff.org>2019-10-31 13:03:48 +0100
commit7e3cf5f461eb4fbb7581672bf0835da07c378136 (patch)
treebdc3874b7894242b095b892f1ed3e81a4d4f06c0 /contrib/uncrustify.cfg
parent01b480d6d026e0c537dc284a7e7df2c0320a3528 (diff)
downloadgnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.tar.gz
gnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.zip
tighten formatting rules
Diffstat (limited to 'contrib/uncrustify.cfg')
-rw-r--r--contrib/uncrustify.cfg17
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/uncrustify.cfg b/contrib/uncrustify.cfg
index f56c8e732..8c9df2c43 100644
--- a/contrib/uncrustify.cfg
+++ b/contrib/uncrustify.cfg
@@ -49,8 +49,12 @@ nl_assign_brace=remove
49 49
50# No extra newlines that cause noisy diffs 50# No extra newlines that cause noisy diffs
51nl_start_of_file=remove 51nl_start_of_file=remove
52nl_after_func_proto = 2
53nl_after_func_body = 3
52# If there's no new line, it's not a text file! 54# If there's no new line, it's not a text file!
53nl_end_of_file=add 55nl_end_of_file=add
56nl_max_blank_in_func = 3
57nl_max = 3
54 58
55sp_inside_paren = remove 59sp_inside_paren = remove
56 60
@@ -69,6 +73,7 @@ sp_between_ptr_star = remove
69sp_before_sparen = add 73sp_before_sparen = add
70 74
71sp_inside_fparen = remove 75sp_inside_fparen = remove
76sp_inside_sparen = remove
72 77
73# add space before function call and decl: "foo (x)" 78# add space before function call and decl: "foo (x)"
74sp_func_call_paren = add 79sp_func_call_paren = add
@@ -76,3 +81,15 @@ sp_func_proto_paren = add
76sp_func_proto_paren_empty = add 81sp_func_proto_paren_empty = add
77sp_func_def_paren = add 82sp_func_def_paren = add
78sp_func_def_paren_empty = add 83sp_func_def_paren_empty = add
84
85# We'd want it for "if ( (foo) || (bar) )", but not for "if (m())",
86# so as uncrustify doesn't give exactly what we want => ignore
87sp_paren_paren = ignore
88sp_inside_paren = remove
89sp_bool = force
90
91nl_func_type_name = force
92#nl_branch_else = add
93nl_else_brace = add
94nl_elseif_brace = add
95nl_for_brace = add