Support code exclusion from coverage instrumentation #17685
Replies: 5 comments 4 replies
-
Okay, here's some hint :) 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 Excluding packages (or worse, classes) looks a bit more complicated. |
Beta Was this translation helpful? Give feedback.
-
It would be great to have the coverage exclusion supported in Scala3; |
Beta Was this translation helpful? Give feedback.
-
I would love to see coverage checking exclusion for Scala 3. This is the last thing that is preventing me from upgrading many projects to Scala 3. |
Beta Was this translation helpful? Give feedback.
-
I would like to add that any ignoring mechanism should also support |
Beta Was this translation helpful? Give feedback.
-
Does anybody knows if #19727 planned to be back-ported to LTS branch ? |
Beta Was this translation helpful? Give feedback.
-
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!
Beta Was this translation helpful? Give feedback.
All reactions