coverlet-coverage / coverlet

Cross platform code coverage for .NET
MIT License
2.97k stars 386 forks source link

ExcludeFromCodeCoverageAttribute ignored on some types in nested class #279

Closed hughbe closed 4 years ago

hughbe commented 5 years ago

Steps:

dotnet tool install --global dotnet-reportgenerator-globaltool
git clone https://github.com/hughbe/wpf
cd wpf
git checkout coverlet
dotnet test ./src/Microsoft.DotNet.Wpf/test/System.Xaml /P:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=./coverage.xml /P:ExcludeByAttribute=ExcludeFromCodeCoverageAttribute
reportgenerator -reports:./coverage.xml -targetdir:./coverage

Expected

Actual

See for example 1495 of the coverage for XamlSchemaContext.cs image

SlowLogicBoy commented 5 years ago

Dupe of #269?

hughbe commented 5 years ago

I mean the first issue with IsReadOnly is probably the same as #269 but not sure about the enumerator?

SteveGilham commented 5 years ago

See also issue #129

MarcoRossignoli commented 4 years ago

close for dup, we track issue there https://github.com/tonerdo/coverlet/issues/279#issuecomment-449708572