Default folder exclusion?

In my project I have a source file in the following path: /src/SheepTools.XUnit/Asssert.cs.

Opencover coverage for that file is successfully generated, but my SonarCloud project doesn’t include it within the files to cover or show the coverage of it.

I assume that it’s being excluded by default due to being in a folder that contains “XUnit”, but I couldn’t find any documentation about it. Am I correct? Which is the right way to force my project to consider the coverage of the files inside of it?

Original question.

Hi @eduherminio ,

I suggest that you read the wiki page about categorising test projects : https://github.com/SonarSource/sonar-scanner-msbuild/wiki/Analysis-of-product-projects-vs.-test-projects

In your case, you may be interested by the

 <SonarQubeTestProject>false</SonarQubeTestProject>

tag in the relevant csproj, to see if it fits your need.

HTH,
Mickaël

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.