ttt
ttt

Reputation: 4004

SBT Coverage "exclude" used in Play application

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

Upvotes: 3

Views: 3590

Answers (3)

Charmy Garg
Charmy Garg

Reputation: 291

Better to try the below configuration:

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

This will definitely work.

Upvotes: 0

muya_
muya_

Reputation: 1008

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

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

Upvotes: 5

socom1880
socom1880

Reputation: 340

Try

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

Upvotes: 3

Related Questions