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

Native Analysis Model Format specifies "lineRanges" but does not use them.

      The documentation of the native format specifies an example here: https://github.com/jenkinsci/warnings-ng-plugin/blob/master/plugin/src/test/resources/io/jenkins/plugins/analysis/warnings/steps/issues.json

      When you actually feed the example into Jenkins, all entries below "lineRanges" are ignored and not used.

      ...
      "fileName": "test-file.txt",            
      "lineRanges": [                
        {                    
          "start": 110,                    
          "end": 111                
        },                
        {
          "start": 120,                    
          "end": 121                
        }            
      ],
      ...


      "lineStart" and "lineEnd" are accepted.

      ...
      "fileName": "test.xml",            
      "severity": "ERROR",            
      "lineStart": 110,            
      "lineEnd": 111,            
      "columnStart": 210,            
      "columnEnd": 220,            
      "message": "some message",            
      "description": "some description" 
      ...

       

          [JENKINS-70498] Native Analysis Model Format specifies "lineRanges" but does not use them.

          HSM created issue -

          Ulli Hafner added a comment -

          This seems to be a bug in JsonParser.

          Ulli Hafner added a comment - This seems to be a bug in JsonParser .
          Ulli Hafner made changes -
          Component/s New: analysis-model [ 23523 ]
          Component/s Original: warnings-ng-plugin [ 24526 ]
          Assignee Original: Ulli Hafner [ drulli ]
          Labels New: help-wanted newbie-friendly
          Shreya made changes -
          Assignee New: Shreya [ yashre_bh ]

          Kris Stern added a comment -

          Thanks yashre_bh for taking on the issue! 

          Kris Stern added a comment - Thanks yashre_bh for taking on the issue! 

          Shreya added a comment -

          krisstern Current update: working on setting up the development environment as specified in the README here

          Shreya added a comment - krisstern Current update: working on setting up the development environment as specified in the README here

          Ulli Hafner added a comment -

          If you just want to fix that bug without seeing it in Jenkins it would be sufficient to clone https://github.com/jenkinsci/analysis-model and import that project in IntelliJ.

          Ulli Hafner added a comment - If you just want to fix that bug without seeing it in Jenkins it would be sufficient to clone https://github.com/jenkinsci/analysis-model and import that project in IntelliJ.

          Ulli Hafner added a comment - - edited

          Here are some steps on how to start:

          • The class JsonParserTest already has a test case. This test needs to be fixed so that it checks for each issue (i.e. report.get(x)) that the lineStart and lineEnd property will be correctly set to the first element of the values in the line ranges array. After that change, this test should fail.
          • The corresponding class JsonBaseParser should set the line start and end values after reading the line ranges

          Ulli Hafner added a comment - - edited Here are some steps on how to start: The class JsonParserTest already has a test case. This test needs to be fixed so that it checks for each issue (i.e. report.get(x) ) that the lineStart and lineEnd property will be correctly set to the first element of the values in the line ranges array. After that change, this test should fail. The corresponding class JsonBaseParser should set the line start and end values after reading the line ranges

          Shreya added a comment -

          Right! will get to it, thank you for the lead drulli 

          Shreya added a comment - Right! will get to it, thank you for the lead drulli  

          Shreya added a comment - - edited

          drulli for cloning and setting up https://github.com/jenkinsci/analysis-model on IntelliJ, I won't need to setup https://github.com/jenkinsci/warnings-ng-plugin-devenv
           ?
          the analysis model also points to the same development instructions https://github.com/jenkinsci/analysis-model/blob/master/CONTRIBUTING.md#:~:text=Development%20environment%20for%20Jenkins%27%20Warnings%20Next%20Generation%20Plugin

          Because the installation is taking way too long :')

          Shreya added a comment - - edited drulli for cloning and setting up https://github.com/jenkinsci/analysis-model on IntelliJ, I won't need to setup https://github.com/jenkinsci/warnings-ng-plugin-devenv  ? the analysis model also points to the same development instructions https://github.com/jenkinsci/analysis-model/blob/master/CONTRIBUTING.md#:~:text=Development%20environment%20for%20Jenkins%27%20Warnings%20Next%20Generation%20Plugin Because the installation is taking way too long :')

            yashre_bh Shreya
            hsm_ci HSM
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: