> The formatter tightens up non-block comments, i.e.
>
> if (this == obj)
>   return true;
>
> becomes
>
> if (this == obj) return true;

Yes, correct.

> Which one is clearer is always a matter of debate, but my take is that braces 
> should be added when the _original_ code was on multiple lines, respecting 
> the opinion of the author. So the above would get braces added manually:

Braces won't get added automatically. I've seen this in a number of
places and decided some of them are clear and legible, others maybe
less so. Depends on the context. I'm myself in favor of braces. If you
manually correct the code to have braces, the formatter will respect
this.
But it's your decision - it won't add (or strip) things from the code
automatically. You need to add those braces, where you think they look
better
or add to legibility.

> I don’t particularly have any strong opinion, and I don’t think we need to be 
> draconian about it, just thought that I’d do whatever others are doing.

I corrected this in a few places where I thought this may be
misleading. In many others it's clear what's happening. Like I said -
if you see
the code (after reformatting) that would benefit from braces, add them
and tidy up again. Those braces won't be removed.

Dawid

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to