My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

uncrustify.cfg 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. #
  2. # http://uncrustify.sourceforge.net/
  3. #
  4. # Source beautifier configuration which helps to create
  5. # more consistent look to your source with the expected
  6. # coding style in VICE
  7. #
  8. # Usage: "uncrustify -c uncrustify.cfg source.c"
  9. #
  10. # There's no guarantee the look is perfect after this
  11. # but at least the most common stuff is corrected.
  12. #
  13. # Make sure to use the latest version.
  14. #
  15. # no cr/lf
  16. newlines = lf
  17. # no tabs
  18. indent_with_tabs = 0
  19. # no tabs
  20. output_tab_size = 2
  21. # small indents
  22. indent_columns = 2
  23. # Spaces to indent '{' from 'case'.
  24. # By default, the brace will appear under the 'c' in case.
  25. # Usually set to 0 or indent_columns.
  26. indent_case_brace = 4
  27. # Spaces to indent 'case' from 'switch'
  28. # Usually 0 or indent_columns.
  29. indent_switch_case = 4
  30. # Add or remove space around arithmetic operator '+', '-', '/', '*', etc
  31. sp_arith = force
  32. # Add or remove space around assignment operator '=', '+=', etc
  33. sp_assign = force
  34. # Add or remove space around boolean operators '&&' and '||'
  35. sp_bool = force
  36. # Add or remove space around compare operator '<', '>', '==', etc
  37. sp_compare = force
  38. # Add or remove space around the ':' in 'b ? t : f'
  39. sp_cond_colon = force
  40. # Add or remove space around the '?' in 'b ? t : f'
  41. sp_cond_question = force
  42. # In the abbreviated ternary form '(a ?: b)', add or remove space between '?'
  43. # and ':'.
  44. #
  45. # Overrides all other sp_cond_* options.
  46. sp_cond_ternary_short = remove
  47. # Add or remove space between nested parens
  48. sp_paren_paren = remove
  49. # Add or remove space inside '(' and ')'
  50. sp_inside_sparen = remove
  51. # Add or remove space between 'else' and '{' if on the same line
  52. sp_else_brace = force
  53. # Add or remove space between '}' and 'else' if on the same line
  54. sp_brace_else = force
  55. # Add or remove space inside a non-empty '[' and ']'
  56. sp_inside_square = remove
  57. # Add or remove space before '(' of 'if', 'for', 'switch', and 'while'
  58. sp_before_sparen = force
  59. # Add or remove space after ','
  60. sp_after_comma = force
  61. # Add or remove space before ','
  62. sp_before_comma = remove
  63. # Add or remove space between ')' and '{'
  64. sp_paren_brace = force
  65. # Add or remove space after ')' of 'if', 'for', 'switch', and 'while'
  66. sp_after_sparen = force
  67. # Add or remove space after ';', except when followed by a comment. Default=Add
  68. sp_after_semi = force
  69. # Add or remove newline between '}' and 'else'
  70. nl_brace_else = force
  71. # Add or remove newline between 'enum' and '{'
  72. nl_enum_brace = remove
  73. # Add or remove newline between 'struct and '{'
  74. nl_struct_brace = remove
  75. # Add or remove newline between 'union' and '{'
  76. nl_union_brace = remove
  77. # Whether to put a newline after brace open.
  78. # This also adds a newline before the matching brace close.
  79. nl_after_brace_open = true
  80. # Add or remove newline between 'if' and '{'
  81. nl_if_brace = remove
  82. # Add or remove newline between 'else' and '{'
  83. nl_else_brace = remove
  84. # Add or remove newline between 'switch' and '{'
  85. nl_switch_brace = remove
  86. # Add or remove newline at the end of the file
  87. nl_end_of_file = add
  88. # Add or remove newline between function signature and '{'
  89. nl_fdef_brace = remove
  90. # Whether to remove blank lines after '{'
  91. eat_blanks_after_open_brace = true
  92. # Whether to remove blank lines before '}'
  93. eat_blanks_before_close_brace = false
  94. # Whether to enforce that all blocks of an 'if'/'else if'/'else' chain either
  95. # have, or do not have, braces. If true, braces will be added if any block
  96. # needs braces, and will only be removed if they can be removed from all
  97. # blocks.
  98. #
  99. # Overrides mod_full_brace_if.
  100. mod_full_brace_if_chain = true
  101. # Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'.
  102. mod_full_brace_if = false
  103. # Add or remove braces on single-line 'do' statement
  104. mod_full_brace_do = false
  105. # Add or remove braces on single-line 'for' statement
  106. mod_full_brace_for = false
  107. # Add or remove braces on single-line 'while' statement
  108. mod_full_brace_while = false
  109. # Whether to remove superfluous semicolons
  110. mod_remove_extra_semicolon = true
  111. # If an #ifdef or #else body exceeds the specified number of newlines and
  112. # doesn't have a comment after the #else, a comment will be added.
  113. mod_add_long_ifdef_else_comment = 40
  114. # Whether to put a newline after a brace close.
  115. # Does not apply if followed by a necessary ';'.
  116. nl_after_brace_close = true
  117. # If false, disable all multi-line comment changes, including cmt_width. keyword substitution, and leading chars.
  118. # Default is true.
  119. cmt_indent_multi = false
  120. # Add or remove indentation of preprocessor directives inside #if blocks
  121. # at brace level 0 (file-level).
  122. pp_indent = add
  123. # Whether to indent #if/#else/#endif at the brace level. If false, these are
  124. # indented from column 1.
  125. pp_indent_at_level = true
  126. # If pp_indent_at_level=true, sets the indent for #if, #else and #endif when
  127. # not at file-level. Negative values decrease indent down to the first column.
  128. #
  129. # =0: Indent preprocessors using output_tab_size
  130. # >0: Column at which all preprocessors will be indented
  131. pp_indent_if = 0
  132. # Whether to indent case statements between #if, #else, and #endif.
  133. # Only applies to the indent of the preprocesser that the case statements
  134. # directly inside of.
  135. #
  136. # Default: true
  137. pp_indent_case = false
  138. # Whether to indent the code between #if, #else and #endif.
  139. pp_if_indent_code = true
  140. # Specifies the number of columns to indent preprocessors per level
  141. # at brace level 0 (file-level). If pp_indent_at_level=false, also specifies
  142. # the number of columns to indent preprocessors per level
  143. # at brace level > 0 (function-level).
  144. #
  145. # Default: 1
  146. pp_indent_count = 2
  147. # Whether to indent '#define' at the brace level. If false, these are
  148. # indented from column 1.
  149. pp_define_at_level = true
  150. # Whether to ignore the '#define' body while formatting.
  151. pp_ignore_define_body = true
  152. #
  153. # Newline adding and removing options
  154. #
  155. # Don't split one-line braced assignments, as in 'foo_t f = { 1, 2 };'.
  156. nl_assign_leave_one_liners = true
  157. # Don't split one-line braced statements inside a 'class xx { }' body.
  158. nl_class_leave_one_liners = true
  159. # Don't split one-line enums, as in 'enum foo { BAR = 15 };'
  160. nl_enum_leave_one_liners = true
  161. # Don't split one-line get or set functions.
  162. nl_getset_leave_one_liners = true
  163. # (C#) Don't split one-line property get or set functions.
  164. nl_cs_property_leave_one_liners = true
  165. # Don't split one-line function definitions, as in 'int foo() { return 0; }'.
  166. # might modify nl_func_type_name
  167. nl_func_leave_one_liners = true
  168. # Don't split one-line C++11 lambdas, as in '[]() { return 0; }'.
  169. nl_cpp_lambda_leave_one_liners = false
  170. # Don't split one-line if/else statements, as in 'if(...) b++;'.
  171. nl_if_leave_one_liners = true
  172. # Don't split one-line while statements, as in 'while(...) b++;'.
  173. nl_while_leave_one_liners = true
  174. # Don't split one-line for statements, as in 'for(...) b++;'.
  175. nl_for_leave_one_liners = true
  176. # Whether to indent the body of a C++11 lambda.
  177. indent_cpp_lambda_body = true
  178. # The value might be used twice:
  179. # - at the assignment
  180. # - at the opening brace
  181. #
  182. # To prevent the double use of the indentation value, use this option with the
  183. # value 'true'.
  184. #
  185. # true: indentation will be used only once
  186. # false: indentation will be used every time (default)
  187. indent_cpp_lambda_only_once = true
  188. # How to reflow comments.
  189. #
  190. # 0: No reflowing (apart from the line wrapping due to cmt_width) (default)
  191. # 1: No touching at all
  192. # 2: Full reflow
  193. cmt_reflow_mode = 1
  194. # Whether to group cpp-comments that look like they are in a block. Only
  195. # meaningful if cmt_cpp_to_c=true.
  196. cmt_cpp_group = true
  197. # Whether to put a star on subsequent comment lines.
  198. cmt_star_cont = true
  199. # The number of spaces to insert at the start of subsequent comment lines.
  200. cmt_sp_before_star_cont = 1
  201. # The number of spaces to insert after the star on subsequent comment lines.
  202. cmt_sp_after_star_cont = 1
  203. # Whether to convert all tabs to spaces in comments. If false, tabs in
  204. # comments are left alone, unless used for indenting.
  205. cmt_convert_tab_to_spaces = true
  206. # Add a newline before ')' if an if/for/while/switch condition spans multiple
  207. # lines. Overrides nl_before_if_closing_paren if both are specified.
  208. nl_multi_line_sparen_close = ignore
  209. # Add or remove newline before 'if'/'else if' closing parenthesis.
  210. nl_before_if_closing_paren = ignore
  211. # Add or remove space around assignment operator '=' in a prototype.
  212. #
  213. # If set to ignore, use sp_assign.
  214. sp_assign_default = remove
  215. # Whether to right-align numbers.
  216. align_number_right = true