Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SonarQube - Using wildcards to ignore all xml files

Tags:

sonarqube

I have confused on SonarQube's wildcards usage. Say I want to ignore all xml files. Should I just put *.xml in the Global Source File Exclusions? But will it ignore xml files in different layers, for instance /foo/bar/file.xml and /foo/bar/folder/folder2/xml?

like image 543
mrQWERTY Avatar asked Jul 29 '14 14:07

mrQWERTY


1 Answers

In your sonar-project.properties, you have two ways to ignore files:

  • sonar.exclusions=the/full/path/*.xml will ignore all .xml files in path.
  • sonar.exclusions=**/*.xml will ignore all .xml files in the folder and sub-folders where you are.

Here are the different wildcards:

*    zero or more characters
**   zero or more directories
?    a single character

You can find more information on Sonar Documentation

like image 143
Jean-Baptiste Martin Avatar answered Jan 03 '23 21:01

Jean-Baptiste Martin