Skip to content

--instrumentation_filter does not work for scala coverage  #1167

@liucijus

Description

@liucijus
Collaborator

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

Activity

gergelyfabian

gergelyfabian commented on Nov 25, 2021

@gergelyfabian
Contributor

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.

gergelyfabian

gergelyfabian commented on Apr 27, 2022

@gergelyfabian
Contributor

Is cd556cc a fix for this bug?

gergelyfabian

gergelyfabian commented on Apr 27, 2022

@gergelyfabian
Contributor

After upgrading to the newest rules_scala (de3d3a7) instrumentation_filter seems to be working for my use-case (test targets are properly removed from the output).

gergelyfabian

gergelyfabian commented on Apr 27, 2022

@gergelyfabian
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @liucijus@gergelyfabian

        Issue actions

          `--instrumentation_filter` does not work for scala coverage · Issue #1167 · bazel-contrib/rules_scala