Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SonarQube for .Net project, code coverage not excluding file marked with "ExcludeFromCodeCoverage"

I have a .Net project and I have recently integrated Sonar to measure the code coverage but the Coverage is very low compared to coverage that I see in DotCover. When I checked in details, found that SonarQube is still counting the C# classes marked with "ExcludeFromCodeCoverage" attributes for Code Coverage. Is there any setting that I need to update in SonarQube build?

like image 665
CHash_Mike Avatar asked Mar 03 '26 03:03

CHash_Mike


1 Answers

Thank you for investigating this issue. I can confirm that we do not take ExcludeFromCodeCoverage into account. Created a JIRA ticket for this: https://jira.sonarsource.com/browse/SONARCS-611

like image 121
Tamas Avatar answered Mar 05 '26 17:03

Tamas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!