exchange/contrib/uncrustify.cfg

96 lines
1.9 KiB
INI
Raw Normal View History

2019-08-25 13:40:22 +02:00
input_tab_size = 2
output_tab_size = 2
indent_columns = 2
indent_with_tabs = 0
indent_case_brace = 2
2019-09-16 21:34:19 +02:00
indent_label=-16
2019-08-25 13:40:22 +02:00
code_width=80
2019-08-25 21:07:38 +02:00
#cmd_width=80
2019-08-25 13:40:22 +02:00
2019-08-25 16:09:31 +02:00
# Leave most comments alone for now
cmt_indent_multi=false
2019-08-25 13:40:22 +02:00
sp_cmt_cpp_start=add
2019-08-25 16:18:24 +02:00
sp_not=add
2019-08-25 16:25:44 +02:00
sp_func_call_user_paren_paren=remove
sp_inside_fparen=remove
2019-08-25 21:07:38 +02:00
sp_after_cast=add
2019-08-25 16:09:31 +02:00
2019-08-25 13:40:22 +02:00
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
2021-12-11 21:53:30 +01:00
mod_full_paren_if_bool=false
2019-08-25 13:40:22 +02:00
# 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
2019-08-25 16:09:31 +02:00
2019-08-25 13:40:22 +02:00
# no newline between "else" and "if"
nl_else_if=remove
2019-08-25 16:09:31 +02:00
nl_func_paren=remove
2019-08-25 13:40:22 +02:00
nl_assign_brace=remove
# No extra newlines that cause noisy diffs
nl_start_of_file=remove
2019-10-31 12:59:50 +01:00
nl_after_func_proto = 2
nl_after_func_body = 3
2019-08-25 13:40:22 +02:00
# If there's no new line, it's not a text file!
nl_end_of_file=add
2019-10-31 12:59:50 +01:00
nl_max_blank_in_func = 3
nl_max = 3
2019-08-25 13:40:22 +02:00
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
2019-10-31 12:59:50 +01:00
sp_inside_sparen = remove
2019-08-25 13:40:22 +02:00
# 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
2019-10-31 12:59:50 +01:00
# We'd want it for "if ( (foo) || (bar) )", but not for "if (m())",
# so as uncrustify doesn't give exactly what we want => ignore
sp_paren_paren = ignore
sp_inside_paren = remove
sp_bool = force
nl_func_type_name = force
#nl_branch_else = add
nl_else_brace = add
nl_elseif_brace = add
nl_for_brace = add