Report multiple sonar projects to GitHub pull request checks


We use Sonarcloud to analyze multi-module Gradle project. It has structure close to the following:

On SonarCloud UI we have different projects for each module with project-keys like:

When we create GitHub pull request, GitHub checks show report only for one (i suppose latest) module. Other are ignored.

We execute Sonar analysis via the Gradle plugin for each module during the CI build.

It would be good to have in GitHub decoration report for each module. Is this possible?


Also one more question. In case multi-report to GitHub pull request is not possible, how can I setup Sonar Gradle plugin to aggregate reports from modules to one Sonar project?

We’re aware of this issue: there must be one SonarCloud analysis per GitHub repo, if there are more than per repo, we are not yet able to aggregate them. This is on our radars, but it won’t happen very soon.

The way to go is to run a single SonarCloud analysis for the entire repo. And this is certainly possible, because we do the same in multi-module gradle projects at SonarSource. I suggest to look into the documentation of the Gradle scanner. You may get inspiration from how we did it for the sonarqube project.

Thanks, Janos! Appreciate your help.