SonarSource / sonar-dotnet

Code analyzer for C# and VB.NET projects
https://redirect.sonarsource.com/plugins/csharp.html
GNU Lesser General Public License v3.0
781 stars 226 forks source link

CodeCoverage: Custom [ExcludeFromCoverage] attributes are ignored on SonarCloud #9588

Open martin-strecker-sonarsource opened 2 months ago

martin-strecker-sonarsource commented 2 months ago

When we tried to introduce the [CodeCopiedFrom] attribute in #8947 we faced an issue that the code,

was still reported as not covered by SonarCloud. There seems to be something wrong with exclusion handling on the coverage importer.

Steps to reproduce

Expected behavior

The code is excluded from coverage on SC

Actual behavior

The code is shown as not covered by tests on SC