-
Notifications
You must be signed in to change notification settings - Fork 13
/
uncrustify.cfg
107 lines (88 loc) · 3.77 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
# Based off of kr-indent.cfg
# K&R (sort-of)
#
indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs
input_tab_size = 3 # original tab size
output_tab_size = 3 # new tab size
indent_columns = output_tab_size
indent_namespace = false
indent_extern = true
indent_class = true
indent_access_spec = 0
indent_access_spec_body = true
indent_switch_case = indent_columns
indent_col1_comment = true
nl_fdef_brace = add # "int foo() {" vs "int foo()\n{"
nl_enum_brace = remove # "enum {" vs "enum \n {"
nl_union_brace = remove # "union {" vs "union \n {"
nl_struct_brace = remove # "struct {" vs "struct \n {"
nl_do_brace = remove # "do {" vs "do \n {"
nl_if_brace = remove # "if () {" vs "if () \n {"
nl_for_brace = remove # "for () {" vs "for () \n {"
nl_else_brace = remove # "else {" vs "else \n {"
nl_while_brace = remove # "while () {" vs "while () \n {"
nl_switch_brace = remove # "switch () {" vs "switch () \n {"
nl_brace_while = add
nl_brace_else = add
nl_after_case = true
nl_cpp_lambda_leave_one_liners = true # allow one-liner c++11 lambdas.
# This is to prevent aligning comments with trailing loop comments
nl_after_for = add
# These don't seem to work completely reliably
nl_after_func_proto_group = 2
nl_after_func_body = 2
nl_after_func_body_class = 2
nl_after_func_body_one_liner = 2
nl_func_leave_one_liners = true
nl_assign_leave_one_liners = true
mod_full_brace_if = force # "if (a) a--;" vs "if (a) { a--; }"
mod_full_brace_for = force # "for () a--;" vs "for () { a--; }"
mod_full_brace_do = force # "do a--; while ();" vs "do { a--; } while ();"
mod_full_brace_while = force # "while (a) a--;" vs "while (a) { a--; }"
sp_before_semi = remove
sp_sizeof_paren = remove # "sizeof (int)" vs "sizeof(int)"
sp_before_sparen = add # "if (" vs "if("
sp_after_sparen = force # "if () {" vs "if (){"
sp_after_cast = add # "(int) a" vs "(int)a"
sp_inside_braces = force # "{ 1 }" vs "{1}"
sp_inside_braces_struct = force # "{ 1 }" vs "{1}"
sp_inside_braces_enum = force # "{ 1 }" vs "{1}"
sp_inside_paren = remove # "( 1 )" vs "(1)"
sp_inside_fparen = remove # "( 1 )" vs "(1)" - functions
sp_inside_sparen = remove # "( 1 )" vs "(1)" - if/for/etc
sp_else_brace = force
sp_after_comma = force
sp_after_type = add
sp_assign = force
sp_after_assign = force
sp_cmt_cpp_start = force
sp_before_tr_emb_cmt = force
sp_num_before_tr_emb_cmt = 1
sp_func_def_paren = remove # "int foo (){" vs "int foo(){"
sp_func_call_paren = remove # "foo (" vs "foo("
sp_func_proto_paren = remove # "int foo ();" vs "int foo();"
# Spaces related to templates
sp_inside_angle = remove
sp_after_angle = add
sp_permit_cpp11_shift = true
#Space around operations
sp_arith = force
#Space around pointer assignments
#Several of these are currently broken and won't be fixed until uncrustify 0.7 is released
#sp_after_ptr_star_qualifier = force
#sp_before_ptr_star = remove
#sp_after_ptr_star = force
#sp_after_ptr_star_func = remove
cmt_reflow_mode = 1
cmt_convert_tab_to_spaces = true
cmt_indent_multi = false
cmt_multi_check_last = false
align_var_def_star_style = 0
align_keep_extra_space = true
align_right_cmt_mix = false
align_right_cmt_span = 0
align_right_cmt_gap = 0
# Not enforced for now
code_width = 132
eat_blanks_before_close_brace = TRUE
eat_blanks_after_open_brace = TRUE