-
Notifications
You must be signed in to change notification settings - Fork 461
/
uncrustify.cfg
83 lines (75 loc) · 2.12 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
# indent and align with tabs, only uses spaces if tab is too large
indent_with_tabs = 2
indent_cmt_with_tabs = true
# No newlines between type name and brace
nl_enum_brace = remove
nl_struct_brace = remove
nl_union_brace = remove
# No newlines before block
nl_assign_brace = remove
nl_fcall_brace = remove
nl_if_brace = remove
nl_brace_else = remove
nl_elseif_brace = remove
nl_for_brace = remove
nl_while_brace = remove
nl_do_brace = remove
nl_brace_while = remove
# Consistent newline behavior in function definitions
nl_fdef_brace = add
nl_func_type_name = remove
# Use consistent spacing
sp_arith_additive = force
sp_assign = force
sp_enum_paren = force
sp_enum_assign = force
sp_bool = force
sp_compare = force
sp_inside_paren = remove
sp_paren_paren = remove
sp_cparen_oparen = remove
sp_paren_brace = force
sp_brace_brace = remove
sp_before_ptr_star = force
sp_between_ptr_star = remove
sp_after_ptr_star = remove
sp_after_byref = remove
sp_before_sparen = force
sp_inside_sparen = remove
sp_inside_for = remove
sp_after_sparen = force
sp_sparen_brace = force
sp_do_brace_open = force
sp_while_paren_open = force
sp_before_semi_for = remove
sp_after_semi_for = force
sp_inside_square = remove
sp_after_comma = force
sp_after_cast = ignore # XXX: We're not very consistent with this, do we want to be?
sp_inside_paren_cast = remove
sp_sizeof_paren = remove
sp_inside_braces_empty = remove
sp_else_brace = force
sp_brace_else = force
sp_brace_typedef = force
sp_cond_colon = force
sp_cond_question = force
sp_case_label = force
sp_endif_cmt = force
sp_before_ellipsis = remove
sp_func_def_paren = remove
sp_func_type_paren = remove
# Do not use force for these because we often manually align these
sp_macro = add
sp_before_tr_cmt = add
mod_remove_duplicate_include = true
mod_remove_extra_semicolon = true
eat_blanks_before_close_brace = true
eat_blanks_after_open_brace = true
# Don't have braces for single line if/else body, unless there's an
# if/else in the chain that requires braces
mod_full_brace_if = remove
mod_full_brace_if_chain = 1
mod_full_brace_nl = 1
# Trailing commas are great, but for now we don't use them yet
# mod_enum_last_comma = force