In short: please use the code coverage tool exclusion mechanisms when running the code coverage tool. If the coverage report will contain the entry, then our plugin will parse it and upload it to SonarQube.
I had found that issue but since we do not use coverlet and the excludefromcodecoverage attribute docs say that it works on method scope I assumed microsoft would honor their own attribute in their code coverage tooling… Apparently not. Thanks!
The remark might say class or struct but in any case the implementation is wrong IMO because the attribute does not have a restriction on class or struct only. Either microsoft should restrict the allowed attribute usage and prevent a user from placing the attribute in the wrong places, or they should follow the attribute allowed usage in their code coverage tooling.
But, it is what it is. And it is not a problem with sonarqube.