Details

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

      Description

      Findbugs 2 has a feature that allows to specify a baseline bug report so only NEW issues found are reported.

      From edu.umd.cs.findbugs.FindBugs2.java:

      ...
          protected void configureFilters(UserPreferences userPreferences) {
              Set<Entry<String, Boolean>> excludeBugFiles = userPreferences.getExcludeBugsFiles().entrySet();
              for (Entry<String, Boolean> entry : excludeBugFiles) {
                  if (entry.getValue() == null || !entry.getValue()) {
                      continue;
                  }
                  try {
                      excludeBaselineBugs(entry.getKey());
                  } catch (Exception e) {
                      String message = "Unable to read filter: " + entry.getKey() + " : " + e.getMessage();
                      if (getBugReporter() != null) {
                          getBugReporter().logError(message, e);
                      } else {
                          throw new IllegalArgumentException(message, e);
                      }
                  }
              }
              ...
      

      After looking through the FindBugsMojo.groovy, I noticed there's no way to pass a list of XML files when executing FindBugs.

      I'd love to see support for this Baseline feature added to this plugin.

        Activity

        Hide
        Alejandro Rivera added a comment -

        Patch that adds the new functionality.

        Show
        Alejandro Rivera added a comment - Patch that adds the new functionality.
        Hide
        Alejandro Rivera added a comment -

        Just noticed the patch contains changes to the import section. Sorry, my IDE did that by default and didn't catch it before creating and uploading it. Pls don't apply that section of the patch if you don't want to.

        Show
        Alejandro Rivera added a comment - Just noticed the patch contains changes to the import section. Sorry, my IDE did that by default and didn't catch it before creating and uploading it. Pls don't apply that section of the patch if you don't want to.
        Hide
        Alejandro Rivera added a comment -

        Patch without changes to the import section.

        Show
        Alejandro Rivera added a comment - Patch without changes to the import section.
        Hide
        Garvin LeClaire added a comment -

        Just creating test to go with it.

        Show
        Garvin LeClaire added a comment - Just creating test to go with it.

          People

          • Assignee:
            Garvin LeClaire
            Reporter:
            Alejandro Rivera
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: