-
Notifications
You must be signed in to change notification settings - Fork 3
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
Lcov-report #38
Lcov-report #38
Conversation
.lcov_filtered | ||
|
||
coverage-report/ |
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 should also include lcov.info and lcov_filtered.info
4. **Generate the HTML Report:** | ||
To create an HTML report from the filtered `lcov` data, use: | ||
```sh | ||
genhtml lcov_filtered.info --output-directory coverage-report --ignore-errors inconsistent,corrupt |
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.
you want to instead address the specific error only::
genhtml lcov_filtered.info --output-directory coverage-report --rc derive_function_end_line=0
see the warning in the forge docs for explanation https://book.getfoundry.sh/reference/forge/forge-coverage#description
3. **Filter the Coverage Data:** | ||
To ensure that only files from the `src` directory are included in the report, filter the coverage data: | ||
```sh | ||
lcov --remove lcov.info 'test/*' -o lcov_filtered.info --ignore-errors inconsistent |
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.
same remark as below: you only want to address the actual error by instead calling
lcov --remove lcov.info 'test/*' -o lcov_filtered.info --rc derive_function_end_line=0
this error is mentioned in the forge docs (see link below)
@@ -67,6 +67,53 @@ This Solidity project uses Foundry as a toolkit. If you don't have Foundry insta | |||
forge snapshot | |||
``` | |||
|
|||
### Generating Code Coverage Report |
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.
for the readme, forge coverage
works out of the box, and so I think this more detailed description is too much for the readme. I ll set it up in a script and we can run a hosted version of the coverage report and then just link the results to the readme
Good work, but the PR still contains the outputs and as mentioned, let's just set it up as a hosted service with the results reported back in the readme. |
No description provided.