aboutsummaryrefslogtreecommitdiff
path: root/contrib/uncrustify.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/uncrustify.cfg')
-rw-r--r--contrib/uncrustify.cfg80
1 files changed, 80 insertions, 0 deletions
diff --git a/contrib/uncrustify.cfg b/contrib/uncrustify.cfg
new file mode 100644
index 000000000..4f15b89ed
--- /dev/null
+++ b/contrib/uncrustify.cfg
@@ -0,0 +1,80 @@
1# Almost the GNU format
2
3indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs
4input_tab_size = 8 # original tab size
5output_tab_size = 8 # new tab size
6indent_columns = 2
7# indent_label = 2 # pos: absolute col, neg: relative column
8indent_align_string = False # align broken strings
9indent_brace = 2
10
11nl_enum_brace = remove # "enum {" vs "enum \n {"
12nl_union_brace = remove # "union {" vs "union \n {"
13nl_struct_brace = remove # "struct {" vs "struct \n {"
14nl_do_brace = add # "do {" vs "do \n {"
15nl_if_brace = add # "if () {" vs "if () \n {"
16nl_for_brace = add # "for () {" vs "for () \n {"
17nl_else_brace = add # "else {" vs "else \n {"
18nl_while_brace = add # "while () {" vs "while () \n {"
19nl_switch_brace = add # "switch () {" vs "switch () \n {"
20nl_func_var_def_blk = 1
21nl_before_case = 1
22nl_fcall_brace = add # "foo() {" vs "foo()\n{"
23nl_fdef_brace = add # "int foo() {" vs "int foo()\n{"
24# nl_after_return = TRUE
25nl_brace_while = remove
26nl_brace_else = add
27nl_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
35sp_before_semi = remove
36sp_paren_paren = remove # space between (( and ))
37sp_return_paren = remove # "return (1);" vs "return(1);"
38sp_sizeof_paren = remove # "sizeof (int)" vs "sizeof(int)"
39sp_before_sparen = force # "if (" vs "if("
40sp_after_sparen = force # "if () {" vs "if (){"
41sp_after_cast = remove # "(int) a" vs "(int)a"
42sp_inside_braces = force # "{ 1 }" vs "{1}"
43sp_inside_braces_struct = force # "{ 1 }" vs "{1}"
44sp_inside_braces_enum = force # "{ 1 }" vs "{1}"
45sp_inside_paren = remove
46sp_inside_fparen = remove
47sp_inside_sparen = remove
48#sp_type_func = ignore
49sp_assign = force
50sp_arith = force
51sp_bool = force
52sp_compare = force
53sp_after_comma = force
54sp_func_def_paren = remove # "int foo (){" vs "int foo(){"
55sp_func_call_paren = remove # "foo (" vs "foo("
56sp_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
78eat_blanks_before_close_brace = TRUE
79eat_blanks_after_open_brace = TRUE
80