ITKv4 CPDProposal: Difference between revisions
From KitwarePublic
Jump to navigationJump to search
Arnaudgelas (talk | contribs) (Created page with 'CPD aims to detect code duplication.') |
Arnaudgelas (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
CPD aims to detect code duplication. | = 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 === | |||
* Modify CPPLanguage.java in order to make CPD work with txx file. | |||
* Debug see http://sourceforge.net/projects/pmd/forums/forum/188192/topic/3778230 |
Revision as of 18:36, 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
- Modify CPPLanguage.java in order to make CPD work with txx file.
- Debug see http://sourceforge.net/projects/pmd/forums/forum/188192/topic/3778230