Commit Graph

11 Commits

Author SHA1 Message Date
b4e8f79c5f Format core sources again
Formatted with nl_func_type_name and related options set to ignore. This
keeps the formatting intact for long return types in declarations and
definitions.
2019-05-10 09:21:52 +03:00
b13ffc73ef Alow [en|dis]abling of uncrustify
With

    // *uncrustify-off*

    ...

    // *uncrustify-on*

it is now possible to disable uncrustify for a particular code block.
Comes in handy at times.
2019-04-29 10:42:33 +03:00
fd51048640 Don't align function parameters
The function parameters in declarations are not aligned.
2019-04-26 11:40:30 +03:00
c5b6693fce Enable struct initializer alignment
Uncrustify 0.68 fixed the addition of extra spaces after the last
argument.
2019-04-26 11:40:30 +03:00
d46778d5d9 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
};
2019-03-27 13:31:59 +02:00
fd39291542 Don't indent extern "C" blocks 2019-03-26 13:44:04 +02:00
e52741679e Change uncrustify to add newline before constructor initializer list.
Also add exclusion of "build" directory to maxscale-uncrustify.sh script.
2018-11-02 13:15:28 +02:00
75ea1b6ea1 Fix formatting of new(std::nothrow)
The code previously formatted everything as `new( std::nothrow)`.
2018-10-04 21:50:44 +03:00
71ffef5708 Partially revert 4ba011266843857bbd3201e5b925a47e88e1808f
Add back leading operator enforcement.
2018-09-20 15:57:30 +03:00
4ba0112668 Deactive some uncrustify settings
This only deactivates some of the more heavy-handed features. All files have
been formatted with the new settings, which seems to have only affected lines
which were not formatted before.
2018-09-14 16:20:13 +03:00
c447e5cf15 Uncrustify maxscale
See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
2018-09-09 22:26:19 +03:00