I’m using SonarCloud and have created a PR on my source code which it has analyzed. It returns that I have added 36 lines of code (none of which are covered) and that it fails the Coverage rule of my quality gate. However, the code are all changes to a C# class that is decorated with the [ExcludeFromCodeCoverage] attribute, and this works on other similar projects. As far as I can see there are no relevant differences between the projects.
My questions:
- Should the SonarCloud coverage honor this attribute?
- If so, what might be different between the projects that it is ignored in one, and correctly regarded in another project?