How to execute CPD? #3036
-
any cpd demos? I want to run cpd in my plugin project . Tks!! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hello, CLI usage is explained there https://pmd.github.io/pmd-6.6.0/pmd_userdocs_installation.html#running-cpd-via-command-line Don't forget to set the https://pmd.github.io/pmd-6.6.0/pmd_userdocs_cpd.html If you'd like to integrate it in a maven build, see https://pmd.github.io/pmd-6.6.0/pmd_userdocs_tools_maven.html#integrated-into-the-build-process which mentions using |
Beta Was this translation helpful? Give feedback.
-
I means use the CPD API to run ,my project has add the jar files! |
Beta Was this translation helpful? Give feedback.
-
@T-chuangxin if you want to run CPD programatically, I suggest you have a look at how PMD does it itself |
Beta Was this translation helpful? Give feedback.
-
@jsotuyod Aha, thank you for your reply, the function has been made! Here is the code: val project = e.project ?: return |
Beta Was this translation helpful? Give feedback.
@T-chuangxin if you want to run CPD programatically, I suggest you have a look at how PMD does it itself
https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/cpd/CPDCommandLineInterface.java#L59