2

I got asked today to explain the difference between sonar.global.exclusions and sonar.global.test.exclusions tags. According to the documentation found at http://docs.sonarqube.org/display/SONAR/Narrowing+the+Focus

the difference should be:

  • sonar.global.exclusions - to exclude source code files
  • sonar.global.test.exclusions - to exclude unit test files

Are unit test files not excluded when pattern is only set in the global.exclusions? Are there any other differences between the scope of these two tags?

sonarqube 5.2

G. Ann - SonarSource Team
  • 22,346
  • 4
  • 40
  • 76
P. Jetzer
  • 23
  • 5

1 Answers1

1

Tests and Sources are treated as different kinds of thing in SonarQube. That's why you have different parameters to specify their locations

sonar.sources
sonar.tests

and why you have different properties to specify their exclusions.

Note also the difference between sonar.global.exclusions and sonar.exclusions. The former will apply to all projects, the latter only to the project on which it's set.

G. Ann - SonarSource Team
  • 22,346
  • 4
  • 40
  • 76