Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Importing rules for PMD Eclipse

Tags:

eclipse

pmd

I'm installing Eclipse Juno for Java Developers for a class, and we've been asked to install the PMD plugin. We have our own xml file with the rules and we have to replace the default rules for the plugin. When I browse and select the file, the import tool doesn't allow me to press 'ok'.

Any suggestions? I'm pretty new to this stuff.

like image 277
user2425896 Avatar asked May 27 '13 17:05

user2425896


People also ask

How do I install a PMD file?

Installation ✏️️ PMD is distributed as a zip archive, which includes both PMD and CPD. You can download the latest binary distribution from the github releases page. Unzip it into any directory, optionally add the bin subdirectory in your PATH , and you're good to go!

What is PMD in eclipse?

PMD is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks, unnecessary object creation, and so forth. It supports Java, JavaScript, Salesforce.com A... Source Code Analyzer. Last Updated on Friday, October 7, 2022 - 09:57 by Andreas Dangel.


2 Answers

It's a problem with the plugin 4, try with 3. Import your rules and you can after that do an update to 4.

like image 75
ben rhouma moez Avatar answered Oct 10 '22 12:10

ben rhouma moez


You have to set it in the Eclipse configuration of PMD: Window -> Preferences -> PMD -> Rules Configuration -> Import Rules Set

Before you can do this the PMD plug-in itself must be installed: Help -> Eclipse Marketplace... -> Search for PMD, install it and restart eclipse.

like image 41
Kai Avatar answered Oct 10 '22 11:10

Kai