##### Overview

- Download PMD 5.0.4
- What's new in PMD 5.0.4
- 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
- PMD developers information
- PMD Release Process

##### For example

- Run PMD on a Sourceforge project

##### Misc.

- XPath tutorial (Gregorian)

##### Rule Sets

- ecmascript
  - Basic Ecmascript
  - Braces
  - Unnecessary
- java
  - Android
  - Basic
  - Braces
  - Clone Implementation
  - Code Size
  - Comments
  - Controversial
  - Coupling
  - Design
  - Empty Code
  - Finalizer
  - Import Statements
  - J2EE
  - JavaBeans
  - JUnit
  - Jakarta Commons Logging
  - Java Logging
  - Migration
  - Naming
  - Optimization
  - Strict Exceptions
  - String and StringBuffer
  - Security Code Guidelines
  - Type Resolution
  - Unnecessary
  - Unused Code
- jsp
  - Basic JSF
  - Basic JSP
- xml
  - Basic XML
- xsl
  - XPath in XSL

##### Project Documentation

- Project Information
- Project Reports

## Comments

Rules intended to catch errors related to code comments

### CommentRequired

Since: PMD 5.0

Denotes whether comments are required (or unwanted) for specific language elements.

This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.comments.CommentRequiredRule

Example(s):

    /**
    *
    *
    * @author George Bush
    */

This rule has the following properties:

Name | Default Value | Description
violationSuppressRegex |  | Suppress violations with messages matching a regular expression
violationSuppressXPath |  | Suppress violations on nodes which match a given relative XPath expression.
protectedMethodCommentRequirement | Required | Protected method comments
publicMethodCommentRequirement | Required | Public method comments
fieldCommentRequirement | Required | Field comments
headerCommentRequirement | Required | Header comments

### CommentSize

Since: PMD 5.0

Determines whether the dimensions of non-header comments found are within the specified limits.

This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.comments.CommentSizeRule

Example(s):

    /**
    *
    *	too many lines!
    *
    *
    *
    *
    *
    *
    *
    *
    *
    *
    *
    *
    */

This rule has the following properties:

Name | Default Value | Description
violationSuppressRegex |  | Suppress violations with messages matching a regular expression
violationSuppressXPath |  | Suppress violations on nodes which match a given relative XPath expression.
maxLines | 6 | Maximum lines
maxLineLength | 80 | Maximum line length

### CommentContent

Since: PMD 5.0

A rule for the politically correct... we don't want to offend anyone.

This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.comments.CommentContentRule

Example(s):

    //	OMG, this is horrible, Bob is an idiot !!!

This rule has the following properties:

Name | Default Value | Description
violationSuppressRegex |  | Suppress violations with messages matching a regular expression
violationSuppressXPath |  | Suppress violations on nodes which match a given relative XPath expression.
disallowedTerms | [idiot, jerk] | Illegal terms or phrases
caseSensitive | false | Case sensitive
wordsAreRegex | false | Use regular expressions