简体   繁体   中英

How to automate pmd eclipse plugin execution?

I've just installed PMD plugin in eclipse neon and I already know how to execute it, but I have thousands of projects to be analyzed by PMD and I would like to know if there is a way to automate its execution (like using its source code and calling the specific parts of the code inside my algorithm).

Thanks a lot!

The eclipse plugin uses PMD to analyse the files. If you want to automate the analysis then you want to use PMD directly, not the eclipse plugin.

Take a look at the class PMD. It has the static method PMD.doPMD(configuration) which starts the analysis. The same class also contains the main method in case you want to start it like from the command line.

You can find an example of how to invoke PMD.doPMD(configuration) in the method Analyser.runPMD() of the eclipse plugin.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM