From c5a7ecd4b770e809e17a0f915048a0e1bc375495 Mon Sep 17 00:00:00 2001 From: Bob Feretich Date: Wed, 11 Apr 2018 06:47:03 -0600 Subject: [PATCH] tools/uncrustify.cfg: Updated, corrected, and verified. --- tools/uncrustify.cfg | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/tools/uncrustify.cfg b/tools/uncrustify.cfg index 8f5d7b3e62..b6eebc46d2 100644 --- a/tools/uncrustify.cfg +++ b/tools/uncrustify.cfg @@ -7,20 +7,28 @@ input_tab_size = 4 # original tab size output_tab_size = 4 # new tab size indent_columns = 2 # Two columns per indent level indent_label = 1 # pos: absolute col, neg: relative column +code_width = 78 # Try to limit code width to N number of columns # # Newlines # nl_max = 2 # No more than \n\n +nl_after_semicolon = true # Make sure there is only one statement per line +nl_after_brace_open = true # Add \n after brace open and before the matching brace close. +nl_if_leave_one_liners = false # Split one-line if/else statements +sp_after_semi = remove # Remove space after ';', except when followed by a comment. +sp_after_semi_for_empty = force # Force one space after the final semicolon of an empty part of a for statement. +sp_before_square = remove # Remove space before '[' (except '[]'). +nl_after_label_colon = true # Force a newline after a label's colon. nl_after_func_proto = 1 # One \n after function prototype nl_after_func_proto_group = 2 # Two \n after last prototype -nl_after_func_body = 1 # One \n after function body +nl_after_func_body = 2 # was 1. One \n after function body nl_after_func_body_class = 1 # One \n after '}' of a single line function body nl_after_multiline_comment = true # Newline after multiline comment -nl_before_block_comment = 2 # Two \n after block comment -nl_before_c_comment = 1 # At least line space before C comment -nl_before_cpp_comment = 1 # At least line space before C++ comment +nl_before_block_comment = 2 # Two \n before block comment +nl_before_c_comment = 2 # was 1. At least line space before C comment +nl_before_cpp_comment = 1 #At least line space before C++ comment nl_after_multiline_comment = true # Force newline after mult-line comment nl_after_struct = 2 # Two \n after struct nl_after_class = 2 # Two \n after class @@ -29,9 +37,9 @@ nl_after_access_spec = 1 # One \n after 'private:', 'public:', . nl_comment_func_def = 2 # Two \n between function def and function comment. nl_after_try_catch_finally = 2 # Two \n after a try-catch-finally block nl_around_cs_property = 0 # No change in number of newlines before/after a property, indexer or event decl. -eat_blanks_after_open_brace = true # Remove blank lines after '{' -eat_blanks_before_close_brace = true # Remove blank lines after '}' -nl_remove_extra_newlines = 2 # Remove all newlines not specified by config +eat_blanks_after_open_brace = false # May be a comment. Remove blank lines after '{' +eat_blanks_before_close_brace = false # May be a comment. Remove blank lines after '}' +nl_remove_extra_newlines = 1 # was 2. Remove all newlines not specified by config nl_before_return = false # No newline before return nl_after_return = false # No newline after return statement` @@ -59,7 +67,7 @@ mod_full_brace_do = add # "do { a--; } while ();" vs "do a--; w mod_full_brace_for = add # "for () { a--; }" vs "for () a--;" mod_full_brace_function = add # Add braces on single-line function definitions. (Pawn) mod_full_brace_if = add # "if (a) { a--; }" vs "if (a) a--;" -mod_full_brace_if_chain = true # Make all if/elseif/else statements in a chain be braced +mod_full_brace_if_chain = false # was true Make all if/elseif/else statements in a chain be braced mod_full_brace_nl = 1 # Don't remove if more than 1 newlines mod_full_brace_while = add # "while (a) { a--; } " vs "while (a) a--;" mod_full_brace_using = add # Add braces on single-line 'using ()' statement @@ -92,7 +100,8 @@ cmt_cpp_nl_start = false # No '/*' on the first line of the comb cmt_cpp_nl_end = true # Add newline before the closing '*/' of the combined C++ comment cmt_cpp_to_c = true # Change C++ comments to C comments cmt_star_cont = true # Add star to comment continuation -cmt_sp_before_star_cont = 1 # One space before star on subsequent comment lines +cmt_sp_before_star_cont = 0 # was 1. One space before star on subsequent comment lines + # The value 1 added an extra space, indenting by 2. cmt_sp_after_star_cont = 1 # One space after star on subsequent comment lines cmt_multi_check_last = true # Multi-line comments with a '*' lead, remove leading spaces # cmt_insert_file_header # filename containing the file header