Skip to content
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

Add a Reset method on CoverageReport type #2386

Merged

Conversation

m-Peter
Copy link
Contributor

@m-Peter m-Peter commented Mar 14, 2023

Closes #2385

Description

Add a Reset method on CoverageReport type. This is helpful when CoverageReport is used in a context such as the Flow emulator, and the user/developer wants to flush everything. The ExcludedLocations, however, still remain intact.

Ref: onflow/flow-emulator#332 (comment)


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@codecov
Copy link

codecov bot commented Mar 14, 2023

Codecov Report

Merging #2386 (9736b17) into master (e9451ba) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 9736b17 differs from pull request most recent head 2ede447. Consider uploading reports for the commit 2ede447 to get more accurate results

@@            Coverage Diff             @@
##           master    #2386      +/-   ##
==========================================
- Coverage   78.52%   78.52%   -0.01%     
==========================================
  Files         316      316              
  Lines       68554    68549       -5     
==========================================
- Hits        53830    53825       -5     
  Misses      12925    12925              
  Partials     1799     1799              
Flag Coverage Δ
unittests 78.52% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
runtime/coverage.go 100.00% <100.00%> (ø)

... and 8 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea!

runtime/coverage.go Outdated Show resolved Hide resolved
@turbolent turbolent self-assigned this Mar 14, 2023
This is helpful when CoverageReport is used in a context such
as the Flow emulator.
@m-Peter m-Peter force-pushed the coverage-report-add-reset-method branch from 9736b17 to 2ede447 Compare March 14, 2023 20:33
@turbolent turbolent merged commit 2e80137 into onflow:master Mar 14, 2023
@m-Peter m-Peter deleted the coverage-report-add-reset-method branch March 25, 2023 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a way to reset a coverage report
2 participants