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?
As an improvement to @socom1880's answer, this worked for me by adding it to build.sbt
coverageExcludedPackages := "<empty>;Reverse.*;router\\.*"
Try
coverageExcludedPackages := "<empty>;router\\..*;"
Better to try the below configuration:
coverageExcludedPackages := ".*Reverse.*;Routes.*"
This will definitely work.
来源:https://stackoverflow.com/questions/32331183/sbt-coverage-exclude-used-in-play-application