Skip to content

Package / file exclusion does not work with Scala 3 #525

Closed
@kyri-petrou

Description

@kyri-petrou

Hi there. There seems that some coverage settings (primarily coverageExcludedPackages and coverageExcludedFiles, but I believe some other ones might be affected) are not working with Scala 3.

The easiest way to reproduce is by cloning the sbt-scoverage-samples repo, adding the following line to build.sbt:

coverageExcludedPackages := ".*"

and then running

sbt coverage +test +coverageReport

This yields the following:

Scala 2:

[success] Total time: 13 s, completed 23 Dec 2023, 12:55:46 pm
[info] Statement coverage.: 100.00%
[info] Branch coverage....: 100.00%
[info] Coverage reports completed

Scala 3:

[info] Statement coverage.: 65.20%
[info] Branch coverage....: 33.33%
[info] Coverage reports completed

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions