-
Notifications
You must be signed in to change notification settings - Fork 388
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
Fix SkipAutoProps to work for records as well. #1139
Comments
I don't believe it's related to records. I've think I've seen this happen for non-record properties that have inline assignments. |
Thanks for reporting this, maybe it's not related to records but to inline init. |
The same goes for one-line declarations like |
I created a repro for this: https://github.com/Malivil/Coverlet1139Repro If you add tests that instantiate the uncovered records and class then it all shows as covered but since SkipAutoProps is enabled those should be ignored, right? |
The SkipAutoProps should make those tests unnecessary, yes. I noticed that your repo is using coverlet.msbuild while we use coverlet.collector. Therefore, it seems like the issue is more internal rather than in just one of the collection methods. |
Yea, that's generally the case. The interior logic is the same regardless of collector method |
I will work on this. |
I analyzed this and would suggest we make another issue for the one-line declarations record. There are two issues here, |
I analyzed this a bit more and did both in one PR #1159. |
It's ok...every ref object inherits from |
Yes thanks. I guess whats new for records is that the inheritance from |
I see that the PR got merged. What's the turn around time for release? |
AFAIK there is no fixed time. Looking at the changelog I would assume we are close to the next release. In the meantime you can consume the nightly https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/ConsumeNightlyBuild.md |
I'm still experiencing that autoprops like these in records are still counting against coverage even though SkipAutoProps is set to true.
I originally was under the impression that #328 would fix it for both classes and records; however, I was told to open this new issue since it doesn't. Please fix so that we don't have to keep manually exclude them via the [ExcludedFroCodeCoverage] attribute.
The text was updated successfully, but these errors were encountered: