-
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
Powershell with /p:ExcludeByFile do not works #122
Comments
I'd expect this to just work since you're using a regular globbing pattern. @ido-namely can you please take a look? Thanks |
Hi @hack2root, do you get an error or does it just not work? Is your issue similar to #182? |
I'm having same issue. Also I use <PropertyGroup>
<!-- Properties for code coverage -->
<CollectCoverage>true</CollectCoverage>
<CoverletOutputFormat>opencover</CoverletOutputFormat>
<ExcludeByFile>**/*.Designer.cs,**/*.g.cs,**/*.g.i.cs,**/*.generated.cs</ExcludeByFile>
</PropertyGroup> and this doesn't work too. I've tried solutions in #182 too, in powershell, cmd and bash. (in bash instead of using |
@SlowLogicBoy I'll like to know if you get an error or if you just notice that the files don't get excluded |
@tonerdo Files didn't get excluded, tried various patterns for these. |
|
So what am I supposed to do if I want to exclude some Migrations folder? Something like |
I'm a bit confused with the state of this. Does this also affect coverlet.exe and is the workaround to use absolute paths? |
I aslo note I think, that with absolute paths on windows its funny about the case of the drive letter and I need to exclude both d:\ and D:\ |
still not working on .net 3.1.411 |
Powershell script
By adding command
/p:ExcludeByFile=\"**/MyFun*.cs,**/*Test*.cs,**/*Exception*.cs,**/*Attribute*.cs\"
to& dotnet test --configuration Release --no-build Build.Tests /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
I manage to break generation of the report file, if I removes
/p:ExcludeByFile=\"...\"
everything worksI tried with no success:
/p:ExcludeByFile
just not workshttps://ci.appveyor.com/project/hack2root/build/build/1.0.0.222-master
https://ci.appveyor.com/project/hack2root/build/build/1.0.0.223-master
Why not to use SonarScanner format
/d:sonar.coverage.exclusions="**/MyFun*.cs,**/*Test*.cs,**/*Exception*.cs,**/*Attribute*.cs"
for
/p:ExcludeByFile
, for example:/p:ExcludeByFile="**/MyFun*.cs,**/*Test*.cs,**/*Exception*.cs,**/*Attribute*.cs"
My build script:
The text was updated successfully, but these errors were encountered: