3

I used the sbt-scoverage for our Play application.

I used the following config to exclude both Reverse and Routes generated file.

coverageExcludedPackages := ";Reverse.;Routes.;"

However this can only exclude generated Reverse scala files and can't exclude Routes files. Even I use the following script, it does the same

coverageExcludedPackages := ";Routes.*;"

Anyone knows what is the correct regex should be?

enter image description here

ttt
  • 3,934
  • 8
  • 46
  • 85

3 Answers3

5

As an improvement to @socom1880's answer, this worked for me by adding it to build.sbt

coverageExcludedPackages := "<empty>;Reverse.*;router\\.*"
muya_
  • 768
  • 7
  • 21
  • To ignore modules in subprojects/submodules, add the above line to the settings of the submodule. See https://github.com/scoverage/sbt-scoverage/issues/96 – tonyslowdown Sep 18 '17 at 07:27
3

Try

coverageExcludedPackages := "<empty>;router\\..*;"

socom1880
  • 340
  • 3
  • 12
0

Better to try the below configuration:

coverageExcludedPackages := ".*Reverse.*;Routes.*"

This will definitely work.

Charmy Garg
  • 291
  • 2
  • 14