We’ve recently started using a monorepo setup with SonarQube, and while everything seems to work fine in generating multiple reports per PR, we’re facing an issue with Bitbucket’s Code Insights.
Before moving to the monorepo configuration, each PR had a single report with a consistent Report Key: com.sonarsource.sonarqube. However, after the change, each report now generates with a random string appended to the key, like: com.sonarsource.sonarqube_aymr5t9hblbxj-71x-tt, for each project or module within the monorepo.
This random key generation breaks our Bitbucket Code Insights integration because it expects a consistent report key (com.sonarsource.sonarqube) to show the insights.
NOTE: The monorepo setup is simple, multiple projects are linked to the same repo. Monorepo setting is enabled. Then when doing scans via docker it’s all the same, we’re passing a project key per repo to scan.
Thanks, Colin! I was mainly focused on the monorepo documentation. It would be great to have all the monorepo limitations listed in one place within the documentation. Anyway, thanks!