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

Clover PHP Plugin should not ignore namespaced code

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Clover PHP Plugin does not generate per-file reports for namespaced code.

      Any file starting with namespace keyword is excluded from "Coverage Breakdown by File" section of "Clover Summary Report" page, even though it's included in "Overall Coverage Summary" section of the same page.

        Attachments

          Activity

          Hide
          madmuffin Patrick Brückner added a comment -

          Any hints on where to start? It is a medium issue to us and it seemed easy fix, but I cannot figure out where to start or how to write the right test.

          I did already wrote a test in the CoverageParserTest class, that checks if all files are correctly listed (while having a lot of namespaced Classes) by the CloverCoverageParser; but this seems fine.

          Thanks for any hints!

          Show
          madmuffin Patrick Brückner added a comment - Any hints on where to start? It is a medium issue to us and it seemed easy fix, but I cannot figure out where to start or how to write the right test. I did already wrote a test in the CoverageParserTest class, that checks if all files are correctly listed (while having a lot of namespaced Classes) by the CloverCoverageParser; but this seems fine. Thanks for any hints!
          Hide
          cezarykluczynski Cezary Kluczyński added a comment -

          I'm not sure if that's of any help, but when I was digging around for solution for this issue, I came acros this StackOverflow answer: http://stackoverflow.com/a/26923198/3807342

          Show
          cezarykluczynski Cezary Kluczyński added a comment - I'm not sure if that's of any help, but when I was digging around for solution for this issue, I came acros this StackOverflow answer: http://stackoverflow.com/a/26923198/3807342
          Hide
          madmuffin Patrick Brückner added a comment -

          I added the patterns including /package/ as suggested in your link, but it does still not work on my side.

          Code is available at https://github.com/madmuffin1/cloverphp-plugin/tree/include-namespaced-classes

          Show
          madmuffin Patrick Brückner added a comment - I added the patterns including /package/ as suggested in your link, but it does still not work on my side. Code is available at https://github.com/madmuffin1/cloverphp-plugin/tree/include-namespaced-classes
          Hide
          madmuffin Patrick Brückner added a comment -

          I have started working on a fix. Expect a mergeable patch within the course of the week.

          Show
          madmuffin Patrick Brückner added a comment - I have started working on a fix. Expect a mergeable patch within the course of the week.
          Hide
          madmuffin Patrick Brückner added a comment -

          I reassigned this to you, sogabe, since the fix needs your approval to be merged.

          Show
          madmuffin Patrick Brückner added a comment - I reassigned this to you, sogabe , since the fix needs your approval to be merged.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Patrick Brückner
          Path:
          .gitignore
          src/main/java/org/jenkinsci/plugins/cloverphp/CloverCoverageParser.java
          src/test/java/org/jenkinsci/plugins/cloverphp/CloverCoverageParserTest.java
          src/test/resources/org/jenkinsci/plugins/cloverphp/clover-namespaces.xml
          http://jenkins-ci.org/commit/cloverphp-plugin/c05137bd582507b126c3b7d541e28f0444ddd7c5
          Log:
          Trying to fix JENKINS-26722 with the solution described at http://stackoverflow.com/questions/18955271/namespaced-code-not-included-in-coverage/26923198#26923198. Unfortunately, it does not work for me as of yet.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Patrick Brückner Path: .gitignore src/main/java/org/jenkinsci/plugins/cloverphp/CloverCoverageParser.java src/test/java/org/jenkinsci/plugins/cloverphp/CloverCoverageParserTest.java src/test/resources/org/jenkinsci/plugins/cloverphp/clover-namespaces.xml http://jenkins-ci.org/commit/cloverphp-plugin/c05137bd582507b126c3b7d541e28f0444ddd7c5 Log: Trying to fix JENKINS-26722 with the solution described at http://stackoverflow.com/questions/18955271/namespaced-code-not-included-in-coverage/26923198#26923198 . Unfortunately, it does not work for me as of yet.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Patrick Brückner
          Path:
          src/main/java/org/jenkinsci/plugins/cloverphp/CloverCoverageParser.java
          src/main/java/org/jenkinsci/plugins/cloverphp/results/AbstractClassMetrics.java
          src/main/java/org/jenkinsci/plugins/cloverphp/results/ClassCoverage.java
          src/main/java/org/jenkinsci/plugins/cloverphp/results/FileCoverage.java
          src/main/java/org/jenkinsci/plugins/cloverphp/results/PackageCoverage.java
          src/main/java/org/jenkinsci/plugins/cloverphp/results/ProjectCoverage.java
          src/main/java/org/jenkinsci/plugins/cloverphp/targets/CoverageTarget.java
          src/main/resources/org/jenkinsci/plugins/cloverphp/results/PackageCoverage/index.jelly
          src/main/resources/org/jenkinsci/plugins/cloverphp/results/ProjectCoverage/index.jelly
          src/main/resources/org/jenkinsci/plugins/cloverphp/tags/breakdownTable.jelly
          src/main/resources/org/jenkinsci/plugins/cloverphp/tags/main.jelly
          src/test/java/org/jenkinsci/plugins/cloverphp/CloverCoverageParserTest.java
          src/test/java/org/jenkinsci/plugins/cloverphp/results/ProjectCoverageTest.java
          http://jenkins-ci.org/commit/cloverphp-plugin/e74766b0be4371d569cc0984bd80d44da0a7436d
          Log:
          Also display of namespaced classes. fixes JENKINS-26722

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Patrick Brückner Path: src/main/java/org/jenkinsci/plugins/cloverphp/CloverCoverageParser.java src/main/java/org/jenkinsci/plugins/cloverphp/results/AbstractClassMetrics.java src/main/java/org/jenkinsci/plugins/cloverphp/results/ClassCoverage.java src/main/java/org/jenkinsci/plugins/cloverphp/results/FileCoverage.java src/main/java/org/jenkinsci/plugins/cloverphp/results/PackageCoverage.java src/main/java/org/jenkinsci/plugins/cloverphp/results/ProjectCoverage.java src/main/java/org/jenkinsci/plugins/cloverphp/targets/CoverageTarget.java src/main/resources/org/jenkinsci/plugins/cloverphp/results/PackageCoverage/index.jelly src/main/resources/org/jenkinsci/plugins/cloverphp/results/ProjectCoverage/index.jelly src/main/resources/org/jenkinsci/plugins/cloverphp/tags/breakdownTable.jelly src/main/resources/org/jenkinsci/plugins/cloverphp/tags/main.jelly src/test/java/org/jenkinsci/plugins/cloverphp/CloverCoverageParserTest.java src/test/java/org/jenkinsci/plugins/cloverphp/results/ProjectCoverageTest.java http://jenkins-ci.org/commit/cloverphp-plugin/e74766b0be4371d569cc0984bd80d44da0a7436d Log: Also display of namespaced classes. fixes JENKINS-26722
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Seiji Sogabe
          Path:
          .gitignore
          src/main/java/org/jenkinsci/plugins/cloverphp/CloverCoverageParser.java
          src/main/java/org/jenkinsci/plugins/cloverphp/results/AbstractClassMetrics.java
          src/main/java/org/jenkinsci/plugins/cloverphp/results/ClassCoverage.java
          src/main/java/org/jenkinsci/plugins/cloverphp/results/FileCoverage.java
          src/main/java/org/jenkinsci/plugins/cloverphp/results/PackageCoverage.java
          src/main/java/org/jenkinsci/plugins/cloverphp/results/ProjectCoverage.java
          src/main/java/org/jenkinsci/plugins/cloverphp/targets/CoverageTarget.java
          src/main/resources/org/jenkinsci/plugins/cloverphp/results/PackageCoverage/index.jelly
          src/main/resources/org/jenkinsci/plugins/cloverphp/results/ProjectCoverage/index.jelly
          src/main/resources/org/jenkinsci/plugins/cloverphp/tags/breakdownTable.jelly
          src/main/resources/org/jenkinsci/plugins/cloverphp/tags/main.jelly
          src/test/java/org/jenkinsci/plugins/cloverphp/CloverCoverageParserTest.java
          src/test/java/org/jenkinsci/plugins/cloverphp/results/PackageCoverageTest.java
          src/test/java/org/jenkinsci/plugins/cloverphp/results/ProjectCoverageTest.java
          src/test/resources/org/jenkinsci/plugins/cloverphp/clover-namespaces.xml
          http://jenkins-ci.org/commit/cloverphp-plugin/5269383e11ce36119b77180bf7d281b0578c68e0
          Log:
          Merge pull request #4 from madmuffin1/include-namespaced-classes

          Correctly parse and display namespaced classes, fixes JENKINS-26722

          Compare: https://github.com/jenkinsci/cloverphp-plugin/compare/085299e22c19...5269383e11ce

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Seiji Sogabe Path: .gitignore src/main/java/org/jenkinsci/plugins/cloverphp/CloverCoverageParser.java src/main/java/org/jenkinsci/plugins/cloverphp/results/AbstractClassMetrics.java src/main/java/org/jenkinsci/plugins/cloverphp/results/ClassCoverage.java src/main/java/org/jenkinsci/plugins/cloverphp/results/FileCoverage.java src/main/java/org/jenkinsci/plugins/cloverphp/results/PackageCoverage.java src/main/java/org/jenkinsci/plugins/cloverphp/results/ProjectCoverage.java src/main/java/org/jenkinsci/plugins/cloverphp/targets/CoverageTarget.java src/main/resources/org/jenkinsci/plugins/cloverphp/results/PackageCoverage/index.jelly src/main/resources/org/jenkinsci/plugins/cloverphp/results/ProjectCoverage/index.jelly src/main/resources/org/jenkinsci/plugins/cloverphp/tags/breakdownTable.jelly src/main/resources/org/jenkinsci/plugins/cloverphp/tags/main.jelly src/test/java/org/jenkinsci/plugins/cloverphp/CloverCoverageParserTest.java src/test/java/org/jenkinsci/plugins/cloverphp/results/PackageCoverageTest.java src/test/java/org/jenkinsci/plugins/cloverphp/results/ProjectCoverageTest.java src/test/resources/org/jenkinsci/plugins/cloverphp/clover-namespaces.xml http://jenkins-ci.org/commit/cloverphp-plugin/5269383e11ce36119b77180bf7d281b0578c68e0 Log: Merge pull request #4 from madmuffin1/include-namespaced-classes Correctly parse and display namespaced classes, fixes JENKINS-26722 Compare: https://github.com/jenkinsci/cloverphp-plugin/compare/085299e22c19...5269383e11ce

            People

            • Assignee:
              sogabe sogabe
              Reporter:
              cezarykluczynski Cezary Kluczyński
            • Votes:
              5 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: