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
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