Excluding contents of a folder anywhere in directory tree from analysis in Sonar
<p>I have a ASP.net project that i need to run SonarQube analysis on and i have configured it with Jenkins to run the analysis. The analysis is running fine but it is including the bower_components and node_modules i have in the project. The way the project is structured there are multiple node_modules and bower_component folders in the projects folder structure. So i need to exclude them all in a pattern. I have added a <code>SonarQubeSetting</code> section to the .csproj file and i have the current values for exclusion.</p>

<pre><code>&lt;Target Name="BeforeBuild"&gt;
   &lt;ItemGroup&gt;
      &lt;SonarQubeSetting Include="sonar.exclusions"&gt;
          &lt;Value&gt;**\main-built.js,**\template-build.js,**\kendo*.js,**\bower_components\*,**\node_modules\*&lt;/Value&gt;    
      &lt;/SonarQubeSetting&gt;
   &lt;/ItemGroup&gt;
&lt;/Target&gt;
</code></pre>

<p>Using <code>**\bower_components\*</code> <code>**\node_modules\*</code> did not work and the libraries are still picked up and scanned. How can i exclude folder (in my case node_modules &amp; bower_components) content regardless of its location in the directory structure in sonar?</p>