summaryrefslogtreecommitdiff
path: root/conf/uncrustify.cfg
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-10-09 17:30:49 +0000
committerng0 <ng0@n0.is>2019-10-09 17:30:49 +0000
commit55bd2280c8a69261f01cd06ae88e3e7ae32cf58b (patch)
tree139a13b17edc0268ba7018875a30ef98bbcd9159 /conf/uncrustify.cfg
parentf3fcc325beac420111498f428764ccad8109f599 (diff)
downloadbuild-common-55bd2280c8a69261f01cd06ae88e3e7ae32cf58b.tar.gz
build-common-55bd2280c8a69261f01cd06ae88e3e7ae32cf58b.tar.bz2
build-common-55bd2280c8a69261f01cd06ae88e3e7ae32cf58b.zip
check in code independent build system code.
Diffstat (limited to 'conf/uncrustify.cfg')
-rw-r--r--conf/uncrustify.cfg78
1 files changed, 78 insertions, 0 deletions
diff --git a/conf/uncrustify.cfg b/conf/uncrustify.cfg
new file mode 100644
index 0000000..6ced05d
--- /dev/null
+++ b/conf/uncrustify.cfg
@@ -0,0 +1,78 @@
+input_tab_size = 2
+output_tab_size = 2
+
+indent_columns = 2
+indent_with_tabs = 0
+indent_case_brace = 2
+indent_label=0
+
+code_width=80
+#cmd_width=80
+
+# Leave most comments alone for now
+cmt_indent_multi=false
+sp_cmt_cpp_start=add
+
+sp_not=add
+
+sp_func_call_user_paren_paren=remove
+sp_inside_fparen=remove
+sp_after_cast=add
+
+ls_for_split_full=true
+ls_func_split_full=true
+ls_code_width=true
+
+# Arithmetic operations in wrapped expressions should be at the start
+# of the line.
+pos_arith=lead
+
+# Fully parenthesize boolean exprs
+mod_full_paren_if_bool=true
+
+# Braces should be on their own line
+nl_fdef_brace=add
+nl_enum_brace=add
+nl_struct_brace=add
+nl_union_brace=add
+nl_if_brace=add
+nl_brace_else=add
+nl_elseif_brace=add
+nl_while_brace=add
+nl_switch_brace=add
+
+# no newline between "else" and "if"
+nl_else_if=remove
+
+nl_func_paren=remove
+nl_assign_brace=remove
+
+# No extra newlines that cause noisy diffs
+nl_start_of_file=remove
+# If there's no new line, it's not a text file!
+nl_end_of_file=add
+
+sp_inside_paren = remove
+
+sp_arith = add
+sp_arith_additive = add
+
+# We want spaces before and after "="
+sp_before_assign = add
+sp_after_assign = add
+
+# we want "char *foo;"
+sp_after_ptr_star = remove
+sp_between_ptr_star = remove
+
+# we want "if (foo) { ... }"
+sp_before_sparen = add
+
+sp_inside_fparen = remove
+
+# add space before function call and decl: "foo (x)"
+sp_func_call_paren = add
+sp_func_proto_paren = add
+sp_func_proto_paren_empty = add
+sp_func_def_paren = add
+sp_func_def_paren_empty = add