You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Okay, here's some hint :)
Coverage instrumentation is done by the phase instrumentCoverage in compiler/src/dotty/tools/dotc/transform/InstrumentCoverage.scala.
The most performant form of exclusion is to exclude files. The current "compilation unit" provides the source that is being compiled:
ctx.compilationUnit.source
This could be used to disable the instrumentation phase according to a collection of regex-like strings. We have -coverage-out to configure the output of scoverage files, we could have -coverage-exclude-files or something like that. Such options are defined in ScalaSettings, you can see how -coverage-out has been defined.
Excluding packages (or worse, classes) looks a bit more complicated.
ckipp01
transferred this issue from lampepfl/dotty-feature-requests
May 31, 2023
Original scalac scoverage plugin supports excluding code from instrumentation and reports
https://github.com/scoverage/scalac-scoverage-plugin#excluding-code-from-coverage-stats
Scala 3 can support it as well, to make transition from Scala 2 easier.
Also, any hints for volunteers on where to start are highly appreciated :)
Thank you!
The text was updated successfully, but these errors were encountered: