sbt-scoverage exclude syntax
Asked Answered
W

1

7

I just started using scoverage for the first time. It's working great for me now, but I encountered a problem with the syntax excluding a package.

When my package structure is the following:

- com
   - project
      - core
        - excluded
        - notExcluded

What should I add to my build.sbt to exclude the package: excluded?

Thanks in advance!

Waspish answered 16/3, 2016 at 10:34 Comment(0)
I
10

One of following should work for you:

coverageExcludedPackages := ".*exclude.*"

coverageExcludedPackages := "com\\.project\\.core\\.exclude.*"

https://github.com/scoverage/sbt-scoverage

Insular answered 16/3, 2016 at 10:45 Comment(3)
Thank you! The used syntax is now clear for me, I didn't understand it from their github.Waspish
Adding comment as, as a noob I was not able to find coverageExcludedPackages directly, but it should be as below ScoverageKeys.coverageExcludedPackages := "com\\.foo\\.bar.*"Hautboy
how do I exclude a fileStroh

© 2022 - 2024 — McMap. All rights reserved.