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
};
This commit is contained in:
Niclas Antti 2019-03-25 17:26:15 +02:00
parent d40e29d5f6
commit d46778d5d9

View File

@ -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