[JIRA] (JENKINS-61605) Files with SpotBugs warnings are copied to the build folder but files with FindBugs warnings are not found

10 views
Skip to first unread message

me@basilcrow.com (JIRA)

unread,
Mar 20, 2020, 3:37:03 PM3/20/20
to jenkinsc...@googlegroups.com
Basil Crow created an issue
 
Jenkins / Bug JENKINS-61605
Files with SpotBugs warnings are copied to the build folder but files with FindBugs warnings are not found
Issue Type: Bug Bug
Assignee: Ulli Hafner
Components: warnings-ng-plugin
Created: 2020-03-20 19:36
Environment: warnings-ng 8.1.0
analysis-core 1.96
analysis-model-api 8.0.1
Priority: Minor Minor
Reporter: Basil Crow

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.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

me@basilcrow.com (JIRA)

unread,
Mar 20, 2020, 3:40:02 PM3/20/20
to jenkinsc...@googlegroups.com

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 20, 2020, 4:11:02 PM3/20/20
to jenkinsc...@googlegroups.com
Ulli Hafner edited a comment on Bug JENKINS-61605
 
Re: Files with SpotBugs warnings are copied to the build folder but files with FindBugs warnings are not found
Can you create a diff of the two different XML files . ? I doubt that this is a problem in my plugin, as the same parser is used for both warnings. BTW: why are you using using both tools? FIndBugs is end-of-life and has been replaced by SpotBugs.

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 20, 2020, 4:11:02 PM3/20/20
to jenkinsc...@googlegroups.com
Ulli Hafner edited a comment on Bug JENKINS-61605
Can you make create a diff of the two different XML files. I doubt that this is a problem in my plugin, as the same parser is used for both warnings. BTW: why are you using using both tools? FIndBugs is end-of-life and has been replaced by SpotBugs.

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 20, 2020, 4:11:03 PM3/20/20
to jenkinsc...@googlegroups.com

Can you make a diff of the two different XML files. I doubt that this is a problem in my plugin, as the same parser is used for both warnings. BTW: why are you using using both tools? FIndBugs is end-of-life and has been replaced by SpotBugs.

me@basilcrow.com (JIRA)

unread,
Mar 20, 2020, 4:16:02 PM3/20/20
to jenkinsc...@googlegroups.com

Thank you for the quick reply!

Can you create a diff of the two different XML files?

Sorry, I don't have the time to investigate this further at present. But you should be able to easily reproduce the problem following the instructions I listed under "Steps to Reproduce", after which you should be able to compare the two different XML files. Let me know if I can provide any additional context.

BTW: why are you using using both tools? FIndBugs is end-of-life and has been replaced by SpotBugs.

Yes, I am aware that FindBugs is EOL. I used both tools in the example merely to illustrate that the problem is only reproducible when using FindBugs. I am maintaining a Jenkins setup that runs an application build that I don't maintain, and that build still uses FindBugs, so unfortunately I still need to be able to use Jenkins with FindBugs.

Reply all
Reply to author
Forward
0 new messages