'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 1:[1]
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/**/*
Solution 2:[2]
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).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Fatemeh Rostami |
Solution 2 | Sven Tore |