Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-beta-1
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      1

      Description

      This adds the ability for the user to configure multiple rulesets with PMD as follows:

      <reporting>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-pmd-plugin</artifactId>
      <configuration>
      <rulesets>
      <ruleset>controversial</ruleset>
      <ruleset>design</ruleset>
      </rulesets>
      </configuration>
      </plugin>
      </plugins>
      </reporting>

      It is assumed that the ruleset can be found in classpath:/rulesets/<name>.xml. This is the convention PMD uses and the user can add their own rulesets in a JAR and run them with the same configuration as long as they have a unique name.

        Activity

        Hide
        Mike Perham added a comment -

        processViolations() needs to have this added as its final line:

        violations.clear();

        Show
        Mike Perham added a comment - processViolations() needs to have this added as its final line: violations.clear();
        Hide
        Mike Perham added a comment -

        Applied my own patch.

        Show
        Mike Perham added a comment - Applied my own patch.
        Hide
        John Allen added a comment -

        Mike, thanks for your work on this, just a shame ive been working on it too without realising these MPMD ones were active. I would like to make one suggestion though, namely the comments i tacked onto MPMD-4 and MPMD-8 that we support a more flexible ruleset resource location mechanism such as that used by checkstyle rather than the symbolic binding youve gone for here.

        Show
        John Allen added a comment - Mike, thanks for your work on this, just a shame ive been working on it too without realising these MPMD ones were active. I would like to make one suggestion though, namely the comments i tacked onto MPMD-4 and MPMD-8 that we support a more flexible ruleset resource location mechanism such as that used by checkstyle rather than the symbolic binding youve gone for here.

          People

          • Assignee:
            Unassigned
            Reporter:
            Mike Perham
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: