gas-diff-action icon indicating copy to clipboard operation
gas-diff-action copied to clipboard

Feature request: add a boolean flag in the action inputs for ignoring reverts

Open PaulRBerg opened this issue 2 years ago • 0 comments

Just saw this project and it looks promising. I have a feature request:

Add a boolean flag in the actions inputs for ignoring reverts, e.g.:

with:
    ignore_reverts: true

The default value would be false, but when enabled, the action would pass the following flag to Forge:

--no-match-test "test(Fork)?(Fuzz)?_RevertWhen_\w{1,}?

In order to exclude all reverting tests from the gas report - because who cares about the erroring execution paths for gas consumption? Protocols are built so that the vast majority of contract calls are successful.

Context:

  • https://twitter.com/PaulRBerg/status/1630911941655904258
  • https://twitter.com/PaulRBerg/status/1616068157088714765
  • https://github.com/ScopeLift/foundry-template#ci
  • https://github.com/foundry-rs/book/issues/761

PaulRBerg avatar Jul 15 '23 10:07 PaulRBerg