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

#include <string> is displayed as just #include in coverage source code view

      The source code view of C/C++ source is not displayed correctly for lines like #include <string>. I is displayed as just #include. See this screenshot:

      It could be some protection against html elements in source that is causing this?

          [JENKINS-72398] #include <string> is displayed as just #include in coverage source code view

          Ulli Hafner added a comment -

          Ulli Hafner added a comment - Yes, this is not implemented yet, see https://github.com/jenkinsci/code-coverage-api-plugin/issues/760 .

          tsondergaard added a comment -

          Hi drulli, the issue that you reference is in https://github.com/jenkinsci/code-coverage-api-plugin which has a README.md that says "This plugin reached end-of-life." Is that project still alive?

          tsondergaard added a comment - Hi drulli , the issue that you reference is in https://github.com/jenkinsci/code-coverage-api-plugin which has a README.md that says "This plugin reached end-of-life." Is that project still alive?

          Ulli Hafner added a comment -

          Well, the coverage plugin is now the successor of the code-coverage-api plugin. I moved all new code to a new plugin to get rid of the old classes. So the old project is dead, but the new one is alive.

          Ulli Hafner added a comment - Well, the coverage plugin is now the successor of the code-coverage-api plugin. I moved all new code to a new plugin to get rid of the old classes. So the old project is dead, but the new one is alive.

          tsondergaard added a comment - - edited

          drulli, but it is the same git repo?

          tsondergaard added a comment - - edited drulli , but it is the same git repo?

          Ulli Hafner added a comment -

          Ulli Hafner added a comment - No. https://github.com/jenkinsci/code-coverage-api-plugin https://github.com/jenkinsci/coverage-plugin

          Jan added a comment - - edited

          Is this issue related to implementation of the renderLine function of the io.jenkins.plugins.coverage.metrics.source.CoverageSourcePrinter. ?

          https://github.com/jenkinsci/coverage-plugin/blob/ed24ac70b746225378ccc886a23de7769ad7cb71/plugin/src/main/java/io/jenkins/plugins/coverage/metrics/source/CoverageSourcePrinter.java#L42

           

          if the cleanupCode function also replaced less than sign and greater than sign with "amp lt semicolon"  and "amp gt semicolon" respectively, would that be a viable solution?

          https://github.com/jenkinsci/coverage-plugin/blob/ed24ac70b746225378ccc886a23de7769ad7cb71/plugin/src/main/java/io/jenkins/plugins/coverage/metrics/source/CoverageSourcePrinter.java#L57C20-L57C31

           

          Jan added a comment - - edited Is this issue related to implementation of the renderLine function of the io.jenkins.plugins.coverage.metrics.source.CoverageSourcePrinter. ? https://github.com/jenkinsci/coverage-plugin/blob/ed24ac70b746225378ccc886a23de7769ad7cb71/plugin/src/main/java/io/jenkins/plugins/coverage/metrics/source/CoverageSourcePrinter.java#L42   if the cleanupCode function also replaced less than sign and greater than sign with "amp lt semicolon"  and "amp gt semicolon" respectively, would that be a viable solution? https://github.com/jenkinsci/coverage-plugin/blob/ed24ac70b746225378ccc886a23de7769ad7cb71/plugin/src/main/java/io/jenkins/plugins/coverage/metrics/source/CoverageSourcePrinter.java#L57C20-L57C31  

          Ulli Hafner added a comment -

          This is the problematic code yes. You can have a look at https://github.com/jenkinsci/prism-api-plugin/blob/main/src/main/java/io/jenkins/plugins/prism/SourcePrinter.java how this is done for the warnings plugin.

          Ulli Hafner added a comment - This is the problematic code yes. You can have a look at https://github.com/jenkinsci/prism-api-plugin/blob/main/src/main/java/io/jenkins/plugins/prism/SourcePrinter.java how this is done for the warnings plugin.

            Unassigned Unassigned
            tsondergaard tsondergaard
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: