javaspringsonarqubesonarqube-web

How to exclude directory from SonarQube analysis?


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! :)


Solution

  • Try one of these:

    sonar.exclusions=**/static/**

    Or Full path before static e.g. :

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