Eclipse-java Code specification and quality check plugin-PMD

Source: Internet
Author: User

PMD is a source code parser. It finds common programming flaws, such as unused variables, empty catch blocks, unnecessary object creation, and so on. It supports Java, JavaScript, Salesforce.com Apex, Plsql, Apache Velocity, XML, XSL, and more.

In addition, it includes CPD (copy-paste-detector, copy-paste detector). CPD in Java, C, C + +, C #, Groovy, PHP, Ruby, Fortran, JavaScript, Plsql, Apache Velocity, Scala, Objective C, Matlab, Python, Go, Duplicate code can be found in Swift and Salesforce.com Apex.

This article describes how to install and use the PMD plugin in Eclipse.

Installation

There are several ways to install Eclipse Checkstyle Plugin.

1. Via Update site

In Eclipse (Help, Install New software ...)

Input: https://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/

Select to download the PMD Eclipse plugin.

2, through the offline plug-in package

Official: Https://github.com/pmd/pmd-eclipse-plugin/releases

Offline Version: ()

Project Settings

Setting PMD on Windows->preferences

Use

Right-click the project and select Pmd->check code with PMD.

To run a duplicate code detector, right-click the project node and select Pmd->find suspect cut and paste. The report will be placed in a file named Cpd-report.txt under the reports directory.

Reference:

https://waylau.com/use-pmd-for-eclipse/(the above content is transferred from this article)

Eclipse-java Code specification and quality check plugin-PMD

Related Article

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.