bazelbuild / vscode-bazel

Bazel support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=BazelBuild.vscode-bazel
Apache License 2.0
231 stars 76 forks source link

feat(coverage): Basic test coverage support #366

Closed vogelsgesang closed 2 months ago

vogelsgesang commented 3 months ago

This commit lays the foundation for displaying coverage results from bazel coverage.

Currently, the functionality is only exposed through the user-defined tasks in the tasks.json. It is thereby a bit hard to discover. But this is fine for the time being, because coverage still has a couple of rough edges anyway. As soon as it is more stable, we should add builtin commands and expose coverage runs also in the "Bazel Build Target" tree.

Changes in this commit:

Future work:

Tested with: Java, C++, Go, Rust Untested: Python, Swift, Kotlin, Scala and many more

This is the first step towards #362

vogelsgesang commented 3 months ago

See https://github.com/microsoft/vscode/issues/209697 for a couple of screenshots

cameron-martin commented 2 months ago

I've reviewed everything but the lcov parser, and it looks good. I've run out of time this evening, so I'll have to review the lcov parser another day.

vogelsgesang commented 2 months ago

I am still interested in merging this, but I will wait with resolving the merge conflicts until after the review 🙂

vogelsgesang commented 2 months ago

No worries, I know this was a larger, more complicated commit. Thanks for taking the time to review this in-depth instead of just give me a "probably good-enough approval"! Good reviews are important to the project in the long run 🙂