SonarCloud not picking up duplication exclusions

Hi,

Welcome to the community!

Are any of your exclusions working?

First, SonarQube.Analysis.xml isn’t meant to be project-level but in the scanner directory, and applied to all projects. So I suspect it’s not being read at all.

Second, you shouldn’t need to specify sonar.sources and sonar.tests when using the SonarScanner for .NET; those values are read from your project automatically.

Third, while it’s possibly different in this context, exclusions values are typically comma-delimited lists. I suspect that if this file is being read, your exclusions are being taking as one value each.

Anything set at the analysis level would override what’s set via the UI.

Can you provide your analysis log? That will help understand what values analysis is getting.

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann