Skip to content

No way to determine source file location of class in cobertura report #582

Open
@Falmarri

Description

@Falmarri

There's no way to determine the actual source to the class in the cobertura report. For example, a project can have multiple definitions:

        <source>/home/user/project/subproject/src/main/scala</source>
        <source>/home/user/project/subproject/target/scala-2.12/src_managed/main</source>

and then an example class

<class name="com.org.package.ClassName" filename="com/org/package/ClassName.scala" line-rate="0.00" branch-rate="0.00" complexity="0">

This is especially difficult when using sbt-scoverage to aggregate the subprojects. That just concats all the sources into 1, making the aggregated report basically useless.

How do I determine where that class is from? I can likely figure it out because of requirements of scala, that there can't be multiple class names in the same package. But the information provided does not tell me where to find the class. I could have a file in each of those 2 source directories called com/org/package/ClassName.scala, but they provide different class names. I'd have to open the file and try to parse it to determine which file is the actual source of this class.

Originally posted by @Falmarri in #497 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions