ITK/Code Review Check List: Difference between revisions

From KitwarePublic
< ITK
Jump to navigationJump to search
No edit summary
Line 7: Line 7:
* #define for class name in the .h and .txx files. __classname_h and __classname_txx
* #define for class name in the .h and .txx files. __classname_h and __classname_txx
* Brief class doxygen description
* Brief class doxygen description
* namespace igstk
* namespace itk
* Complete class doxygen description
* Complete class doxygen description
* Constructor/Destructor private/public
* Constructor/Destructor private/public
Line 14: Line 14:
* Justify every public method
* Justify every public method
* All member variables must be private
* All member variables must be private
* Use Set Get Macros
* If deriving from itkObject
** Use New macro
** declare SmartPointer<T> as Pointer
** declare SmartPointer<const T> as ConstPointer
** declare Self
** declare Superclass
** use TypeMacro
** Have PrintSelf() method and print all the member variables
* 100% code coverage (see dashboard)
* 100% code coverage (see dashboard)
* All 'non-const' method must justify why they are not 'const'
* All 'non-const' method must justify why they are not 'const'
* Any information that is printed or displayed has to be legible to human eyes
* Any information that is printed or displayed has to be legible to human eyes
* Respect Coding Style as specified in the document Insight/Documentation/Style.pdf

Revision as of 14:15, 13 December 2006

Code Review Check List

The following is the list of coding style issues that must be verified on every class and file during a code review.

  • Filename must match class name
  • All files must have the Copyright Header at the top.
  • #define for class name in the .h and .txx files. __classname_h and __classname_txx
  • Brief class doxygen description
  • namespace itk
  • Complete class doxygen description
  • Constructor/Destructor private/public
  • No acronyms in class name or method names
  • no unnecessary headers #included
  • Justify every public method
  • All member variables must be private
  • Use Set Get Macros
  • If deriving from itkObject
    • Use New macro
    • declare SmartPointer<T> as Pointer
    • declare SmartPointer<const T> as ConstPointer
    • declare Self
    • declare Superclass
    • use TypeMacro
    • Have PrintSelf() method and print all the member variables
  • 100% code coverage (see dashboard)
  • All 'non-const' method must justify why they are not 'const'
  • Any information that is printed or displayed has to be legible to human eyes
  • Respect Coding Style as specified in the document Insight/Documentation/Style.pdf