foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.27k stars 1.74k forks source link

Add support for `--watch` to `forge coverage` #4303

Open 0xGuybrush opened 1 year ago

0xGuybrush commented 1 year ago

Component

Forge

Describe the feature you would like

Allow forge coverage to be ran with the watch flag, in the same way as forge test

Additional context

When trying to increase test coverage (especially across branching logic), currently I'm running forge coverage --report lcov (and then letting Coverage Gutters in VSCode) show where I still have gaps.

Since Coverage Gutters automatically picks up changes to lcov.info, having the coverage command support watch would close that loop & make the testing cycle even faster.

roninjin10 commented 1 year ago

I can look at this if nobody else already is