+1 sounds reasonable.
On 01/27/2015 03:33 PM, Alena Laskavaia wrote:
Well in this specific example I would say it
should be braces. Because nobody would try to
stop and think - is it safe or not,
it is easier to just add them. Also I Sergey
pointed out it will not increase code length.
And it actually looks nicer too with braces in this
case - if one branch has braces then another one
should too.
So my conclusions from this discussion:
- I can update cdt code guidance to include statement
about usage of braces, I prefer variant, where there is
exception for an if with a single then statement
- This considered recommendation and we won't be fighting
about it on the review. But if reviewer brings it up the
comment should be addressed (with coding style
recommendations on cdt wiki page overriding individual
committer preferences).
- I will update formatter section to recommend usage of 132
chars per line (same for comments). Again recommendation,
only usable in dispute.
- I will add recommendation to use Import Organizer as default
save action with default eclipse setting (from our prev.
discussions)
If you want to add any other recommendations about code style we
can discuss this on this mailing list
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev
|