##### Overview

- Download PMD 4.2.5
- What's new in PMD 4.2.5
- PMD in the news
- PMD-related products and books
- Best practices
- Future directions
- Similar projects
- Credits
- License
- What does 'PMD' mean?

##### Usage

- Installation
- Command line usage
- Ant task usage
- Maven plugin usage
- Mvn plugin usage
- IDE plugin usage
- Suppressing warnings
- Finding duplicated code
- JSP support

##### Customizing PMD

- Compiling PMD
- How to write a rule
- Writing XPath rules
- How to make a rule set
- How it works
- Rule guidelines

##### For example

- Run PMD on a Sourceforge project

##### Rule Sets

- Index
- Android
- Basic
- Braces
- Code Size
- Clone
- Controversial
- Coupling
- Design
- Finalizers
- Import Statements
- J2EE
- Javabeans
- JUnit Tests
- Logging (Java)
- Logging (Jakarta)
- Migrating
- Naming
- Optimizations
- Strict Exceptions
- Strings
- Sun Security
- Unused Code
- Java Server Pages
- Java Server Faces

##### Project Documentation

- About
- Project Info
- Project Reports
- Development Process

##### Legend

- External Link
- Opens in a new window

## Best Practices

### Choose the rules that are right for you

Running every ruleset will result in a huge number of rule violations, most of which will be unimportant. Having to sort through a thousand line report to find the few you're really interested in takes all the fun out of things.

Instead, start with some of the obvious rulesets - just run unusedcode and fix any unused locals and fields. Then, run basic and fix all the empty `if` statements and such-like. Then peruse the design and controversial rulesets and use the ones you like via a custom ruleset.

### PMD rules are not set in stone

Generally, pick the ones you like, and ignore or suppress the warnings you don't like. It's just a tool.

### PMD IDE plugins are nice

Using PMD within your IDE is much more enjoyable than flipping back and forth between an HTML report and your IDE. Most IDE plugins have the "click on the rule violation and jump to that line of code" feature. Find the PMD plugin for your IDE, install it, and soon you'll be fixing problems much faster.

Suggestions? Comments? Post them here. Thanks!