[vtk-developers] Indentation style and converting to Doxygen style docs

Bill Lorensen bill.lorensen at gmail.com
Fri Jul 1 15:23:47 EDT 2016


For new code, I will definitely use astyle with these options:
astyle --indent=spaces=2 --style=vtk
If the indentation style changes, I will change the --style to conform

If does a great job with braces and indentation.
I will also use KWStyle to check headers, #ifndef guards, typedef
indentations, extraneous ;'s and more.

I agree with Will, that massive changes just for the sake of changing
indentation, etc. adds little value.
I also agree with D Gobbi's approach to retain the usefulness of git blame.

Bill


On Fri, Jul 1, 2016 at 2:14 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> On Fri, Jul 1, 2016 at 11:44 AM, Will Schroeder <will.schroeder at kitware.com>
> wrote:
>>
>>
>> On Fri, Jul 1, 2016 at 1:32 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>>>
>>> I'm less concerned about strictly following a specific style as long as
>>> each module is internally self-consistent.
>>
>>
>> I understand what you're saying, I agree that some of the religious style
>> arguments are dubious, but if the self-consistent style is a complete and
>> utter mess this is bad :-) VTK has a long, enforced history of a reasonable
>> style and I'd like to preserve this. Simple things like using camel-case,
>> naming variables in verbose fashion, and this-> pointers etc. go a long way
>> towards grokking code quickly IMO.
>
>
> Hi Will, you're correct, I was being too dismissive.  My main worry is that
> automatic re-styling of the VTK code can cause "git blame" to give useless
> results.  Thats why, when I wrote "vtk_reindent_code.py", I made sure that
> it only modifies brace indentation and leaves all other code lines alone.
>
>  - David
>
> _______________________________________________
> 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
>
>



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the vtk-developers mailing list