I have few methods in my scala play framework application that I want to be excluded from scoverage report. Is there any way to achieve this? May be similar to using @Generated annotations for methods to be excluded as for Jacoco 0.8.2 release.
Example:
class TestClass {
@Generated
def methodN = {}
}
Or may be use something like excludeMethods += "TestClass.methodN, TestClass.methodX" in build.sbt file?
From the docs I'd say that without changing the source code you can exclude only class/package/file from your build tool
but if you can modify the source code you can exclude whatever you want by putting the right comments around it
If it's the code you written yourself I would use comments, and if it was something spit by the codegen I would suggest the compiler options (scoverage works as a compiler plugin, slightly changing emitted bytecode).