28

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/**
Fatemeh Rostami
  • 1,047
  • 1
  • 15
  • 27

2 Answers2

45

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/**/*
Fatemeh Rostami
  • 1,047
  • 1
  • 15
  • 27
35

Look at the Inclusions/Exclusions Patterns documentation , and try this: sonar.exclusions=utility/Excel/**.

Note: pointing sonar.sources to the current directory is usually a mistake, you should point it to the actual directories which contain the sources (more details in Analysis Parameters).

Sven Tore
  • 967
  • 6
  • 29
Nicolas B.
  • 7,245
  • 17
  • 29