[Insight-developers] Style Header for ITKv4
Bill Lorensen
bill.lorensen at gmail.com
Tue Aug 10 11:13:11 EDT 2010
I prefer the F be aligned with the B&D.
On Tue, Aug 10, 2010 at 10:09 AM, Brad Davis <brad.davis at kitware.com> wrote:
> Here is a progress report:
>
> The old indentation check contained some heuristics that made it fail
> in certain places. The new check does not use these heuristics (but
> it is new and has some bugs to work out). I have also successfully
> run it in minutes on large files that took hours to run using the old
> checker. I am actually running it on ITK code now to evaluate it (but
> I'm not making changes to the ITK code, yet). I am down to a few
> corner cases like the following one that require some sort of group
> decision. I will elaborate on the others as they come up.
>
> It is ITK custom to align typedefs. In places we have:
>
> typedef A B;
> typedef C D;
> typedef EEEEEEEEE
> F;
>
> If this is a mess in your email then the idea is that "F" is on a new
> line but it is aligned with "B" and "D" rather than by two spaces.
>
> The new indentation checker flags this as an error. Is this quirky
> alignment really what we want or should it be a normal indent for a
> continued line like this?
>
> typedef A B
> typedef C D
> typedef EEEEEEEEE
> F
>
> We could say both alignments are acceptable.
>
> Hans,
>
> What does uncrustify do in this case?
>
> Best,
> Brad
>
> On Thu, Aug 5, 2010 at 10:32 AM, Hans Johnson <hans-johnson at uiowa.edu> wrote:
>> Brad,
>>
>> I am in contact with Brad Davis, and he is updating the KWStyle tool to
>> support a more consistent style (and less ambiguous) style.
>>
>> We are hoping that the necessary changes can be completed by next week. The
>> uncrustify solution is not possible until KWStyle can properly report on
>> indentation in a consistent manner. Once this is done, an uncrustify
>> procedure will be available to automatically produce KWStyle compliant code
>> formatting with out user intervention.
>>
>> Regards,
>>
>> Hans
>>
>>
>>
>> On 8/5/10 9:21 AM, "Bradley Lowekamp" <blowekamp at mail.nih.gov> wrote:
>>
>> It looks like KWStyle is failing for all files now due a related header
>> issue:
>>
>> Processing
>> /nfs/mead/Users/blowek1/src/ITK/Code/Review/itkLabelContourImageFilter.txx
>> 1: Error #13 (0) Header mismatch: itkLabelContourImageFilter.txx
>> (ITKHeader.h) :
>> /nfs/mead/Users/blowek1/src/ITK/Utilities/KWStyle/ITKHeader.h
>>
>> I am not familiar enough with KWStyle to know if there is a quick fix for
>> this with the current... (actually I don't know if I am running the current
>> as I can't seem to get the version for the executable ) version.
>>
>> Just trying to prevent unstyled code from getting in...
>>
>> I suppose with Hans' plan to just uncrustify the code it should not be a
>> significant issue if it does.
>>
>> Brad
>>
>> On Jul 29, 2010, at 1:28 PM, Karthik Krishnan wrote:
>>
>> Yup. VTK has done away with those keyword substitutions. Its header looks
>> like this...
>>
>> /*=========================================================================
>>
>> Program: Visualization Toolkit
>> Module: vtkObject.h
>>
>> Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
>> All rights reserved.
>> See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
>>
>> This software is distributed WITHOUT ANY WARRANTY; without even
>> the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
>> PURPOSE. See the above copyright notice for more information.
>>
>> =========================================================================*/
>>
>> I am guessing ITK will follow suit..
>>
>> --
>> karthik
>>
>>
>> On Thu, Jul 29, 2010 at 8:55 PM, Hans Johnson <hans-johnson at uiowa.edu>
>> wrote:
>>
>> I would vote to remove those. They seem redundant with the information that
>> is available from git, and they make using external diff tools tedious to
>> work with.
>>
>> Hans
>>
>> On 7/29/10 10:11 AM, "Mathieu Malaterre" <mathieu.malaterre at gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> Quick question: are we keeping the same header after moving to git ?
>>>
>>> Module: $RCSfile: itkImageIOBase.h,v $
>>> Date: $Date: 2009-11-29 15:51:11 $
>>> Version: $Revision: 1.56 $
>>>
>>> Does those keywords still apply to git world ?
>>>
>>> Thanks,
>>
>> --
>> Hans J. Johnson, Ph.D.
>> Assistant Professor
>> 200 Hawkins Drive
>> T205 BT, The University of Iowa
>> Iowa City, IA 52242
>>
>> hans-johnson at uiowa.edu
>> PHONE: 319 353 8587
>>
>> _______________________________________________
>> Powered by www.kitware.com <http://www.kitware.com/>
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-developers
>>
>> <ATT00001..txt>
>>
>> ========================================================
>>
>> Bradley Lowekamp
>>
>> Lockheed Martin Contractor for
>>
>> Office of High Performance Computing and Communications
>>
>> National Library of Medicine
>>
>> blowekamp at mail.nih.gov
>>
>>
>>
>> ________________________________
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-developers
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-developers
>>
>>
>
>
>
> --
> Brad Davis, Ph.D.
> Technical Lead
> Kitware, Inc.
>
> Office: 919-969-6990x302
> Mobile: 919-265-3301
> Fax: 518-371-4573
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>
More information about the Insight-developers
mailing list