uncrustify.cfg 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. input_tab_size = 2
  2. output_tab_size = 2
  3. indent_columns = 2
  4. indent_with_tabs = 0
  5. indent_case_brace = 2
  6. indent_label=-16
  7. code_width=80
  8. #cmd_width=80
  9. # Leave most comments alone for now
  10. cmt_indent_multi=false
  11. sp_cmt_cpp_start=add
  12. sp_not=add
  13. sp_func_call_user_paren_paren=remove
  14. sp_inside_fparen=remove
  15. sp_after_cast=add
  16. ls_for_split_full=true
  17. ls_func_split_full=true
  18. ls_code_width=true
  19. # Arithmetic operations in wrapped expressions should be at the start
  20. # of the line.
  21. pos_arith=lead
  22. # Fully parenthesize boolean exprs
  23. mod_full_paren_if_bool=true
  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. nl_func_paren=remove
  37. nl_assign_brace=remove
  38. # No extra newlines that cause noisy diffs
  39. nl_start_of_file=remove
  40. # If there's no new line, it's not a text file!
  41. nl_end_of_file=add
  42. sp_inside_paren = remove
  43. sp_arith = add
  44. sp_arith_additive = add
  45. # We want spaces before and after "="
  46. sp_before_assign = add
  47. sp_after_assign = add
  48. # we want "char *foo;"
  49. sp_after_ptr_star = remove
  50. sp_between_ptr_star = remove
  51. # we want "if (foo) { ... }"
  52. sp_before_sparen = add
  53. sp_inside_fparen = remove
  54. # add space before function call and decl: "foo (x)"
  55. sp_func_call_paren = add
  56. sp_func_proto_paren = add
  57. sp_func_proto_paren_empty = add
  58. sp_func_def_paren = add
  59. sp_func_def_paren_empty = add