Repository navigation
🐛 Bug Fix
Fixed a critical bug where contracts containing only view/pure functions would incorrectly show 0% coverage.
What was wrong
- By default, echidna-coverage filters out view/pure functions to focus on state-changing functions
- Contracts like QuoterV1 that only contain view functions would have all functions filtered out
- This resulted in showing 0 total functions and 0% coverage, even when the contract was fully covered
What's fixed
- Automatically includes all functions when filtering would result in zero functions
- Contracts with only view/pure functions now show their actual coverage metrics
- Example: QuoterV1 now correctly shows 97.22% coverage instead of 0%
Technical Details
- Modified
parseFunctions()insrc/parsing/index.ts - Added fallback logic when
filteredFunctions.length === 0 && functions.length > 0 - No breaking changes - all existing functionality preserved
Full Changelog: v2.0.1...v2.0.2