The installation and use of PMD plug-ins

Source: Internet
Author: User

The PMD plugin installation address is: Http://pmd.sourceforge.net/eclipse

After the PMD plug-in is installed, it consists of 2 parts: CPD and PMD.

CPD is used to check for repetitive code (for example, by copying and pasting the resulting code)

Use it very simply, right click on your item, select Find suspect cut and Paste:

Then select the language and output format (I strongly recommend using XML format because it is more readable)

Then you can see the CPD report, and you can switch to the CPD view:

Of course, you can also go to your project to see, you will find that the project under a more than a directory called "reports", you open, you can find the "cpd-" prefix to the file, which is CPD check the duplicate code after the report file, the extension depends on the type of report you specified in the previous step:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.