[Gluster-devel] if/else coding style :-)

Niels de Vos ndevos at redhat.com
Tue Oct 14 14:11:29 UTC 2014


On Tue, Oct 14, 2014 at 07:42:54AM -0400, Kaleb KEITHLEY wrote:
> 
> >
> >[~/work/glusterfs]
> >sh$ git grep '} else {' | wc -l
> >     1331
> >[~/work/glusterfs]
> >sh$ git grep 'else {' | grep -v '}' | wc -l
> >      142
> >
> >So going by just numbers, "} else {" is 10x more common than "}\n else
> >{". I also find that believable based on familiarity of seeing this
> >pattern in the code. Either way, good idea to stick to one and not allow
> >both in future code.
> 
> There are also 42 occurences of '} else {' in headers. And one occurence of
> '} else{' and two occurrences of '}else {'.
> 
> Versus one lonely occurence of '}\nelse {' in headers.
> 
> My main objection is that the change was made without any public discussion,
> after having agreed to something different.
> 
> Could we please revert the change to the check-in script?

http://review.gluster.org/8927 has been merged.

Niels


More information about the Gluster-devel mailing list