-
Notifications
You must be signed in to change notification settings - Fork 386
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
Incorrect coverage - only one module detected #1322
Comments
Hi @klemmchr and thanks for reporting. I think this is a dup of #1262. The log shows
Coverlet skip by default all dlls that don't have a corresponding local source files. For source generators coverlet can't find the source file and thus skips the dll. However, by convention coverlet skips source files with the suffix So in your
to
and it should work. |
Thanks for the quick response, I did not expect that this is an issue related to source generators. I changed the file name and while the test itself now runs properly I get a source link error. This probably isn't related to this issue here but maybe you could give me a hint on what the resolution could be. Surely I could also create a new issue if this is desired. These are the changes I made and this is the failing test run. The stack trace is
I'm building the project with The repository contains three projects of which two are not really supported by Source Link or don't need them. |
OK this only happens with the |
When using the MSBuild collector I get an incorrect coverage result. Coverlet only detects one module while the test project references multiple projects that are being tested.
Here you can find a sample run that shows this issue. The project references can be found here.
The text was updated successfully, but these errors were encountered: