foundry-rs / foundry-rs/foundry

chore: turn `forge coverage` and `forge snapshot` into `forge test` flags (`--coverage`, `--snapshot`)

Open
#9,528 1 comment 1 reaction 0 assignees View on GitHub
A-internals T-chore T-likely-breaking T-to-discuss
Dominant language
Rust
Stars
10.6k
Forks
2.6k
Avg merge
16h 38m
Merged PRs (30d)
511

Description

### Component

Forge

### Describe the feature you would like

Proposal: merge `forge coverage` and `forge snapshot` into `forge test`, expose them with feature flags (`--coverage`, `--snapshot`). This is in line with other reports like `--gas-report`.

This would simplify `forge test` compatibility issues described in https://github.com/foundry-rs/foundry/issues/9525 and make it easier to flag incompatible flags (current limitation because of `TestArgs` inheritance)

We should also refactor `run_tests` method in `forge test` into helpers

This is a significant breaking change for scripted workflows i.e. https://github.com/atarpara/foundry-snapshot-diff and CI's of users.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.