简体   繁体   English

使用Eclipse Kepler的PMD

[英]PMD with Eclipse Kepler

I installed the pmd-eclipse (v0.9) and was having jre6 on my machine. 我安装了pmd-eclipse(v0.9),并且在我的机器上安装了jre6。 Read about that PMD doesn't support jre6 or lower so installed the jre7 and then set the Jre on Eclipse to the same. 了解有关PMD不支持jre6或更低版本的信息,因此请安装jre7,然后将Eclipse上的Jre设置为相同。 At the project level did the PMD enable for this project check-box. 在项目级别,PMD启用了此项目复选框。 But after that for each class the PMD option is not appearing. 但是在那之后,对于每个类,PMD选项不会出现。 Please assist. 请协助。

You only have to enable PMD in the project properties. 您只需要在项目属性中启用PMD。 There is no PMD option for each class. 每个课程没有PMD选项。

It sounds like you didn't add a PMD rule set file. 听起来您没有添加PMD规则集文件。 If you don't already have a PMD rule set file then you have to create one first. 如果您还没有PMD规则集文件,则必须先创建一个 You can add a PMD rule set file by clicking the "Add..." button on the PMD property page of your project's properties dialog. 您可以通过单击项目属性对话框的PMD属性页上的“添加...”按钮来添加PMD规则集文件。 If your PMD property page looks something like the following then eclipse-pmd will analyze all classes in the project. 如果您的PMD属性页如下所示,则eclipse-pmd将分析项目中的所有类。

带有规则集的eclipse-pmd属性页

The eclipse-pmd website also provides step-by-step instructions on how to set up eclipse-pmd correctly. eclipse-pmd网站还提供有关如何正确设置eclipse-pmd的分步说明。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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