How to make Sonarqube exclude a .NET (C#) project from coverage measures

前端 未结 6 1165
Happy的楠姐
Happy的楠姐 2021-02-05 14:07

Sonarqube allows for individual files to be excluded from code coverage by adding patterns in the sonar.coverage.exclusions key. This can be done on a project level by

6条回答
  •  遥遥无期
    2021-02-05 15:08

    Summing up the above mentioned answers and also adding one point to it.

    1. To exclude a project from SonarQube Analysis from csproj we can achieve by adding the below code in .csproj of that project

      
      
      true
      
      
    2. To exclude a file from a project

       
       
       **/FileName.cs
       
       
      
    3. And for multiple files

      
      
      **/FileName1.cs, **/FileName2.cs
      
      
      

    Also can refer this for regex patterns used

提交回复
热议问题