[Gluster-devel] Clang-Formatter for GlusterFS.
Niels de Vos
ndevos at redhat.com
Thu Sep 13 10:04:27 UTC 2018
On Thu, Sep 13, 2018 at 02:25:22PM +0530, Ravishankar N wrote:
...
> What rules does clang impose on function/argument wrapping and alignment? I
> somehow found the new code wrapping to be random and highly unreadable. An
> example of 'before and after' the clang format patches went in:
> https://paste.fedoraproject.org/paste/dC~aRCzYgliqucGYIzxPrQ Wondering if
> this is just me or is it some problem of spurious clang fixes.
I agree that this example looks pretty ugly. Looking at random changes
to the code where I am most active does not show this awkward
formatting.
However, I was expecting to see enforcing of the
single-line-if-statements like this (and while/for/.. loops):
if (need_to_do_it) {
do_it();
}
instead of
if (need_to_do_it)
do_it();
At least the conversion did not take care of this. But, maybe I'm wrong
as I can not find the discussion in https://bugzilla.redhat.com/1564149
about this. Does someone remember what was decided in the end?
Thanks,
Niels
More information about the Gluster-devel
mailing list