Uncrustify: How to add a new line before declare or assign variable?

200 views Asked by At

Using the Uncrustify Code beautifier, How to add new line before declare and assign a variable ?

I want to convert this:

void Function()
{
    int a;

    function();
    a = 1;
    int b = a;
    function();
    function();
}

To this expected result:

void Function()
{

    int a;

    function();

    a = 1;
    int b = a;

    function();
    function();
}

Also possible, I would accept a solution if it adds a new extra line per assign too

0

There are 0 answers