SonarQube Exclude a directory

前端 未结 13 811
失恋的感觉
失恋的感觉 2020-12-23 02:43

I am trying to exclude a directory from being analyzed by Sonar. I have the following properties defined in my sonar-project.properties file:

so         


        
相关标签:
13条回答
  • 2020-12-23 03:19

    You can do the same with build.gradle

    sonarqube {
    properties {
        property "sonar.exclusions", "**/src/java/test/**/*.java"
      }
    }
    

    And if you want to exclude more files/directories then:

    sonarqube {
    properties {
        property "sonar.exclusions", "**/src/java/test/**/*.java, **/src/java/main/**/*.java"
      }
    }
    
    0 讨论(0)
提交回复
热议问题