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

CalculateCoverage: Fix file not foundexception #11

Merged
merged 2 commits into from Mar 24, 2018

Conversation

sbalant
Copy link

@sbalant sbalant commented Mar 23, 2018

Check if the file HitsFilePath exists

--
I have the same issue as #8
This simple check fix my problem

Check if the file HitsFilePath exists
@coveralls
Copy link

coveralls commented Mar 23, 2018

Pull Request Test Coverage Report for Build #21

  • 0 of 0 (NaN%) changed or added relevant lines in 0 files are covered.
  • 7 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.04%) to 83.106%

Files with Coverage Reduction New Missed Lines %
/src/coverlet.core/Coverage.cs 7 35.71%
Totals Coverage Status
Change from base Build #18: -0.04%
Covered Lines: 305
Relevant Lines: 367

💛 - Coveralls

@tonerdo
Copy link
Collaborator

tonerdo commented Mar 23, 2018

Hi @sbalant, thanks for your contribution. I have some thoughts:

This approach just ignores the problem and it's not obvious to the user that something went wrong. A better approach will be to figure out why that error is even being thrown in the first place and try to prevent that. Possibly the file isn't being created in the first place? (https://github.com/tonerdo/coverlet/blob/master/src/coverlet.core/CoverageTracker.cs#L31)

@tonerdo
Copy link
Collaborator

tonerdo commented Mar 24, 2018

@sbalant on second thought I'll have this PR now, that line should fix things when paired with #14. Before I merge though I notice your commits are not connected to your profile and as a result your contributions won't reflect. Are you fine with this?

@sbalant
Copy link
Author

sbalant commented Mar 24, 2018

No problem ;)

@tonerdo tonerdo merged commit 2844fe3 into coverlet-coverage:master Mar 24, 2018
@StillLearnin
Copy link

Any idea when this will be released to Nuget. I'm hitting this issue also.

@tonerdo
Copy link
Collaborator

tonerdo commented Mar 24, 2018

@StillLearnin new NuGet package before Monday

@StillLearnin
Copy link

Splendid! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants