[Development] Suggesting update brace placement following a multi-line if condition
Marc Mutz
marc.mutz at qt.io
Thu Jul 16 13:55:34 CEST 2026
On 16.07.26 13:27, Shawn Rutledge via Development wrote:
Let’s not split the cases for brace alignment.
We already do:
if (x) {
but
void fun(T x)
{
Your suggestions to indent the if condition more just makes the problem authors of multi-line if conditions already have even worse, because lines become even longer.
This is also not about having a matcher or not. A braces matcher will not tell you where in
if (x~~~~~100
y~~~~~100
z~~~~~100
the if condition ends and the body of the then clause starts, but this does:
if (x~~~~~100
y~~~~~100
{
z~~~~~100
Besides, Gerrit doesn't have a brace matcher.
Thanks,
Marc
--
Marc Mutz <marc.mutz at qt.io><mailto:marc.mutz at qt.io> (he/his)
Principal Software Engineer
The Qt Company
Erich-Thilo-Str. 10 12489
Berlin, Germany
www.qt.io<http://www.qt.io>
Geschäftsführer: Mika Pälsi, Juha Varelius, Juha Puputti
Sitz der Gesellschaft: Berlin,
Registergericht: Amtsgericht Charlottenburg,
HRB 144331 B
Public
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20260716/cbcb06d5/attachment-0001.htm>
More information about the Development
mailing list