-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(coverage): analyze with solar #11565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The `++i` line was reported first, so with the old check all previous lines were ignored. Now we track all lines regardless, so this change is more correct.
Fixes branch_with_calldata_reads test.
}, | ||
stmt.span, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not entirely equivalent, but the previous logic resulted in weird spans for else-if chains (left is before, right is after):
this was added in #3094
If statements like `if (x) return y;` were missed by the previous `has_statements` function.
Same as previous test with `return`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
* feat(coverage): analyze with solar * chore: walk stmts normally, sort items * wip * chore: display all items with relevant source in debug format * wip * upd * chore: clippy * test: update do_while_lcov The `++i` line was reported first, so with the old check all previous lines were ignored. Now we track all lines regardless, so this change is more correct. * fix: legacy: do not recurse into emit, revert Fixes branch_with_calldata_reads test. * correct span * fix: inline config path * fix: resolve function kinds, ignore type conversions / struct ctors * fix: walk only functions * fix: push stmt for yul stmt expr early * test: add a test case for if (..) return If statements like `if (x) return y;` were missed by the previous `has_statements` function. * test: hoist contract instantiations out of test fns * test: add test case for single if with continue/break Same as previous test with `return`.
Closes #10964.
By using Solar to analyze contracts to find items we can avoid requesting AST output from solc, saving a considerable amount of serde time.
This also fixes a few bugs, while trying to remain 100% compatible with the previous solc AST implementation. See individual commits and their descriptions for more details.
Default project:

ithacaxyz/account:
