4

I am running Spring Boot project which I want to analyze with SonarQube.

in a ~/static/~ folder I have libs (boostrap and JS) that I want to exclude from analyze.

I have tried both ways:

  1. Setting up project-sonar.properties file with sonar.exclusions=**/static/**/*

  2. Going from Sonar project local web to Coverage Exlusions also setting sonar.exclusions=**/static/**/*

But none of the ways seem to be working for me.

I would appreciate any help! :)

yoozer8
  • 7,361
  • 7
  • 58
  • 93
Pavel
  • 105
  • 1
  • 1
  • 9

2 Answers2

6

Try one of these:

sonar.exclusions=**/static/**

Or Full path before static e.g. :

sonar.exclusions=/put/your/full/path/static/**

amer
  • 1,528
  • 1
  • 14
  • 22
  • Does it matter where sonar-project.properties file is placed? I mean I have tried to place it almost everywhere. – Pavel Dec 27 '19 at 14:54
  • 1
    Where is it placed ? Place it in the root folder where `settings.gradle` or `README` for example are. – amer Dec 27 '19 at 14:58
1

You could refer this which is more or less the same question posted by you. Hope that would be helpful.

Nikitha
  • 9
  • 6