-
Notifications
You must be signed in to change notification settings - Fork 389
Include doesn't seem to work #183
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
Comments
Maybe related to #122 btw? |
Hi @rvanmaanen, thanks for reporting this. I'm actually in the process of revamping the include/exclude capabilities of Coverlet. Will have some new updates within the week |
@rvanmaanen I tested this and |
Hi, sorry for the delay! Here is a repo containing an example: https://github.com/rvanmaanen/CoverletIncludeIssues |
Is there a reason exclude takes precedence over include? Something like the following could be useful: exclude everything and then include what you want?
|
@rvanmaanen no particular reason, it's just by design. I took into consideration that everything is included by default and most users would typically want to start out in that default state |
Hi are there any updates on the /p:Include= functionality? It doesn't work for me either and I'm using terminal on a mac. |
I'm having the same problem: /p:Include is not working. |
Same problem here. @tonerdo Might it be that the msbuild targets do not include the |
@MortenChristiansen thanks for pointing that out! |
this bug is solved I did a test with last version 2.7.0 and this is my result of repro.
I'm going to close...feel free to reopen if needed. |
Using the NuGet integration (haven't tried the global tool), I want to be able to include only the coverage from the project I'm unit testing.
I have multiple projects and multiple test projects:
When I generate coverage for the "StackState.Monitor.UnitTests" project, without specifying any include or exclude filters, the result is this:
+---------------------------+--------+--------+--------+ | Module | Line | Branch | Method | +---------------------------+--------+--------+--------+ | StackState.Core | 0,4% | 0% | 0,7% | +---------------------------+--------+--------+--------+ | StackState.Core.UnitTests | 4,4% | 0% | 6,8% | +---------------------------+--------+--------+--------+ | StackState.Monitor | 37,6% | 21,7% | 56,5% | +---------------------------+--------+--------+--------+
When I add "/p:Exclude="[StackState.Core*]*"", the result is:
+--------------------+--------+--------+--------+ | Module | Line | Branch | Method | +--------------------+--------+--------+--------+ | StackState.Monitor | 37,6% | 21,7% | 56,5% | +--------------------+--------+--------+--------+
The above is actually what I want, but I want to get this result by INcluding the one project that 1 want coverage for and not EXcluding everything else. Besides that it's cumbersome, it's also currently not possible to do from a PowerShell window: #182. Anyway, changing the parameter to "/p:Include="[StackState.Monitor*]*"" results again in:
+---------------------------+--------+--------+--------+ | Module | Line | Branch | Method | +---------------------------+--------+--------+--------+ | StackState.Core | 0,4% | 0% | 0,7% | +---------------------------+--------+--------+--------+ | StackState.Core.UnitTests | 4,4% | 0% | 6,8% | +---------------------------+--------+--------+--------+ | StackState.Monitor | 37,6% | 21,7% | 56,5% | +---------------------------+--------+--------+--------+
Either I'm doing something wrong, or the include setting doesn't seem to work.
So why is this an issue at all? I'm trying to get Coverage Gutters working together with Coverlet, but when Code Gutters finds multiple coverage files with overlapping values it seems to pick the last one and not combine the data. As combining coverage results isn't possible yet with Coverlet as well, this seems to be my only way out.
The text was updated successfully, but these errors were encountered: