diff options
Diffstat (limited to 'contrib/uncrustify.cfg')
-rw-r--r-- | contrib/uncrustify.cfg | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/contrib/uncrustify.cfg b/contrib/uncrustify.cfg new file mode 100644 index 000000000..c9ca76512 --- /dev/null +++ b/contrib/uncrustify.cfg | |||
@@ -0,0 +1,67 @@ | |||
1 | input_tab_size = 2 | ||
2 | output_tab_size = 2 | ||
3 | |||
4 | indent_columns = 2 | ||
5 | indent_with_tabs = 0 | ||
6 | indent_case_brace = 2 | ||
7 | |||
8 | code_width=80 | ||
9 | cmd_width=80 | ||
10 | |||
11 | sp_cmt_cpp_start=add | ||
12 | |||
13 | ls_for_split_full=true | ||
14 | ls_func_split_full=true | ||
15 | ls_code_width=true | ||
16 | |||
17 | # Arithmetic operations in wrapped expressions should be at the start | ||
18 | # of the line. | ||
19 | pos_arith=lead | ||
20 | |||
21 | # Fully parenthesize boolean exprs | ||
22 | mod_full_paren_if_bool=true | ||
23 | |||
24 | # Braces should be on their own line | ||
25 | nl_fdef_brace=add | ||
26 | nl_enum_brace=add | ||
27 | nl_struct_brace=add | ||
28 | nl_union_brace=add | ||
29 | nl_if_brace=add | ||
30 | nl_brace_else=add | ||
31 | nl_elseif_brace=add | ||
32 | nl_while_brace=add | ||
33 | nl_switch_brace=add | ||
34 | # no newline between "else" and "if" | ||
35 | nl_else_if=remove | ||
36 | |||
37 | nl_assign_brace=remove | ||
38 | |||
39 | # No extra newlines that cause noisy diffs | ||
40 | nl_start_of_file=remove | ||
41 | # If there's no new line, it's not a text file! | ||
42 | nl_end_of_file=add | ||
43 | |||
44 | sp_inside_paren = remove | ||
45 | |||
46 | sp_arith = add | ||
47 | sp_arith_additive = add | ||
48 | |||
49 | # We want spaces before and after "=" | ||
50 | sp_before_assign = add | ||
51 | sp_after_assign = add | ||
52 | |||
53 | # we want "char *foo;" | ||
54 | sp_after_ptr_star = remove | ||
55 | sp_between_ptr_star = remove | ||
56 | |||
57 | # we want "if (foo) { ... }" | ||
58 | sp_before_sparen = add | ||
59 | |||
60 | sp_inside_fparen = remove | ||
61 | |||
62 | # add space before function call and decl: "foo (x)" | ||
63 | sp_func_call_paren = add | ||
64 | sp_func_proto_paren = add | ||
65 | sp_func_proto_paren_empty = add | ||
66 | sp_func_def_paren = add | ||
67 | sp_func_def_paren_empty = add | ||