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

Provide generic issue parser for custom tools

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      5.0.0 (analysis-model and warnings-ng)

      Description

      I have a handful of custom tools to generate custom reports on my code base and/or the compiled results. Right now I am abusing the output format of PMD to get close to the output I want. However, it would be nice if I could generate a file that mapped directly to the fields used by the plugin.

      This might also be useful for people who do not have admin access to write groovy parsers. They could do some local analysis, then generate this file format.

      Current Serialization of an Issue instance using XStream:

      <?xml version="1.1" encoding="UTF-8"?>
      <issue>
        <category>category</category>
        <type>type</type>
        <severity>HIGH</severity>
        <message>message</message>
        <lineStart>1</lineStart>
        <lineEnd>2</lineEnd>
        <columnStart>3</columnStart>
        <columnEnd>4</columnEnd>
        <lineRanges>
          <lineRange>
            <start>5</start>
            <end>6</end>
          </lineRange>
        </lineRanges>
        <id>63d61b1f-0cac-4e31-8bb9-f390ed1acfe8</id>
        <description>description</description>
        <reference>reference</reference>
        <origin>origin</origin>
        <moduleName>module-name</moduleName>
        <packageName>package-name</packageName>
        <fileName>file-name</fileName>
        <fingerprint>fingerprint</fingerprint>
      </issue>
      

       
      Current Serialization of a Report instance using XStream:

      <?xml version="1.1" encoding="UTF-8"?>
      <analysisReport>
        <elements class="linked-hash-set">
          <issue>
            <category>category</category>
            <type>type</type>
            <severity>HIGH</severity>
            <message>1</message>
            <lineStart>1</lineStart>
            <lineEnd>2</lineEnd>
            <columnStart>3</columnStart>
            <columnEnd>4</columnEnd>
            <lineRanges>
              <lineRange>
                <start>5</start>
                <end>6</end>
              </lineRange>
            </lineRanges>
            <id>c3b984a3-7f67-4332-953b-27d3943f232c</id>
            <description>description</description>
            <reference>reference</reference>
            <origin>origin</origin>
            <moduleName>module-name</moduleName>
            <packageName>package-name</packageName>
            <fileName>file-name</fileName>
            <fingerprint>fingerprint</fingerprint>
          </issue>
          <issue>
            <category>category</category>
            <type>type</type>
            <severity reference="../../issue/severity"/>
            <message>2</message>
            <lineStart>1</lineStart>
            <lineEnd>2</lineEnd>
            <columnStart>3</columnStart>
            <columnEnd>4</columnEnd>
            <lineRanges>
              <lineRange>
                <start>5</start>
                <end>6</end>
              </lineRange>
            </lineRanges>
            <id>fbf2fee0-292f-4991-bd06-d8c5b13ace93</id>
            <description>description</description>
            <reference>reference</reference>
            <origin>origin</origin>
            <moduleName>module-name</moduleName>
            <packageName>package-name</packageName>
            <fileName>file-name</fileName>
            <fingerprint>fingerprint</fingerprint>
          </issue>
        </elements>
        <infoMessages>
          <string>info</string>
        </infoMessages>
        <errorMessages>
          <string>error</string>
        </errorMessages>
        <duplicatesSize>0</duplicatesSize>
      </analysisReport>
      

       

        Attachments

          Issue Links

            Activity

            derrickgw Derrick Gibelyou created issue -
            drulli Ulli Hafner made changes -
            Field Original Value New Value
            Rank Ranked higher
            drulli Ulli Hafner made changes -
            Assignee Ulli Hafner [ drulli ]
            Labels help-wanted newbie-friendly
            drulli Ulli Hafner made changes -
            Epic Link JENKINS-56456 [ 198054 ]
            drulli Ulli Hafner made changes -
            Priority Minor [ 4 ] Major [ 3 ]
            hobbyte Raphael Furch made changes -
            Assignee Raphael Furch [ hobbyte ]
            jmini Jeremie Bresson made changes -
            Link This issue is related to JENKINS-57098 [ JENKINS-57098 ]
            drulli Ulli Hafner made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            drulli Ulli Hafner made changes -
            Rank Ranked lower
            drulli Ulli Hafner made changes -
            Description I have a handful of custom tools to generate custom reports on my code base and/or the compiled results. Right now I am abusing the output format of PMD to get close to the output I want. However, it would be nice if I could generate a file that mapped directly to the fields used by the plugin.

            This might also be useful for people who do not have admin access to write groovy parsers. They could do some local analysis, then generate this file format.

            An example of the input file format:
            {code:xml}
            <issues>
                <issue>
                    <category>Category 1</category>
                    <type>Type 1</type>
                    <severity>WARNING_LOW</severity>
                    <message>Message 1</message>
                    <lineStart>0</lineStart>
                    <lineEnd>0</lineEnd>
                    <columnStart>0</columnStart>
                    <columnEnd>0</columnEnd>
                    <lineRanges/>
                    <description>Description 1</description>
                    <moduleName>Module 1</moduleName>
                    <packageName>-</packageName>
                    <fileName>-</fileName>
                </issue>
                <issue>
                    <category>Category 2</category>
                    <type>Type 2</type>
                    <severity>WARNING_HIGH</severity>
                    <message>Message 2</message>
                    <lineStart>0</lineStart>
                    <lineEnd>0</lineEnd>
                    <columnStart>0</columnStart>
                    <columnEnd>0</columnEnd>
                    <lineRanges/>
                    <description>Description 2</description>
                    <moduleName>Module 2</moduleName>
                    <packageName>-</packageName>
                    <fileName>-</fileName>
                </issue>
            </issues>
            </code>
            {code}
            If this is of general interest I can post a PR.
            I have a handful of custom tools to generate custom reports on my code base and/or the compiled results. Right now I am abusing the output format of PMD to get close to the output I want. However, it would be nice if I could generate a file that mapped directly to the fields used by the plugin.

            This might also be useful for people who do not have admin access to write groovy parsers. They could do some local analysis, then generate this file format.

            Current Serialization of an {{Issue}} instance using XStream:
            {code:xml}
            <?xml version="1.1" encoding="UTF-8"?>
            <issue>
              <category>category</category>
              <type>type</type>
              <severity>HIGH</severity>
              <message>message</message>
              <lineStart>1</lineStart>
              <lineEnd>2</lineEnd>
              <columnStart>3</columnStart>
              <columnEnd>4</columnEnd>
              <lineRanges>
                <lineRange>
                  <start>5</start>
                  <end>6</end>
                </lineRange>
              </lineRanges>
              <id>63d61b1f-0cac-4e31-8bb9-f390ed1acfe8</id>
              <description>description</description>
              <reference>reference</reference>
              <origin>origin</origin>
              <moduleName>module-name</moduleName>
              <packageName>package-name</packageName>
              <fileName>file-name</fileName>
              <fingerprint>fingerprint</fingerprint>
            </issue>
            {code}
             
            Current Serialization of a {{Report}} instance using XStream:

            {code}
            <?xml version="1.1" encoding="UTF-8"?>
            <analysisReport>
              <elements class="linked-hash-set">
                <issue>
                  <category>category</category>
                  <type>type</type>
                  <severity>HIGH</severity>
                  <message>1</message>
                  <lineStart>1</lineStart>
                  <lineEnd>2</lineEnd>
                  <columnStart>3</columnStart>
                  <columnEnd>4</columnEnd>
                  <lineRanges>
                    <lineRange>
                      <start>5</start>
                      <end>6</end>
                    </lineRange>
                  </lineRanges>
                  <id>c3b984a3-7f67-4332-953b-27d3943f232c</id>
                  <description>description</description>
                  <reference>reference</reference>
                  <origin>origin</origin>
                  <moduleName>module-name</moduleName>
                  <packageName>package-name</packageName>
                  <fileName>file-name</fileName>
                  <fingerprint>fingerprint</fingerprint>
                </issue>
                <issue>
                  <category>category</category>
                  <type>type</type>
                  <severity reference="../../issue/severity"/>
                  <message>2</message>
                  <lineStart>1</lineStart>
                  <lineEnd>2</lineEnd>
                  <columnStart>3</columnStart>
                  <columnEnd>4</columnEnd>
                  <lineRanges>
                    <lineRange>
                      <start>5</start>
                      <end>6</end>
                    </lineRange>
                  </lineRanges>
                  <id>fbf2fee0-292f-4991-bd06-d8c5b13ace93</id>
                  <description>description</description>
                  <reference>reference</reference>
                  <origin>origin</origin>
                  <moduleName>module-name</moduleName>
                  <packageName>package-name</packageName>
                  <fileName>file-name</fileName>
                  <fingerprint>fingerprint</fingerprint>
                </issue>
              </elements>
              <infoMessages>
                <string>info</string>
              </infoMessages>
              <errorMessages>
                <string>error</string>
              </errorMessages>
              <duplicatesSize>0</duplicatesSize>
            </analysisReport>
            {code}

             
            drulli Ulli Hafner made changes -
            Description I have a handful of custom tools to generate custom reports on my code base and/or the compiled results. Right now I am abusing the output format of PMD to get close to the output I want. However, it would be nice if I could generate a file that mapped directly to the fields used by the plugin.

            This might also be useful for people who do not have admin access to write groovy parsers. They could do some local analysis, then generate this file format.

            Current Serialization of an {{Issue}} instance using XStream:
            {code:xml}
            <?xml version="1.1" encoding="UTF-8"?>
            <issue>
              <category>category</category>
              <type>type</type>
              <severity>HIGH</severity>
              <message>message</message>
              <lineStart>1</lineStart>
              <lineEnd>2</lineEnd>
              <columnStart>3</columnStart>
              <columnEnd>4</columnEnd>
              <lineRanges>
                <lineRange>
                  <start>5</start>
                  <end>6</end>
                </lineRange>
              </lineRanges>
              <id>63d61b1f-0cac-4e31-8bb9-f390ed1acfe8</id>
              <description>description</description>
              <reference>reference</reference>
              <origin>origin</origin>
              <moduleName>module-name</moduleName>
              <packageName>package-name</packageName>
              <fileName>file-name</fileName>
              <fingerprint>fingerprint</fingerprint>
            </issue>
            {code}
             
            Current Serialization of a {{Report}} instance using XStream:

            {code}
            <?xml version="1.1" encoding="UTF-8"?>
            <analysisReport>
              <elements class="linked-hash-set">
                <issue>
                  <category>category</category>
                  <type>type</type>
                  <severity>HIGH</severity>
                  <message>1</message>
                  <lineStart>1</lineStart>
                  <lineEnd>2</lineEnd>
                  <columnStart>3</columnStart>
                  <columnEnd>4</columnEnd>
                  <lineRanges>
                    <lineRange>
                      <start>5</start>
                      <end>6</end>
                    </lineRange>
                  </lineRanges>
                  <id>c3b984a3-7f67-4332-953b-27d3943f232c</id>
                  <description>description</description>
                  <reference>reference</reference>
                  <origin>origin</origin>
                  <moduleName>module-name</moduleName>
                  <packageName>package-name</packageName>
                  <fileName>file-name</fileName>
                  <fingerprint>fingerprint</fingerprint>
                </issue>
                <issue>
                  <category>category</category>
                  <type>type</type>
                  <severity reference="../../issue/severity"/>
                  <message>2</message>
                  <lineStart>1</lineStart>
                  <lineEnd>2</lineEnd>
                  <columnStart>3</columnStart>
                  <columnEnd>4</columnEnd>
                  <lineRanges>
                    <lineRange>
                      <start>5</start>
                      <end>6</end>
                    </lineRange>
                  </lineRanges>
                  <id>fbf2fee0-292f-4991-bd06-d8c5b13ace93</id>
                  <description>description</description>
                  <reference>reference</reference>
                  <origin>origin</origin>
                  <moduleName>module-name</moduleName>
                  <packageName>package-name</packageName>
                  <fileName>file-name</fileName>
                  <fingerprint>fingerprint</fingerprint>
                </issue>
              </elements>
              <infoMessages>
                <string>info</string>
              </infoMessages>
              <errorMessages>
                <string>error</string>
              </errorMessages>
              <duplicatesSize>0</duplicatesSize>
            </analysisReport>
            {code}

             
            I have a handful of custom tools to generate custom reports on my code base and/or the compiled results. Right now I am abusing the output format of PMD to get close to the output I want. However, it would be nice if I could generate a file that mapped directly to the fields used by the plugin.

            This might also be useful for people who do not have admin access to write groovy parsers. They could do some local analysis, then generate this file format.

            Current Serialization of an {{Issue}} instance using XStream:
            {code:xml}
            <?xml version="1.1" encoding="UTF-8"?>
            <issue>
              <category>category</category>
              <type>type</type>
              <severity>HIGH</severity>
              <message>message</message>
              <lineStart>1</lineStart>
              <lineEnd>2</lineEnd>
              <columnStart>3</columnStart>
              <columnEnd>4</columnEnd>
              <lineRanges>
                <lineRange>
                  <start>5</start>
                  <end>6</end>
                </lineRange>
              </lineRanges>
              <id>63d61b1f-0cac-4e31-8bb9-f390ed1acfe8</id>
              <description>description</description>
              <reference>reference</reference>
              <origin>origin</origin>
              <moduleName>module-name</moduleName>
              <packageName>package-name</packageName>
              <fileName>file-name</fileName>
              <fingerprint>fingerprint</fingerprint>
            </issue>
            {code}
             
            Current Serialization of a {{Report}} instance using XStream:

            {code:xml}
            <?xml version="1.1" encoding="UTF-8"?>
            <analysisReport>
              <elements class="linked-hash-set">
                <issue>
                  <category>category</category>
                  <type>type</type>
                  <severity>HIGH</severity>
                  <message>1</message>
                  <lineStart>1</lineStart>
                  <lineEnd>2</lineEnd>
                  <columnStart>3</columnStart>
                  <columnEnd>4</columnEnd>
                  <lineRanges>
                    <lineRange>
                      <start>5</start>
                      <end>6</end>
                    </lineRange>
                  </lineRanges>
                  <id>c3b984a3-7f67-4332-953b-27d3943f232c</id>
                  <description>description</description>
                  <reference>reference</reference>
                  <origin>origin</origin>
                  <moduleName>module-name</moduleName>
                  <packageName>package-name</packageName>
                  <fileName>file-name</fileName>
                  <fingerprint>fingerprint</fingerprint>
                </issue>
                <issue>
                  <category>category</category>
                  <type>type</type>
                  <severity reference="../../issue/severity"/>
                  <message>2</message>
                  <lineStart>1</lineStart>
                  <lineEnd>2</lineEnd>
                  <columnStart>3</columnStart>
                  <columnEnd>4</columnEnd>
                  <lineRanges>
                    <lineRange>
                      <start>5</start>
                      <end>6</end>
                    </lineRange>
                  </lineRanges>
                  <id>fbf2fee0-292f-4991-bd06-d8c5b13ace93</id>
                  <description>description</description>
                  <reference>reference</reference>
                  <origin>origin</origin>
                  <moduleName>module-name</moduleName>
                  <packageName>package-name</packageName>
                  <fileName>file-name</fileName>
                  <fingerprint>fingerprint</fingerprint>
                </issue>
              </elements>
              <infoMessages>
                <string>info</string>
              </infoMessages>
              <errorMessages>
                <string>error</string>
              </errorMessages>
              <duplicatesSize>0</duplicatesSize>
            </analysisReport>
            {code}

             
            drulli Ulli Hafner made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Fixed but Unreleased [ 10203 ]
            drulli Ulli Hafner made changes -
            Released As 5.0.0 (analysis-model and warnings-ng)
            Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]
            jmini Jeremie Bresson made changes -
            Link This issue is related to JENKINS-57854 [ JENKINS-57854 ]

              People

              Assignee:
              hobbyte Raphael Furch
              Reporter:
              derrickgw Derrick Gibelyou
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: