From d46778d5d9ce3478015bd0f20ff96e65e9726979 Mon Sep 17 00:00:00 2001 From: Niclas Antti Date: Mon, 25 Mar 2019 17:26:15 +0200 Subject: [PATCH] Formatting change. Two changes in uncrustify. 1. do not align member initializers. 2. Do not split enums to multiple lines, force commas to be trailing. Intendation is aligned as before. const SOME_THINGS config_thing_params[] = { {A, B, {C ,D}}; {E, F, {G,H} } } => const SOME_THINGS config_thing_params[] = { {A, B, {C, D}}; {E, F, {G, H}} } static const MXS_ENUM_VALUE ssl_values[] = { {"required", 1 }, {"true", 1 }, {"yes", 1 }, {"on", 1 }, {"1", 1 }, {"disabled", 0 }, {"false", 0 }, {"no", 0 }, {"off", 0 }, {"0", 0 } } => static const MXS_ENUM_VALUE ssl_values[] = { {"required", 1}, {"true", 1}, {"yes", 1}, {"on", 1}, {"1", 1}, {"disabled", 0}, {"false", 0}, {"no", 0}, {"off", 0}, {"0", 0} } enum E1 {A, B , C}; => enum E1 {A, B, C}; enum E { A, B ,Z }; => enum E { A, B, Z }; --- uncrustify.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uncrustify.cfg b/uncrustify.cfg index c8e26fb71..d373e53b6 100644 --- a/uncrustify.cfg +++ b/uncrustify.cfg @@ -1450,7 +1450,7 @@ pos_conditional = trail # ignore/join/lead/lead_break/lead_for pos_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of the comma in enum entries. -pos_enum_comma = trail_break # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_enum_comma = trail # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of the comma in the base class list if there are more than one line, # (tied to nl_class_init_args). @@ -1584,7 +1584,7 @@ align_var_struct_thresh = 0 # unsigned number align_var_struct_gap = 1 # unsigned number # The span for aligning struct initializer values (0=don't align) -align_struct_init_span = 1 # unsigned number +align_struct_init_span = 0 # unsigned number # The minimum space between the type and the synonym of a typedef. align_typedef_gap = 1 # unsigned number