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

Only java source files are processed, groovy, scala, gosu, etc. don't show coverage graphically

    XMLWordPrintable

Details

    Description

      After JaCoCo version 2.2.0 was released graphical code coverage display stoped working for non .java source files. Such as .groovy, .scala, .gs, .kt, etc.

      No code is displayed when viewing the coverage section of the reports.

       The JaCoCo log outputs:

      [JaCoCo plugin] Saving matched source directories for source-pattern: src: 
      [JaCoCo plugin] - /var/lib/jenkins/jobs/myjob/workspace/src 0 files
      [JaCoCo plugin] Loading inclusions files..
      

       Indicating 0 files were read from the source directory.

      The cause is related to this improvement Filter class directories JENKINS-38604

      Commit d771e0b15933516917208f30dd54bad81b1c290d introduced a change on line 472 of JacocoPublisher.java which restricts source files with the mask */.java

      Rolling back to version 2.1.0 of JaCoCo restores the expected behaviour.

      Can inclusions / exclusions filters be added similar to how class directories are filtered?

      Attachments

        Activity

          centic centic added a comment -

          As the update to the PR never materialized, I have pushed the current version where *.java is used as default and people can enter a different pattern for source files if necessary. Will be included in the next release of the plugin.

          centic centic added a comment - As the update to the PR never materialized, I have pushed the current version where *.java is used as default and people can enter a different pattern for source files if necessary. Will be included in the next release of the plugin.
          matejdro Matej Dro added a comment -

          Any ETA when can we expect new release with this fixed?

          Thanks.

          matejdro Matej Dro added a comment - Any ETA when can we expect new release with this fixed? Thanks.
          rafaelfonte Rafael Fonte added a comment -

          Is this meant to be fixed already? I'm with the latest version (3.0.4) and inclusions for groovy source code is not working.

          rafaelfonte Rafael Fonte added a comment - Is this meant to be fixed already? I'm with the latest version (3.0.4) and inclusions for groovy source code is not working.
          centic centic added a comment -

          In the current version *.java is the default, you need to adjust configuration to use a different pattern.

          centic centic added a comment - In the current version *.java is the default, you need to adjust configuration to use a different pattern.
          rafaelfonte Rafael Fonte added a comment -

          Hi centic, actually I tried it with the groovy pattern (**/.groovy*) but it did not work. It shows results as though all source files under the directory I chose were excluded.

          rafaelfonte Rafael Fonte added a comment - Hi  centic , actually I tried it with the groovy pattern (** / .groovy*) but it did not work. It shows results as though all source files under the directory I chose were excluded.

          People

            spudmux Neal Hunter
            spudmux Neal Hunter
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: