Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude folder from analysis

I look through the Internet and tried a million diferent ways, but didn't find an answer.

Is there any way to exclude some folders with source files from the Sonar analysis, when I use maven to launch it (e.g. mvn sonar:sonar)?

like image 267
mr.nothing Avatar asked Feb 25 '13 10:02

mr.nothing


People also ask

What does it mean to exclude a folder?

If you trust a file, file type, folder, or a process that Windows Security has detected as malicious, you can stop Windows Security from alerting you or blocking the program by adding the file to the exclusions list. Caution: Only do this for files that you're confident are safe.

How do I exclude a folder in sonar scan?

Specifying an exclusion means that everything under your sonar. sources directory will be included in analysis except the files with paths that match your exclusion pattern. To use exclusions to analyze everything but the specified files, go to Project Settings > General Settings > Analysis Scope > Files.

How exclude folder from search VS code?

You can do this in the search section of vscode by pre-fixing an exclamation mark to each folder or file you want to exclude.


1 Answers

You can use the "sonar.exclusions" property to exclude source files using patterns: see http://docs.sonarqube.org/display/SONAR/Analysis+Parameters

like image 114
Fabrice - SonarSource Team Avatar answered Nov 10 '22 22:11

Fabrice - SonarSource Team