Exclusions not excluding all files


I am using SonarCloud with Azure DevOps, I have set this exclusion in the Prepare Analysis Configuration step to sonar.exclusions=**/*.xml

The number of Xml lines included in the report has in fact dropped yet there are still a few large Xml files included. What I have noticed is that these remaining Xml files are all in the NUnit project, nevertheless the rule should have excluded them.

Any ideas of what is going wrong here?


Hi @alexvaccaro

Would it be possible to have the log of your analysis, possibly in debug mode please ?

It’ll help us for troubleshooting purposes.

Thanks in advance.

standard log attached sonarcloud_analysis.log (73.9 KB)

I can’t see an option for enabling debug in the Run Code Analysis task, or do you mean running the build with Enable system diagnostics enabled?

You can add the pipeline variable “system.debug” with the true value, that should work.

1 Like

Here’s the log in debug mode sonarcloud_analysis_2.log (1.2 MB)

Ok i think i get it.

The nunit project you have as been categorized as a test project (this is the expected behavior), so anything you would exclude from test project/files should be added in this property :


Can you give it a try and tell me how it went ?

You can read more about these properties in that documentation :


Hi @mickaelcaro, that worked, thanks.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.