-
Notifications
You must be signed in to change notification settings - Fork 382
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
Coverlet misreports inline functions coverage #1225
Comments
Thanks for reporting. |
OK this is really complicated. I looked into the IL and saw that the compiler is generating a second function for Coverlet is properly injecting the tracker in both functions but nevertheless they both never get called. Or at least for me it seems like this. When I look into the IL without Now when I look into the same IL with Maybe this is just because of the simple code example I'm using but I try to analyze this a bit more. Any information on this is highly welcome. |
I think that this is what From F# documentation:
I also see that
So based on that I would expect that there'd be no calls to the But I don't know what happens at the edge cases, like:
|
Thanks for the explanation. I currently don't have any idea how we could work around this. I can't find a way to map the |
OK I just got a response from the |
It looks like
Coverlet
misses theinline
directive on F# functions and reports zero coverage for such functions and methods:In this example above, many of the functions that I test use
unwrapHandler
but, zero coverage is returned.Another example:
![image](https://user-images.githubusercontent.com/1394391/133923747-5619ff17-df4f-40f1-9798-e4f6e2adf6ef.png)
Here we see that
valueCurry
is used within the same method, but it is still reported as untested.If I remove
inline
then it looks like:So, even in my simple case,
Coverlet
misses 6K+ passes and reports the code as untested.The text was updated successfully, but these errors were encountered: