My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

uncrustify.cfg 10.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  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 = 0
  27. # Spaces to indent 'case' from 'switch'
  28. # Usually 0 or indent_columns.
  29. indent_switch_case = 2
  30. # indent 'break' with 'case' from 'switch'.
  31. indent_switch_break_with_case = false
  32. # Whether to indent continued function call parameters one indent level,
  33. # rather than aligning parameters under the open parenthesis.
  34. indent_func_call_param = true
  35. # Whether to indent continued function definition parameters one indent level,
  36. # rather than aligning parameters under the open parenthesis.
  37. indent_func_def_param = true
  38. # Add or remove space between function name and '(' on function declaration.
  39. sp_func_proto_paren = remove
  40. # Add or remove space between function name and '(' on function calls.
  41. sp_func_call_paren = remove
  42. # Add or remove space around arithmetic operator '+', '-', '/', '*', etc
  43. sp_arith = force
  44. # Add or remove space around assignment operator '=', '+=', etc
  45. sp_assign = force
  46. # Add or remove space around boolean operators '&&' and '||'
  47. sp_bool = force
  48. # Add or remove space around compare operator '<', '>', '==', etc
  49. sp_compare = force
  50. # Add or remove space around the ':' in 'b ? t : f'
  51. sp_cond_colon = force
  52. # Add or remove space around the '?' in 'b ? t : f'
  53. sp_cond_question = force
  54. # In the abbreviated ternary form '(a ?: b)', add or remove space between '?'
  55. # and ':'.
  56. #
  57. # Overrides all other sp_cond_* options.
  58. sp_cond_ternary_short = remove
  59. # Add or remove space between nested parens
  60. sp_paren_paren = remove
  61. # Add or remove space inside '(' and ')'
  62. sp_inside_sparen = remove
  63. # Add or remove space between 'else' and '{' if on the same line
  64. sp_else_brace = add
  65. # Add or remove space between '}' and 'else' if on the same line
  66. sp_brace_else = add
  67. # Add or remove space inside a non-empty '[' and ']'
  68. sp_inside_square = remove
  69. # Add or remove space before '(' of 'if', 'for', 'switch', and 'while'
  70. sp_before_sparen = add
  71. # Add or remove space after ','
  72. sp_after_comma = add
  73. # Add or remove space before ','
  74. sp_before_comma = remove
  75. # Add or remove space between ')' and '{'
  76. sp_paren_brace = add
  77. # Add or remove space between ')' and '{' of function.
  78. sp_fparen_brace = add
  79. # Add or remove space after ')' of 'if', 'for', 'switch', and 'while'
  80. sp_after_sparen = add
  81. # Add or remove space after ';', except when followed by a comment. Default=Add
  82. sp_after_semi = add
  83. # Add or remove newline between '}' and 'else'
  84. nl_brace_else = add
  85. # Add or remove newline between 'enum' and '{'
  86. nl_enum_brace = remove
  87. # Add or remove newline between 'struct and '{'
  88. nl_struct_brace = remove
  89. # Add or remove newline between 'union' and '{'
  90. nl_union_brace = remove
  91. # Whether to put a newline after brace open.
  92. # This also adds a newline before the matching brace close.
  93. nl_after_brace_open = true
  94. # Add or remove newline between 'if' and '{'
  95. nl_if_brace = remove
  96. # Add or remove newline between 'else' and '{'
  97. nl_else_brace = remove
  98. # Add or remove newline between 'switch' and '{'
  99. nl_switch_brace = remove
  100. # Add or remove newline at the end of the file
  101. nl_end_of_file = add
  102. # Add or remove newline between function signature and '{'
  103. nl_fdef_brace = remove
  104. # Whether to collapse a function definition whose body (not counting braces)
  105. # is only one line so that the entire definition (prototype, braces, body) is
  106. # a single line.
  107. nl_create_func_def_one_liner = true
  108. # Whether to remove blank lines after '{'
  109. eat_blanks_after_open_brace = false
  110. # Whether to remove blank lines before '}'
  111. eat_blanks_before_close_brace = false
  112. # Whether to enforce that all blocks of an 'if'/'else if'/'else' chain either
  113. # have, or do not have, braces. If true, braces will be added if any block
  114. # needs braces, and will only be removed if they can be removed from all
  115. # blocks.
  116. #
  117. # Overrides mod_full_brace_if.
  118. mod_full_brace_if_chain = true
  119. # Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'.
  120. mod_full_brace_if = false
  121. # Add or remove braces on single-line 'do' statement
  122. mod_full_brace_do = false
  123. # Add or remove braces on single-line 'for' statement
  124. mod_full_brace_for = false
  125. # Add or remove braces on single-line 'while' statement
  126. mod_full_brace_while = false
  127. # Whether to remove superfluous semicolons
  128. mod_remove_extra_semicolon = true
  129. # Whether to put a newline after a brace close.
  130. # Does not apply if followed by a necessary ';'.
  131. nl_after_brace_close = true
  132. # If false, disable all multi-line comment changes, including cmt_width. keyword substitution, and leading chars.
  133. # Default is true.
  134. cmt_indent_multi = false
  135. #
  136. # Indent all code and preprocessor directives together
  137. # to remove all ambiguity and permit code folding.
  138. # TODO: Reduce indent at the "whole file" level.
  139. #
  140. # Add or remove indentation of preprocessor directives inside #if blocks
  141. # at brace level 0 (file-level).
  142. pp_indent = add
  143. # Whether to indent #if/#else/#endif at the brace level. If false, these are
  144. # indented from column 1.
  145. pp_indent_at_level = true
  146. # Whether to indent '#define' at the brace level. If false, these are
  147. # indented from column 1.
  148. pp_define_at_level = true
  149. # If pp_indent_at_level=true, sets the indent for #if, #else and #endif when
  150. # not at file-level. Negative values decrease indent down to the first column.
  151. #
  152. # =0: Indent preprocessors using output_tab_size
  153. # >0: Column at which all preprocessors will be indented
  154. pp_indent_if = 0
  155. # Whether to indent case statements between #if, #else, and #endif.
  156. # Only applies to the indent of the preprocesser that the case statements
  157. # directly inside of.
  158. #
  159. # Default: true
  160. pp_indent_case = false
  161. # Whether to indent the code between #if, #else and #endif.
  162. pp_if_indent_code = true
  163. # Specifies the number of columns to indent preprocessors per level
  164. # at brace level 0 (file-level). If pp_indent_at_level=false, also specifies
  165. # the number of columns to indent preprocessors per level
  166. # at brace level > 0 (function-level).
  167. #
  168. # Default: 1
  169. pp_indent_count = 2
  170. # Whether to ignore the '#define' body while formatting.
  171. pp_ignore_define_body = true
  172. # Whether to indent extern C blocks between #if, #else, and #endif.
  173. # Only applies to the indent of the preprocesser that the extern block is
  174. # directly inside of.
  175. #
  176. # Default: true
  177. pp_indent_extern = false
  178. # Whether to indent braces directly inside #if, #else, and #endif.
  179. # Only applies to the indent of the preprocesser that the braces are directly
  180. # inside of.
  181. #
  182. # Default: true
  183. pp_indent_brace = false
  184. # If an #ifdef body exceeds the specified number of newlines and doesn't have
  185. # a comment after the #endif, a comment will be added.
  186. mod_add_long_ifdef_endif_comment = 40
  187. # If an #ifdef or #else body exceeds the specified number of newlines and
  188. # doesn't have a comment after the #else, a comment will be added.
  189. mod_add_long_ifdef_else_comment = 40
  190. # Whether to remove blanks after '#ifxx' and '#elxx', or before '#elxx' and
  191. # '#endif'. Does not affect top-level #ifdefs.
  192. nl_squeeze_ifdef = true
  193. #
  194. # Newline adding and removing options
  195. #
  196. # Don't split one-line braced assignments, as in 'foo_t f = { 1, 2 };'.
  197. nl_assign_leave_one_liners = true
  198. # Don't split one-line braced statements inside a 'class xx { }' body.
  199. nl_class_leave_one_liners = true
  200. # Don't split one-line enums, as in 'enum foo { BAR = 15 };'
  201. nl_enum_leave_one_liners = true
  202. # Don't split one-line get or set functions.
  203. nl_getset_leave_one_liners = true
  204. # (C#) Don't split one-line property get or set functions.
  205. nl_cs_property_leave_one_liners = true
  206. # Don't split one-line function definitions, as in 'int foo() { return 0; }'.
  207. # might modify nl_func_type_name
  208. nl_func_leave_one_liners = true
  209. # Don't split one-line C++11 lambdas, as in '[]() { return 0; }'.
  210. nl_cpp_lambda_leave_one_liners = false
  211. # Don't split one-line if/else statements, as in 'if(...) b++;'.
  212. nl_if_leave_one_liners = true
  213. # Don't split one-line while statements, as in 'while(...) b++;'.
  214. nl_while_leave_one_liners = true
  215. # Don't split one-line for statements, as in 'for(...) b++;'.
  216. nl_for_leave_one_liners = true
  217. # Whether to indent the body of a C++11 lambda.
  218. indent_cpp_lambda_body = true
  219. # The value might be used twice:
  220. # - at the assignment
  221. # - at the opening brace
  222. #
  223. # To prevent the double use of the indentation value, use this option with the
  224. # value 'true'.
  225. #
  226. # true: indentation will be used only once
  227. # false: indentation will be used every time (default)
  228. indent_cpp_lambda_only_once = true
  229. # How to reflow comments.
  230. #
  231. # 0: No reflowing (apart from the line wrapping due to cmt_width) (default)
  232. # 1: No touching at all
  233. # 2: Full reflow
  234. cmt_reflow_mode = 1
  235. # Whether to group cpp-comments that look like they are in a block. Only
  236. # meaningful if cmt_cpp_to_c=true.
  237. cmt_cpp_group = true
  238. # Whether to put a star on subsequent comment lines.
  239. cmt_star_cont = true
  240. # The number of spaces to insert at the start of subsequent comment lines.
  241. cmt_sp_before_star_cont = 1
  242. # The number of spaces to insert after the star on subsequent comment lines.
  243. cmt_sp_after_star_cont = 1
  244. # Whether to convert all tabs to spaces in comments. If false, tabs in
  245. # comments are left alone, unless used for indenting.
  246. cmt_convert_tab_to_spaces = true
  247. # Add a newline before ')' if an if/for/while/switch condition spans multiple
  248. # lines. Overrides nl_before_if_closing_paren if both are specified.
  249. nl_multi_line_sparen_close = ignore
  250. # Add or remove newline before 'if'/'else if' closing parenthesis.
  251. nl_before_if_closing_paren = ignore
  252. # Add or remove space around assignment operator '=' in a prototype.
  253. #
  254. # If set to ignore, use sp_assign.
  255. sp_assign_default = remove
  256. # Whether to right-align numbers.
  257. align_number_right = true