如何自动执行 pmd eclipse 插件?
How to automate pmd eclipse plugin execution?
我刚刚在 eclipse neon 中安装了 PMD 插件,我已经知道如何执行它,但是我有数千个项目需要 PMD 分析,我想知道是否有办法自动执行它(比如使用它的源代码并在我的算法中调用代码的特定部分)。
非常感谢!
eclipse 插件使用PMD 来分析文件。如果你想自动分析那么你想直接使用 PMD,而不是 eclipse 插件。
看看 class PMD。它有静态方法 PMD.doPMD(configuration) which starts the analysis. The same class also contains the main method 以防你想从命令行启动它。
您可以在 eclipse 插件的方法 Analyser.runPMD() 中找到如何调用 PMD.doPMD(配置) 的示例。
我刚刚在 eclipse neon 中安装了 PMD 插件,我已经知道如何执行它,但是我有数千个项目需要 PMD 分析,我想知道是否有办法自动执行它(比如使用它的源代码并在我的算法中调用代码的特定部分)。
非常感谢!
eclipse 插件使用PMD 来分析文件。如果你想自动分析那么你想直接使用 PMD,而不是 eclipse 插件。
看看 class PMD。它有静态方法 PMD.doPMD(configuration) which starts the analysis. The same class also contains the main method 以防你想从命令行启动它。
您可以在 eclipse 插件的方法 Analyser.runPMD() 中找到如何调用 PMD.doPMD(配置) 的示例。