Giter VIP home page Giter VIP logo

eclipse-pmd's Introduction

eclipse-pmd

The eclipse-pmd plug-in integrates the well-known source code analyzer PMD into the Eclipse IDE.

Everytime you save your work, eclipse-pmd scans your source code and looks for potential problems like possible bugs and suboptimal, duplicate, dead or overly complicated code.

Where possible, eclipse-pmd offers quick fixes that automatically fix the problems. These quick fixes can be used to fix a single problem or all occurrences in your entire code base.

How to get started

You need Eclipse 3.7 or later and Java 7 or later to run eclipse-pmd. Please follow the instructions on how to get started with eclipse-pmd on the website.

How to build and install eclipse-pmd

Building eclipse-pmd is fairly easy. Please note, however, that building eclipse-pmd is not required if you are only interested in using it, since there is a pre-built version available in the Eclipse Marketplace.

Requirements

You need the following tools:

  • JDK 8
  • Maven 3
  • Git

Build instructions

The first thing you need to do is to check out the source code.

git clone https://github.com/acanda/eclipse-pmd.git
cd eclipse-pmd

Once you have the source code you can build it with Maven.

cd ch.acanda.eclipse.pmd
mvn clean verify

This will compile, test and build a local repository for eclipse-pmd. If the build was successful you will find the repository in ch.acanda.eclipse.pmd.repository/target/repository.

Installation

Once you have built the repository you can install eclipse-pmd by adding a new repository to Eclipse:

  • from within Eclipse select Help > Install New Software...
  • click the button Add... of the Install dialog
  • click the button Local... of the Add Repository dialog
  • select the folder ch.acanda.eclipse.pmd.repository/target/repository
  • click the button OK of the Add Repository dialog
  • select Eclipse PMD Plug-in and proceed with the installation

From now on you can simply update Eclipse with Help > Check for Updates after you rebuilt eclipse-pmd.

Testing against different Eclipse releases

Building eclipse-pmd with mvn clean verify compiles and tests it against the oldest supported release of Eclipse which is Eclipse 3.7 Indigo. To ensure eclipse-pmd also works with newer releases the Eclipse release can be set with the parameter eclipse-release.

Compile an test against Eclipse Juno: mvn clean verify -Declipse-release=juno

Compile an test against Eclipse Kepler: mvn clean verify -Declipse-release=kepler

Compile an test against Eclipse Luna: mvn clean verify -Declipse-release=luna

Compile an test against Eclipse Mars: mvn clean verify -Declipse-release=mars

Compile an test against Eclipse Neon: mvn clean verify -Declipse-release=neon

Regardless of the chosen release, the built plug-in will always be the same as the one built without the parameter. So there isn't any advantage in building the plug-in yourself if you are using a newer Eclipse release.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.