SonarCloud setup to analyse Unity project in CI

Hey guys,

I’m trying to set up sonarcloud to analyse a Unity project (C#) in GitHub using Circle CI.

It seemed before I signed up that sonarcloud would analyse C# projects hosted in GitHub out of the box, but I’ve thrown a whole day into trying to get it set up now and still to no avail.

I followed the steps to setup SonarCloud with Circle CI. It worked, but it’s saying that my master branch has no lines of code.

I’ve been trying to set up and install sonarqube manually in CI with a custom config for a while now and I feel like I’m getting nowhere.

Do you have any advice at all for using SonarCloud with Unity? or for analysing specifcally C# projects in Circle CI?


Hi @mattwills8 and welcome to the community !

C# projects needs to be analyzed with the SonarScanner for MSBuild (it uses a specific target mechanism which hooks up to the build), otherwise you won’t get any results.


@mattwills8 - any luck with Unity+Sonar?
I’m trying to scan Unity project recently - so far no luck, tried GitHub actions and local scan on my Macbook.
Thanks, Vitaly

Closing this. Duplicates How to scan C# Unity code on Mac?