rules_scala
rules_scala copied to clipboard
`--instrumentation_filter` does not work for scala coverage
Repro: https://github.com/sjoerdvisscher/bazel-scala-tests
bazel coverage //... --instrumentation_filter=-java
removes java, but
bazel coverage //... --instrumentation_filter=-scala
has scala
Repro also demonstrates #1101
Thanks @sjoerdvisscher for reporting
Is there any workaround for this?
My workaround so far it to take the combined report and extract data from it with lcov -e
to take only files that weren't tests.
Is cd556ccfc253bfd70659631079e39be412b5402d a fix for this bug?
After upgrading to the newest rules_scala (de3d3a772e2fd443bcd662c740f5f8e916e4b6f0) instrumentation_filter
seems to be working for my use-case (test targets are properly removed from the output).
https://github.com/sjoerdvisscher/bazel-scala-tests would need an update, it breaks when upgrading rules_scala to the newest version, so I could not check it there, but I believe it should be working when scala targets are excluded.