"Depth" of directories for analysis?


(Padmanabha Kamath) #1

While running the analysis, SonarQube is only analysing the root folder for each project to scan for .cs files. For instance,

|–D2 – F3.cs
|–D3 – F4.cs

After running SonarQube with this includion rule
sonar.inclusions =*.cs

only F1 and F2.cs files are analysed, FF3 and F4 are being ignored or passed over. Is there anything wrong with my inclusion rule ?

(G Ann Campbell) #2


Your inclusion is your problem. By default, analysis will check each directory, recursively, for files.


(Nicolas Bontoux) #3

To complement @ganncamp answer, note that if this is .Net code then you should be using the Scanner for MSBuild. The latter is tightly integrated with your Visual Studio project definition, and files analyzed are closely tied to files declared/built in your solution. (I suggest studying the above doc and reviewing logs if you wish to understand more in depth)