uncrustify.cfg 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # Almost the GNU format
  2. indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs
  3. input_tab_size = 8 # original tab size
  4. output_tab_size = 8 # new tab size
  5. indent_columns = 2
  6. # indent_label = 2 # pos: absolute col, neg: relative column
  7. indent_align_string = False # align broken strings
  8. indent_brace = 2
  9. nl_enum_brace = remove # "enum {" vs "enum \n {"
  10. nl_union_brace = remove # "union {" vs "union \n {"
  11. nl_struct_brace = remove # "struct {" vs "struct \n {"
  12. nl_do_brace = add # "do {" vs "do \n {"
  13. nl_if_brace = add # "if () {" vs "if () \n {"
  14. nl_for_brace = add # "for () {" vs "for () \n {"
  15. nl_else_brace = add # "else {" vs "else \n {"
  16. nl_while_brace = add # "while () {" vs "while () \n {"
  17. nl_switch_brace = add # "switch () {" vs "switch () \n {"
  18. nl_func_var_def_blk = 1
  19. nl_before_case = 1
  20. nl_fcall_brace = add # "foo() {" vs "foo()\n{"
  21. nl_fdef_brace = add # "int foo() {" vs "int foo()\n{"
  22. # nl_after_return = TRUE
  23. nl_brace_while = add
  24. nl_brace_else = add
  25. nl_squeeze_ifdef = TRUE
  26. # mod_paren_on_return = ignore # "return 1;" vs "return (1);"
  27. # mod_full_brace_if = ignore # "if (a) a--;" vs "if (a) { a--; }"
  28. # mod_full_brace_for = ignore # "for () a--;" vs "for () { a--; }"
  29. # mod_full_brace_do = ignore # "do a--; while ();" vs "do { a--; } while ();"
  30. # mod_full_brace_while = ignore # "while (a) a--;" vs "while (a) { a--; }"
  31. sp_before_semi = remove
  32. sp_paren_paren = remove # space between (( and ))
  33. sp_return_paren = remove # "return (1);" vs "return(1);"
  34. sp_sizeof_paren = remove # "sizeof (int)" vs "sizeof(int)"
  35. sp_before_sparen = force # "if (" vs "if("
  36. sp_after_sparen = force # "if () {" vs "if (){"
  37. sp_after_cast = remove # "(int) a" vs "(int)a"
  38. sp_inside_braces = force # "{ 1 }" vs "{1}"
  39. sp_inside_braces_struct = force # "{ 1 }" vs "{1}"
  40. sp_inside_braces_enum = force # "{ 1 }" vs "{1}"
  41. sp_inside_paren = remove
  42. sp_inside_fparen = remove
  43. sp_inside_sparen = remove
  44. #sp_type_func = ignore
  45. sp_assign = force
  46. sp_arith = force
  47. sp_bool = force
  48. sp_compare = force
  49. sp_after_comma = force
  50. sp_func_def_paren = remove # "int foo (){" vs "int foo(){"
  51. sp_func_call_paren = remove # "foo (" vs "foo("
  52. sp_func_proto_paren = remove # "int foo ();" vs "int foo();"
  53. # align_with_tabs = FALSE # use tabs to align
  54. # align_on_tabstop = FALSE # align on tabstops
  55. # align_enum_equ_span = 4
  56. # align_nl_cont = TRUE
  57. # align_var_def_span = 2
  58. # align_var_def_inline = TRUE
  59. # align_var_def_star = TRUE
  60. # align_var_def_colon = TRUE
  61. # align_assign_span = 1
  62. # align_struct_init_span = 3
  63. # align_var_struct_span = 3
  64. # align_right_cmt_span = 3
  65. # align_pp_define_span = 3
  66. # align_pp_define_gap = 4
  67. # align_number_right = TRUE
  68. # align_typedef_span = 5
  69. # align_typedef_gap = 3
  70. # cmt_star_cont = TRUE
  71. eat_blanks_before_close_brace = TRUE
  72. eat_blanks_after_open_brace = TRUE