Search code examples
lambdauncrustify

Fix uncrustify formatting for lambda expression


I would like to homogenize Qt Creator and uncrustify formatting for lambda expression.

Writing the following code with Qt Creator produces the following format:

connect(this, &MyObject::mySignal, [&] {
    qDebug() << "test lambda uncrustify formatting";
});

But when formatting the code with uncrustify I have the following result:

connect(this, &MyObject::mySignal, [&] {
            qDebug() << "test lambda uncrustify formatting";
        });

Is there an uncrustify option that align the code like my Qt Creator example?


Solution

  • I finally managed to fix it with the latest version of uncrustify.