[Gluster-infra] [Bug 1564149] Agree upon a coding standard, and automate check for this in smoke
bugzilla at redhat.com
bugzilla at redhat.com
Tue Apr 17 21:02:47 UTC 2018
https://bugzilla.redhat.com/show_bug.cgi?id=1564149
--- Comment #12 from Xavi Hernandez <jahernan at redhat.com> ---
Using Chromium as base, basically the changes you propose seem ok. I would like
to propose these additional changes:
* I prefer to use 4 spaces for indent. 2 seems too few to me.
* IndentCaseLabels = true. If we use 4 spaces for indent, we could consider
indenting case labels to make them more readable and similar to other code
blocks enclosed between braces.
* SpaceBeforeParens = ControlStatements. I think the additional space before
parens on function calls doesn't provide any advantage (in fact none of the
default configurations uses it).
* BinPackParameters = true.
* AlwaysBreakAfterReturnType = true. I think that separating return type from
function name is useful in some places that use long function names or argument
types.
* AlignEscapedNewLinesLeft=false. Otherwise it fills files with a lot of
unnecessary spaces.
* AlignConsecutiveDeclarations=true. Using this option has the side effect that
pointers are not correctly aligned as we currently do. Pointers will be
rendered like this:
int32_t var1 = 1;
void * var2 = NULL;
* AlignConsecutiveAssignments=true.
I'm not sure if the last two options provide any interesting advantage. So, if
the pointer alignment is more important, we can disable them.
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=NWRhQJ1EHB&a=cc_unsubscribe
More information about the Gluster-infra
mailing list