ITKv4 CPDProposal: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
No edit summary
Line 27: Line 27:
* Modify CPPLanguage.java in order to make CPD work with txx file.
* Modify CPPLanguage.java in order to make CPD work with txx file.
* Debug see http://sourceforge.net/projects/pmd/forums/forum/188192/topic/3778230
* Debug see http://sourceforge.net/projects/pmd/forums/forum/188192/topic/3778230
== Results ==
* minimumtokencount=500 [[File:ITKCodeToken500.xml]]
* minimumtokencount=200 [[File:ITKCodeToken200.xml]]
* minimumtokencount=100 [[File:ITKCodeToken100.xml]]

Revision as of 18:39, 27 July 2010

CPD

What is CPD?

  • CPD aims to detect code duplication.
  • CPD is part of PMD project

http://pmd.sourceforge.net/cpd.html

Download CPD

http://sourceforge.net/projects/pmd/files/

How to use CPD on ITK Code?

  • Currently, CPD only support the following extensions for c++ files ".h", ".c", ".cpp", ".cxx", ".cc", ".C".

Short term solution

  • So you first need to copy all the ITK sources and change the extension of all *.txx files to .cc
  • Then first replace existing /path/to/pmd/bin/cpd.sh by this one

$ cd /path/to/pmd/bin $ ./cpd.sh /path/to/Insight/Code 500

Long term solution

Results