[vtk-developers] PROPOSAL: Changing VTK's indentation style
Berk Geveci
berk.geveci at kitware.com
Wed Sep 9 15:57:17 EDT 2015
+1 to Brad's suggestion,
On Wed, Sep 9, 2015 at 3:41 PM, Brad King <brad.king at kitware.com> wrote:
> On 9/9/2015 9:53 AM, Shawn Waldon wrote:
> > It would be nice to have a format that doesn't require twiddling
> > with the editor(s) so much.
>
> Yes.
>
> > Having said that, I prefer that we do what
> > Brad suggested and use clang-format.
>
> After further thought I think we should delay consideration of
> clang-format. Let's not allow it to get in the way of Berk's
> original proposal. It has a lot of +1s.
>
> On 9/9/2015 9:22 AM, David Lonie wrote:
> > if (...) {
> > ...
> > }
> > else {
> > ...
> > }
> [snip]
> On 9/9/2015 9:43 AM, Ben Boeckel wrote:
> > I've preferred using "} else {"
>
> I also like
>
> if (...) {
> ...
> } else {
> ...
> }
>
> and it seems to be widely used. The placement of the opening
> curly on the block opening line or on its own line does not
> affect the indentation of the code inside the curly braces,
> so this choice can be made locally rather than mandated
> globally.
>
> --------------------------------------------------------------------
>
> I propose that we start with a sweeping change implementing
> Berk's original proposal of just moving the curly braces up
> one level of indentation:
>
> if (...)
> {
> ...
> }
> else
> {
> ...
> }
>
> Then in future edits and/or new code we can allow the opening
> "{" to be either on its own line or on the block opening line as
> preferred by individuals. Changes to curly brace placement can
> be made incrementally as code is edited to avoid blame poisoning.
>
> -Brad
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150909/001f83b5/attachment.html>
More information about the vtk-developers
mailing list