forked from Fraunhofer-AISEC/libbbs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.uncrustify.cfg
137 lines (109 loc) · 2.81 KB
/
.uncrustify.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#input_tab_size = 2
#output_tab_size = 2
#indent_columns = 2
indent_with_tabs = 2
#indent_case_brace = 2
indent_label=-16
code_width=100
#cmd_width=80
# Leave most comments alone for now
cmt_indent_multi=false
sp_cmt_cpp_start=add
sp_not=add
sp_func_call_user_paren_paren=remove
sp_inside_fparen=remove
sp_after_cast=add
ls_for_split_full=true
ls_func_split_full=true
ls_code_width=true
# Arithmetic operations in wrapped expressions should be at the start
# of the line.
pos_arith=lead
# Fully parenthesize boolean exprs
mod_full_paren_if_bool=false
# Braces should be on their own line
nl_fdef_brace=add
nl_enum_brace=add
nl_struct_brace=add
nl_union_brace=add
nl_if_brace=add
nl_brace_else=add
nl_elseif_brace=add
nl_while_brace=add
nl_switch_brace=add
# no newline between "else" and "if"
nl_else_if=remove
nl_func_paren=remove
nl_func_decl_args=add
nl_func_def_args=add
nl_func_decl_end=add
nl_func_def_end=add
nl_assign_brace=remove
# No extra newlines that cause noisy diffs
nl_start_of_file=remove
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
nl_after_label_colon = true
# Remove unnecessary newlines, usually created by prior invocations
nl_remove_extra_newlines = 1
sp_inside_paren = remove
sp_arith = add
sp_arith_additive = add
# We want spaces before and after "="
sp_before_assign = add
sp_after_assign = add
# we want "char *foo;"
sp_after_ptr_star = remove
sp_between_ptr_star = remove
# we want "if (foo) { ... }"
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
sp_func_proto_paren = add
sp_func_proto_paren_empty = add
sp_func_def_paren = add
sp_func_def_paren_empty = add
sp_after_comma = 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
# Alignment options
align_number_right = true
align_func_params = true
align_func_params_span = 2
align_func_params_gap = 2
align_same_func_call_params = true
align_var_def_span = 2
align_var_def_star_style = 2
align_var_def_amp_style = 2
align_assign_span = 2
align_assign_func_proto_span = 2
align_braced_init_list_span = 2
align_var_struct_span = 2
align_var_struct_gap = 2
align_struct_init_span = 2
align_typedef_span = 2
align_typedef_gap = 2
align_typedef_func = 2
align_typedef_star_style = 2
align_typedef_amp_style = 2
align_right_cmt_span = 2
align_right_cmt_gap = 1
align_func_proto_span = 2
align_func_proto_star_style = 2
align_func_proto_amp_style = 2
align_pp_define_together = true
align_pp_define_span = 2