sonarqubesonar-runner

Directory excluding in sonar-project.properties file doesn't work (for me)


I have excluded the directory in my project properties but sonar doesn't exclude it. Can anyone help me to find problem?

sonar.sources=./ 
sonar.exclusions=./utility/Excel/**

Solution

  • I realized that first I should have written directory name Like below to exclude all folders and file on that directory:

     sonar.exclusions=utility/Excel/**/*
    

    Second I should have used comma separated directory names to exclude more than one directory:

     sonar.exclusions=utility/Excel/**/* , utility/mailer/**/*