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