]> git.notmuchmail.org Git - notmuch/blob - devel/uncrustify.cfg
1dbc5e4e8973e415d28d59e6d9ef46ee8b9fd631
[notmuch] / devel / uncrustify.cfg
1 #
2 # uncrustify config file for the linux kernel
3 #
4 # $Id: linux-indent.cfg 488 2006-09-09 12:44:38Z bengardner $
5 # Taken from the uncrustify distribution under license (GPL2+)
6 #
7 # sample usage:
8 #        uncrustify --replace -c uncrustify.cfg foo.c
9 #
10 #
11
12 indent_with_tabs        = 2             # 1=indent to level only, 2=indent with tabs
13 align_with_tabs         = TRUE          # use tabs to align
14 align_on_tabstop        = TRUE          # align on tabstops
15 input_tab_size          = 8             # original tab size
16 output_tab_size         = 8             # new tab size
17 indent_columns          = 4
18
19 indent_label            = 2             # pos: absolute col, neg: relative column
20
21
22 #
23 # inter-symbol newlines
24 #
25
26 nl_enum_brace           = remove        # "enum {" vs "enum \n {"
27 nl_union_brace          = remove        # "union {" vs "union \n {"
28 nl_struct_brace         = remove        # "struct {" vs "struct \n {"
29 nl_do_brace             = remove        # "do {" vs "do \n {"
30 nl_if_brace             = remove        # "if () {" vs "if () \n {"
31 nl_for_brace            = remove        # "for () {" vs "for () \n {"
32 nl_else_brace           = remove        # "else {" vs "else \n {"
33 nl_while_brace          = remove        # "while () {" vs "while () \n {"
34 nl_switch_brace         = remove        # "switch () {" vs "switch () \n {"
35 nl_brace_while          = remove        # "} while" vs "} \n while" - cuddle while
36 nl_brace_else           = remove        # "} else" vs "} \n else" - cuddle else
37 nl_func_var_def_blk     = 1
38 nl_fcall_brace          = remove        # "list_for_each() {" vs "list_for_each()\n{"
39 nl_fdef_brace           = force         # "int foo() {" vs "int foo()\n{"
40 # nl_after_return               = TRUE;
41 # nl_before_case        = 1
42
43 # Add or remove newline between return type and function name in definition
44 nl_func_type_name       = force
45 nl_enum_leave_one_liners = True
46 nl_enum_brace = Remove
47 nl_after_struct = 0
48 #
49 # Source code modifications
50 #
51
52 # mod_paren_on_return   = remove        # "return 1;" vs "return (1);"
53 # mod_full_brace_if     = remove        # "if (a) a--;" vs "if (a) { a--; }"
54 # mod_full_brace_for    = remove        # "for () a--;" vs "for () { a--; }"
55 # mod_full_brace_do     = remove        # "do a--; while ();" vs "do { a--; } while ();"
56 # mod_full_brace_while  = remove        # "while (a) a--;" vs "while (a) { a--; }"
57
58
59 #
60 # inter-character spacing options
61 #
62
63 sp_before_ptr_star      = force
64 sp_between_ptr_star     = remove
65 sp_after_ptr_star       = remove
66
67 # sp _return_paren      = force         # "return (1);" vs "return(1);"
68 sp_sizeof_paren         = force         # "sizeof (int)" vs "sizeof(int)"
69 sp_before_sparen        = force         # "if (" vs "if("
70 sp_after_sparen         = force         # "if () {" vs "if (){"
71 sp_sparen_brace         = force
72 sp_after_cast           = force         # "(int) a" vs "(int)a"
73 sp_inside_braces        = add           # "{ 1 }" vs "{1}"
74 sp_inside_braces_struct = add           # "{ 1 }" vs "{1}"
75 sp_inside_braces_enum   = add           # "{ 1 }" vs "{1}"
76 sp_assign               = force
77 sp_arith                = force
78 sp_bool                 = add
79 sp_compare              = add
80 sp_assign               = add
81 sp_after_comma          = add
82 sp_func_def_paren       = force         # "int foo (){" vs "int foo(){"
83 sp_func_call_paren      = force         # "foo (" vs "foo("
84 sp_func_proto_paren     = force         # "int foo ();" vs "int foo();"
85 sp_brace_else           = force         # "} else" vs "}else"
86 sp_else_brace           = force         # "else {" vs "else{"
87 #
88 # Aligning stuff
89 #
90
91 align_enum_equ_span     = 4             # '=' in enum definition
92 # align_nl_cont         = TRUE
93 # align_var_def_span    = 2
94 # align_var_def_inline  = TRUE
95 # align_var_def_star    = FALSE
96 # align_var_def_colon   = TRUE
97 # align_assign_span     = 1
98 align_struct_init_span  = 0             # align stuff in a structure init '= { }'
99 align_right_cmt_span    = 8             # align comments span this much in func
100 # align_pp_define_span  = 8;
101 # align_pp_define_gap   = 4;
102
103 # cmt_star_cont         = FALSE
104
105 # indent_brace          = 0