Class PmdChecker

All Implemented Interfaces:
Generator, Renamable, ResourceProvider

public class PmdChecker extends AbstractGenerator

A Generator that runs PMD on the project's Java sources.

The PMD ruleset configuration is loaded from a file named pmd.xml. First, the project's directory is searched. If not found, the search continues in the parent project's directory and so on, up to the root project. The configuration path can also be set explicitly with config(java.nio.file.Path).

Each rule violation is printed to [context().error()]. The resulting PmdResult contains summary counts and is never flagged as faulty.

This provider is made available as an extension. org.jdrupes:jdbld-ext-checkstyle:

  • Constructor Details

    • PmdChecker

      public PmdChecker(Project project)
      Initializes a new PMD checker.
      Parameters:
      project - the project
  • Method Details