Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-61605

Files with SpotBugs warnings are copied to the build folder but files with FindBugs warnings are not found

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • warnings-ng-plugin
    • None
    • warnings-ng 8.1.0
      analysis-core 1.96
      analysis-model-api 8.0.1

      Overview

      When using Gradle and the Warnings Next Generation Plugin, files with SpotBugs warnings are copied to the build folder but files with FindBugs warnings are not found.

      Steps to Reproduce

      I have created a minimal reproducible example (MRE) at basil/warnings-ng-reproducer. Run the Jenkinsfile there to reproduce the issue.

      Expected Results

      This is a bare-bones Gradle build with two subprojects: findbugs and spotbugs. Each subproject has a single Java file with warnings. The findbugs subproject has the Gradle FindBugs plugin enabled, while the spotbugs subproject has the Gradle SpotBugs plugin enabled. Gradle detects the same warnings in both subprojects. The expected results are for the Warnings Next Generation Plugin to copy the files with issues in both subprojects to the build folder.

      Actual Results

      When recording issues with the Warnings Next Generation Plugin, the following occurs:

      […]
      [FindBugs] Copying affected files to Jenkins' build folder '/var/jenkins_home/jobs/test/builds/1/files-with-issues'
      [FindBugs] -> 0 copied, 0 not in workspace, 3 not-found, 0 with I/O error
      […]
      [SpotBugs] Copying affected files to Jenkins' build folder '/var/jenkins_home/jobs/test/builds/1/files-with-issues'
      [SpotBugs] -> 1 copied, 0 not in workspace, 0 not-found, 0 with I/O error
      […]
      

      Note that for FindBugs there are "3 not-found" issues, while for SpotBugs there are "0 not-found" issues. In the Jenkins UI, files from the findbugs subproject are not viewable, but files from the spotbugs subproject are. I have attached a screenshot showing this.

            drulli Ulli Hafner
            basil Basil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: