I want to use PMD 4.2.5 to find duplicates in my C code. I use the example commandline from their documentation:
java net.sourceforge.pmd.cpd.CPD --minimum-tokens 100 --files C:\src --language cpp
this gives me the error:
Can't find the custom format --language: java.lang.ClassNotFoundException
I tried a lot of different other things too, none worked. The GUI version of the PMD works nicely.
What commandline do i have to use to get PMD to detect duplicate code?
On the command line you can pass a category for a given language (here apex) to pmd
You can also combine the categories
The categories available for a language can be found by unpacking the jar file for your language below
...\pmd-bin-7.0.0-rc3\lib
.I could not find any rules for c
pmd-bin-7.0.0-rc3\liblib
to c (see screen)