[JIRA] (JENKINS-59426) Spotbugs analyzer reports incorrect priority

16 views
Skip to first unread message

ngochust56@gmail.com (JIRA)

unread,
Sep 18, 2019, 4:49:02 AM9/18/19
to jenkinsc...@googlegroups.com
Ngoc Do Minh created an issue
 
Jenkins / Bug JENKINS-59426
Spotbugs analyzer reports incorrect priority
Issue Type: Bug Bug
Assignee: Ulli Hafner
Attachments: 99.PNG
Components: analysis-model
Created: 2019-09-18 08:48
Environment: Jenkins ver. 2.176.3
Warnings Next Generation Plugin 6.0.4
Spotbugs 3.1.9
Maven
Priority: Minor Minor
Reporter: Ngoc Do Minh

All Spotbugs bug is report as low priority bug but actually it is high priority bug

Attach image is capture from spotbugsXml.xml is show that bug has priority = 1 mean high.

Bellow is my spotbug pom.xml setting

            <plugin>            <plugin>                <groupId>com.github.spotbugs</groupId>                <artifactId>spotbugs-maven-plugin</artifactId>                <version>3.1.9</version>                <configuration>                 <effort>Max</effort>                 <threshold>Low</threshold>                 <failOnError>true</failOnError>                 <plugins>                     <plugin>                         <groupId>com.h3xstream.findsecbugs</groupId>                         <artifactId>findsecbugs-plugin</artifactId>                         <version>LATEST</version> <!-- Auto-update to the latest stable -->                     </plugin> <plugin> <groupId>com.mebigfatguy.sb-contrib</groupId> <artifactId>sb-contrib</artifactId> <version>7.4.6</version> </plugin>                 </plugins>            </configuration>            </plugin>

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

ngochust56@gmail.com (JIRA)

unread,
Sep 18, 2019, 4:54:03 AM9/18/19
to jenkinsc...@googlegroups.com

ngochust56@gmail.com (JIRA)

unread,
Sep 18, 2019, 4:54:05 AM9/18/19
to jenkinsc...@googlegroups.com
Ngoc Do Minh updated an issue
All Spotbugs bug is report as low priority bug but actually it is high priority bug

Attach image is capture from spotbugsXml.xml is show that bug has priority = 1 mean high
.

Bellow is my spotbug pom.xml setting
{quote}             <plugin>            <plugin>                <groupId>com.github.spotbugs</groupId>                <artifactId>spotbugs-maven-plugin</artifactId>                <version>3.1.9</version>                <configuration>                 <effort>Max</effort>                 <threshold>Low</threshold>                 <failOnError>true</failOnError>                 <plugins>                     <plugin>                         <groupId>com.h3xstream.findsecbugs</groupId>                         <artifactId>findsecbugs-plugin</artifactId>                         <version>LATEST</version> <!-- Auto-update to the latest stable -->                     </plugin> <plugin> <groupId>com.mebigfatguy.sb-contrib</groupId> <artifactId>sb-contrib</artifactId> <version>7.4.6</version> </plugin>                 </plugins>            </configuration>            </plugin>
{quote}

ngochust56@gmail.com (JIRA)

unread,
Sep 18, 2019, 4:56:06 AM9/18/19
to jenkinsc...@googlegroups.com
Ngoc Do Minh updated an issue
Change By: Ngoc Do Minh
Priority: Minor Critical

ullrich.hafner@gmail.com (JIRA)

unread,
Sep 18, 2019, 6:12:04 AM9/18/19
to jenkinsc...@googlegroups.com
Ulli Hafner commented on Bug JENKINS-59426
 
Re: Spotbugs analyzer reports incorrect priority

What value are you using for setUseRankAsPriority? The parser maps the rank to the severity if this value is true. You need to set to false if you want to map by priority.

ngochust56@gmail.com (JIRA)

unread,
Sep 18, 2019, 9:02:02 AM9/18/19
to jenkinsc...@googlegroups.com

Ulli Hafner thanks for your comment. Actually, this is the first time i came here, I use jenkins for a while and i just found this weird behaviour today.  Could you include your mention fix in next version or can you give me a way to workaround it? I'm not familiar with jenkins's source code

ullrich.hafner@gmail.com (JIRA)

unread,
Sep 18, 2019, 9:08:05 AM9/18/19
to jenkinsc...@googlegroups.com
Ulli Hafner resolved as Not A Defect
 

There is no fix required. It already works by using a property. How did you configure your job?

Change By: Ulli Hafner
Status: Open Resolved
Resolution: Not A Defect

ngochust56@gmail.com (JIRA)

unread,
Sep 18, 2019, 9:25:02 AM9/18/19
to jenkinsc...@googlegroups.com
Ngoc Do Minh updated an issue
Change By: Ngoc Do Minh
Attachment: Untitled.png

ngochust56@gmail.com (JIRA)

unread,
Sep 18, 2019, 9:37:02 AM9/18/19
to jenkinsc...@googlegroups.com
 
Re: Spotbugs analyzer reports incorrect priority

Ulli Hafner Thanks for your comment. 

I found some similar issue in the past. There is a tool call pipeline, is this is the way to configure UseRankAsPriority properties you are talking about? Something like this?

 

recordIssues {   
    tools {          
        spotBugs { 
            id('bugs')             
            name('SpotBugs Warnungen')             
            pattern('**/spotbugsXml.xml')             
            reportEncoding('UTF-8')             
            useRankAsPriority(true)          
        }         
    }      
}

 

Below is my current configuration.

 

ngochust56@gmail.com (JIRA)

unread,
Sep 18, 2019, 9:46:02 AM9/18/19
to jenkinsc...@googlegroups.com
Ngoc Do Minh edited a comment on Bug JENKINS-59426
[~drulli] Thanks for your comment. 


I found some similar issue in the past. There is a tool call pipeline, is this is the way to configure UseRankAsPriority properties you are talking about? Something like this?

 
{noformat}

recordIssues {  
    tools {         
        spotBugs { 
            id('bugs')             
            name('SpotBugs Warnungen')             
            pattern('**/spotbugsXml.xml')             
            reportEncoding('UTF-8')             
            useRankAsPriority(true)         
        }         
    }     
}{noformat}
 

Below is my current configuration
. , it is a maven job

 

!Untitled.png!

ngochust56@gmail.com (JIRA)

unread,
Sep 18, 2019, 9:52:03 AM9/18/19
to jenkinsc...@googlegroups.com

Ulli Hafner I just saw the "Use rank as severity" checkbox right after i post my previous comment. I will uncheck it and try again. Many thanks

Reply all
Reply to author
Forward
0 new messages