hirosystems / clarinet

Write, test and deploy high-quality smart contracts to the Stacks blockchain and Bitcoin.
https://hiro.so/clarinet
GNU General Public License v3.0
298 stars 132 forks source link

Support for code coverage visualization in VSCode #1062

Open lgalabru opened 1 year ago

lgalabru commented 1 year ago

See https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters for developer experience. We could have a mode where the coverage is refreshed every-time the developer save a file: having coverage with such a tight feedback loop would be a serious productivity boost.

hugocaillard commented 1 year ago

I'll test if it already works. See with @MicaiahReid about the lcov format compatibility issue

hugocaillard commented 1 year ago

@lgalabru It seems to be working fine (I probably need to test on bigger project). The only requirement would be to rename the lcov file into lcov.info (or add the "coverage-gutters.coverageFileNames" option in the workspace settings)

Screenshot:

Screenshot 2023-07-03 at 19 54 17
lgalabru commented 1 year ago

That's really cool? So is this feature native to VScode, or do we have to install the extra extension? would it make sense to augment our extension to support this out of the box?

lgalabru commented 1 year ago

We should probably document this! cc @LakshmiLavanyaKasturi

hugocaillard commented 1 year ago

This is with the extension you linked.

would it make sense to augment our extension to support this out of the box?

Why reinvent the wheel? Or it would be a very low priority task