Hi SonarQube Community,
How to include sonar qube exclusion in Data contracts having struct type in c#.
I have tried following things to achieve exclusion.
- Added following code in .csproj file
<ItemGroup>
<SonarQubeSetting Include="sonar.coverage.exclusions">
<Value>Filename.cs</Value>
</SonarQubeSetting>
</ItemGroup>
- Added [ExcludeFromCodeCoverage] attribute over struct.
[DataContracts]
[ExcludeFromCodeCoverage]
public struct Abc: IAbc
{}
Please can anyone help me with how to achieve sonarqube exclusion in such scenarios?