SonarQube Exclude a directory

前端 未结 13 898
失恋的感觉
失恋的感觉 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:06

    add this line to your sonar-project.properties file

    ex: sonar.exclusions=src/*.java be careful if you want to exclude a folder and inside the folder there is a file you must first exclude the files or add the files one by one for example imagine there is a folder like below:

    src/app.java src/controllers/home.java src/services/test.java

    you have to do this: sonar.exclusions=src/app.java,src/controllers/*.java,src/services/*.java

    It worked for me

提交回复
热议问题