uncrustify.cfg 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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=false
  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. nl_after_func_proto = 2
  41. nl_after_func_body = 3
  42. # If there's no new line, it's not a text file!
  43. nl_end_of_file=add
  44. nl_max_blank_in_func = 3
  45. nl_max = 3
  46. sp_inside_paren = remove
  47. sp_arith = add
  48. sp_arith_additive = add
  49. # We want spaces before and after "="
  50. sp_before_assign = add
  51. sp_after_assign = add
  52. # we want "char *foo;"
  53. sp_after_ptr_star = remove
  54. sp_between_ptr_star = remove
  55. # we want "if (foo) { ... }"
  56. sp_before_sparen = add
  57. sp_inside_fparen = remove
  58. sp_inside_sparen = remove
  59. # add space before function call and decl: "foo (x)"
  60. sp_func_call_paren = add
  61. sp_func_proto_paren = add
  62. sp_func_proto_paren_empty = add
  63. sp_func_def_paren = add
  64. sp_func_def_paren_empty = add
  65. # We'd want it for "if ( (foo) || (bar) )", but not for "if (m())",
  66. # so as uncrustify doesn't give exactly what we want => ignore
  67. sp_paren_paren = ignore
  68. sp_inside_paren = remove
  69. sp_bool = force
  70. nl_func_type_name = force
  71. #nl_branch_else = add
  72. nl_else_brace = add
  73. nl_elseif_brace = add
  74. nl_for_brace = add