• Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Critical Critical
    • analysis-model
    • None
    • Jenkins ver. 2.176.3
      Warnings Next Generation Plugin 6.0.4
      Spotbugs 3.1.9
      Maven

      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

       

        1. 100.PNG
          100.PNG
          77 kB
        2. 99.PNG
          99.PNG
          116 kB
        3. Untitled.png
          Untitled.png
          209 kB

          [JENKINS-59426] Spotbugs analyzer reports incorrect priority

          Ulli Hafner added a comment -

          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.

          Ulli Hafner added a comment - 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.

          Ngoc Do Minh added a comment -

          drulli 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

          Ngoc Do Minh added a comment - drulli 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

          Ulli Hafner added a comment -

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

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

          Ngoc Do Minh added a comment - - edited

          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?

           

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

           

          Below is my current configuration, it is a maven job

           

          Ngoc Do Minh added a comment - - edited 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?   recordIssues {   tools {          spotBugs {  id('bugs')              name('SpotBugs Warnungen')              pattern('**/spotbugsXml.xml')              reportEncoding('UTF-8')              useRankAsPriority(true)          }          }      }   Below is my current configuration, it is a maven job  

          Ngoc Do Minh added a comment -

          drulli 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

          Ngoc Do Minh added a comment - drulli 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

            drulli Ulli Hafner
            robot9xvt Ngoc Do Minh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: