[Parted-edge] [PATCH] Create the needed infra-structure to enforce the coding style
Otavio Salvador
otavio at debian.org
Mon Oct 22 18:45:17 UTC 2007
Anant Narayanan <anant at kix.in> writes:
> Hi all,
>
> Just to a get a feel of what the code looks like in both the styles,
> I've created two git repositories:
>
> http://git.debian.org/?p=users/anant-guest/parted-bindings-alternate.git;a=summary
Personally I prefer this one.
I think it's too hard to read:
if (a)
{
// things
}
It looks strange to me.
I've some comments about the style on the alternate style:
- namespace still not indented. I personally prefer to have it
indented
http://git.debian.org/?p=users/anant-guest/parted-bindings-alternate.git;a=blob;f=src/alignment.h;h=749233fce6fc0358d45ff74eee519346603d90ee;hb=454d9d42bdbf71d4d7bc8a6acf7f7684e5b66d74
line 6, 7, 8, 9
- spaces inside ( ) and before
http://git.debian.org/?p=users/anant-guest/parted-bindings-alternate.git;a=blob;f=src/alignment.cc;h=5593a66cfe883c84e9a14ae872f7b8bc5d390831
line 28, ..., 72, ...
Since we try to use small code lines, using spaces for it, looks
like a spacing wasting to me.
- I prefer to not use blocks when using single line commands
http://git.debian.org/?p=users/anant-guest/parted-bindings-alternate.git;a=blob;f=src/constraint.cc;h=e3658dc73b5926a810de89bb0c15ec25f5184721;hb=HEAD
line 126
As we've talked at IRC, it's personaly preference and I think the
official style should looks like _most_ of active people on parted
like to read code. Not a single person perference.
I think that other ought to contribute to this thread too.
--
O T A V I O S A L V A D O R
---------------------------------------------
E-mail: otavio at debian.org UIN: 5906116
GNU/Linux User: 239058 GPG ID: 49A5F855
Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
you the whole house."
More information about the Parted-edge
mailing list