博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
PMD for Eclipse的安装和使用
阅读量:4915 次
发布时间:2019-06-11

本文共 1501 字,大约阅读时间需要 5 分钟。

To install the PMD plugin for Eclipse:

  • Start Eclipse and open a project
  • Select "Help"->"Software Updates"->"Find and Install"
  • Click "Next", then click "New remote site"
  • Enter "PMD" into the Name field and "http://pmd.sf.net/eclipse" into the URL field
  • Click through the rest of the dialog boxes to install the plugin

Alternatively, you can download the latest zip file and follow the above proceduresexcept for using "New local site" and browsing to the downloaded zip file.

To configure PMD, select "Windows"->"Preferences", then select PMD.

To run PMD, right-click on a project node and select "PMD"->"Check code with PMD".

To run the duplicate code detector, right-click on a project node and select "PMD"->"Find suspect cut and paste". The report will be placed in a "reports" directory in a file called "cpd-report.txt".

To find additional help for other features, please read included help by selectingHelp->Help Contents and browse the "How to..." section in the "PMD Plugin Documentation" book.

After installing an update, if you get an Exception such as "java.lang.RuntimeException: Couldn't find that class xxxxx",try deleting the ruleset.xml file in the .metadata/plugins/net.sourceforge.pmd.eclipse directory in your workspace.

To get Eclipse to not flag the @SuppressWarnings("PMD") annotation, look under the menu headings Java -> Compiler -> Errors/Warnings -> Annotations -> Unhandled Warning Token.

转自:http://pmd.sourceforge.net/

转载于:https://www.cnblogs.com/tjuscslirui/p/4519077.html

你可能感兴趣的文章
.net面试题
查看>>
php读取不到https的域名
查看>>
2018-01-11 Antlr4实现数学四则运算
查看>>
centos7上基于kubernetes的docker集群管理
查看>>
【转】七个受用一生的心理寓言
查看>>
nginx
查看>>
自制密码管理系统
查看>>
成功者所应具有的九大素质
查看>>
学习爬虫:《Python网络数据采集》中英文PDF+代码
查看>>
多态、抽象类、接口、区别(java基础知识九)
查看>>
.NET笔试题集(二)
查看>>
原码, 反码, 补码 详解
查看>>
BZOJ4154 : [Ipsc2015]Generating Synergy
查看>>
我的一个小App——谈天气
查看>>
【DevExpress v17.2新功能预告】DevExtreme TreeList
查看>>
Fitnesse框架介绍(一)
查看>>
Codeforces Round #FF (Div. 2) 题解
查看>>
Mysql Programming CS 155P笔记(三)
查看>>
我的感情,仍是如此,卦卦如此
查看>>
这样一套操作要练习多久
查看>>