diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-09-15 10:23:55 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-09-15 10:24:08 +0200 |
commit | 7bfd145e5dd3ca1e7da3a1ed8f201a87f482c6ad (patch) | |
tree | 508f052d62dc1d19bf8a8aa653e6f6c300395ee9 /contrib | |
parent | 64ea15823b0f6245583e78f2c6ecd52cbe7de570 (diff) | |
download | gnunet-7bfd145e5dd3ca1e7da3a1ed8f201a87f482c6ad.tar.gz gnunet-7bfd145e5dd3ca1e7da3a1ed8f201a87f482c6ad.zip |
use configuration from GNU Taler for uncrustify
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/uncrustify.cfg | 156 |
1 files changed, 77 insertions, 79 deletions
diff --git a/contrib/uncrustify.cfg b/contrib/uncrustify.cfg index a5b78fb7e..6ced05d7a 100644 --- a/contrib/uncrustify.cfg +++ b/contrib/uncrustify.cfg | |||
@@ -1,80 +1,78 @@ | |||
1 | # Almost the GNU format | 1 | input_tab_size = 2 |
2 | 2 | output_tab_size = 2 | |
3 | indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs | ||
4 | input_tab_size = 8 # original tab size | ||
5 | output_tab_size = 8 # new tab size | ||
6 | indent_columns = 2 | ||
7 | # indent_label = 2 # pos: absolute col, neg: relative column | ||
8 | indent_align_string = False # align broken strings | ||
9 | indent_brace = 2 | ||
10 | |||
11 | nl_enum_brace = remove # "enum {" vs "enum \n {" | ||
12 | nl_union_brace = remove # "union {" vs "union \n {" | ||
13 | nl_struct_brace = remove # "struct {" vs "struct \n {" | ||
14 | nl_do_brace = add # "do {" vs "do \n {" | ||
15 | nl_if_brace = add # "if () {" vs "if () \n {" | ||
16 | nl_for_brace = add # "for () {" vs "for () \n {" | ||
17 | nl_else_brace = add # "else {" vs "else \n {" | ||
18 | nl_while_brace = add # "while () {" vs "while () \n {" | ||
19 | nl_switch_brace = add # "switch () {" vs "switch () \n {" | ||
20 | nl_func_var_def_blk = 1 | ||
21 | nl_before_case = 1 | ||
22 | nl_fcall_brace = add # "foo() {" vs "foo()\n{" | ||
23 | nl_fdef_brace = add # "int foo() {" vs "int foo()\n{" | ||
24 | # nl_after_return = TRUE | ||
25 | nl_brace_while = add | ||
26 | nl_brace_else = add | ||
27 | nl_squeeze_ifdef = TRUE | ||
28 | |||
29 | # mod_paren_on_return = ignore # "return 1;" vs "return (1);" | ||
30 | # mod_full_brace_if = ignore # "if (a) a--;" vs "if (a) { a--; }" | ||
31 | # mod_full_brace_for = ignore # "for () a--;" vs "for () { a--; }" | ||
32 | # mod_full_brace_do = ignore # "do a--; while ();" vs "do { a--; } while ();" | ||
33 | # mod_full_brace_while = ignore # "while (a) a--;" vs "while (a) { a--; }" | ||
34 | |||
35 | sp_before_semi = remove | ||
36 | sp_paren_paren = remove # space between (( and )) | ||
37 | sp_return_paren = remove # "return (1);" vs "return(1);" | ||
38 | sp_sizeof_paren = remove # "sizeof (int)" vs "sizeof(int)" | ||
39 | sp_before_sparen = force # "if (" vs "if(" | ||
40 | sp_after_sparen = force # "if () {" vs "if (){" | ||
41 | sp_after_cast = remove # "(int) a" vs "(int)a" | ||
42 | sp_inside_braces = force # "{ 1 }" vs "{1}" | ||
43 | sp_inside_braces_struct = force # "{ 1 }" vs "{1}" | ||
44 | sp_inside_braces_enum = force # "{ 1 }" vs "{1}" | ||
45 | sp_inside_paren = remove | ||
46 | sp_inside_fparen = remove | ||
47 | sp_inside_sparen = remove | ||
48 | #sp_type_func = ignore | ||
49 | sp_assign = force | ||
50 | sp_arith = force | ||
51 | sp_bool = force | ||
52 | sp_compare = force | ||
53 | sp_after_comma = force | ||
54 | sp_func_def_paren = remove # "int foo (){" vs "int foo(){" | ||
55 | sp_func_call_paren = remove # "foo (" vs "foo(" | ||
56 | sp_func_proto_paren = remove # "int foo ();" vs "int foo();" | ||
57 | |||
58 | # align_with_tabs = FALSE # use tabs to align | ||
59 | # align_on_tabstop = FALSE # align on tabstops | ||
60 | # align_enum_equ_span = 4 | ||
61 | # align_nl_cont = TRUE | ||
62 | # align_var_def_span = 2 | ||
63 | # align_var_def_inline = TRUE | ||
64 | # align_var_def_star = TRUE | ||
65 | # align_var_def_colon = TRUE | ||
66 | # align_assign_span = 1 | ||
67 | # align_struct_init_span = 3 | ||
68 | # align_var_struct_span = 3 | ||
69 | # align_right_cmt_span = 3 | ||
70 | # align_pp_define_span = 3 | ||
71 | # align_pp_define_gap = 4 | ||
72 | # align_number_right = TRUE | ||
73 | # align_typedef_span = 5 | ||
74 | # align_typedef_gap = 3 | ||
75 | |||
76 | # cmt_star_cont = TRUE | ||
77 | |||
78 | eat_blanks_before_close_brace = TRUE | ||
79 | eat_blanks_after_open_brace = TRUE | ||
80 | 3 | ||
4 | indent_columns = 2 | ||
5 | indent_with_tabs = 0 | ||
6 | indent_case_brace = 2 | ||
7 | indent_label=0 | ||
8 | |||
9 | code_width=80 | ||
10 | #cmd_width=80 | ||
11 | |||
12 | # Leave most comments alone for now | ||
13 | cmt_indent_multi=false | ||
14 | sp_cmt_cpp_start=add | ||
15 | |||
16 | sp_not=add | ||
17 | |||
18 | sp_func_call_user_paren_paren=remove | ||
19 | sp_inside_fparen=remove | ||
20 | sp_after_cast=add | ||
21 | |||
22 | ls_for_split_full=true | ||
23 | ls_func_split_full=true | ||
24 | ls_code_width=true | ||
25 | |||
26 | # Arithmetic operations in wrapped expressions should be at the start | ||
27 | # of the line. | ||
28 | pos_arith=lead | ||
29 | |||
30 | # Fully parenthesize boolean exprs | ||
31 | mod_full_paren_if_bool=true | ||
32 | |||
33 | # Braces should be on their own line | ||
34 | nl_fdef_brace=add | ||
35 | nl_enum_brace=add | ||
36 | nl_struct_brace=add | ||
37 | nl_union_brace=add | ||
38 | nl_if_brace=add | ||
39 | nl_brace_else=add | ||
40 | nl_elseif_brace=add | ||
41 | nl_while_brace=add | ||
42 | nl_switch_brace=add | ||
43 | |||
44 | # no newline between "else" and "if" | ||
45 | nl_else_if=remove | ||
46 | |||
47 | nl_func_paren=remove | ||
48 | nl_assign_brace=remove | ||
49 | |||
50 | # No extra newlines that cause noisy diffs | ||
51 | nl_start_of_file=remove | ||
52 | # If there's no new line, it's not a text file! | ||
53 | nl_end_of_file=add | ||
54 | |||
55 | sp_inside_paren = remove | ||
56 | |||
57 | sp_arith = add | ||
58 | sp_arith_additive = add | ||
59 | |||
60 | # We want spaces before and after "=" | ||
61 | sp_before_assign = add | ||
62 | sp_after_assign = add | ||
63 | |||
64 | # we want "char *foo;" | ||
65 | sp_after_ptr_star = remove | ||
66 | sp_between_ptr_star = remove | ||
67 | |||
68 | # we want "if (foo) { ... }" | ||
69 | sp_before_sparen = add | ||
70 | |||
71 | sp_inside_fparen = remove | ||
72 | |||
73 | # add space before function call and decl: "foo (x)" | ||
74 | sp_func_call_paren = add | ||
75 | sp_func_proto_paren = add | ||
76 | sp_func_proto_paren_empty = add | ||
77 | sp_func_def_paren = add | ||
78 | sp_func_def_paren_empty = add | ||