Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Improved Code Lens Support #106

Open
OscarVanL opened this issue May 19, 2022 · 1 comment
Open

[Request] Improved Code Lens Support #106

OscarVanL opened this issue May 19, 2022 · 1 comment

Comments

@OscarVanL
Copy link

One of the main apprehensions in fully adopting Bazel within our team is the lack of good Code Lens options. We love clicking the green 'Run Test' play button to the left of our Unit Tests! Sadly the Go extension's code lens only allows tests to be ran via go test, not bazel test.

This extension goes a long way by allowing us to run a group of go_test through Bazel via the BUILD.bazel file, but it's still a little annoying to have to leave the test you're writing, switch to another file, then run several tests that are grouped into the go_test package at once.

It is nice to be able to run one test at a time, and it is also nice to not have to leave your source file.

It would be amazing if this extension could add Code Lens buttons to every test function, in the test sources themselves.

The command that it would need to run would need to be something like this:

bazel test --test_filter=TestFunctionName //package/internal:internal_test

I can imagine the process would be to search a folder, find the test path via BUILD.bazel file to find the test target. Then search through each *_test.go file to look for test functions, and substitute the function name into --test_filter=... for each code lens run button.

This feature would be fantastic, and is exactly what's missing from a great VSCode Bazel integration.

@pcj
Copy link
Member

pcj commented May 22, 2022

Thanks for the feedback. Will prioritize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants