We have specified in our
.runsettings a custom attribute to indicate which code should be ignored in Code Coverage reports on SonarCloud.
When excluding code using
[ApiController] it still gets flagged on SonarCloud for failing code coverage. However when using
[ExcludeFromCodeCoverage] that is setup in the exact same way it correctly exclude it from the analysis.
[ApiController] gets correctly ignored with the Visual Studio and Azure Pipelines reports.
Would appreciate any assistance.
Information about our setup:
- ALM used - Azure DevOps
- CI system used - Azure DevOps (YAML), and OpenCover for Code Coverage
- SonarCloud project is not public