[英]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). 我刚刚在eclipse neon中安装了PMD插件,并且我已经知道如何执行它,但是我有成千上万个要由PMD分析的项目,我想知道是否有一种方法可以自动执行它(例如使用其源代码)代码并在我的算法中调用代码的特定部分)。
Thanks a lot! 非常感谢!
The eclipse plugin uses PMD to analyse the files. eclipse插件使用PMD分析文件。 If you want to automate the analysis then you want to use PMD directly, not the eclipse plugin. 如果要自动化分析,则要直接使用PMD,而不要使用eclipse插件。
Take a look at the class PMD. 看一下PMD类。 It has the static method PMD.doPMD(configuration) which starts the analysis. 它具有启动分析的静态方法PMD.doPMD(configuration) 。 The same class also contains the main method in case you want to start it like from the command line. 如果您想从命令行启动它,则同一类还包含main方法 。
You can find an example of how to invoke PMD.doPMD(configuration) in the method Analyser.runPMD() of the eclipse plugin. 你可以找到如何在方法调用PMD.doPMD(配置)为例Analyser.runPMD() Eclipse插件的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.