Template for a good new topic, formatted with Markdown:
CI system used
Scanner command used when applicable (private details masked)
What is the correct procedure for setting up a monorepo? So far I have
imported our main repo at the point of registering for SonarCloud.
I’ve then selected this as the source repo for some additional monorepo projects.
I’ve then created new keys and names for those project, that then appear in the project list. (however, if I look in the settings for the project the toggle control for Enable support for monorepo, this is off)
I follow the steps in ‘configure analysis’.
I’ve set the key and name specified into the devops pipeline, but i still get analysis for the entire repo?
Also I have been following the steps on Monorepo Support | SonarCloud Docs, which has some CI specific links at the bottom of the page, but these just seem to be circular links back to the current page.
Would I be right in saying that the monorepo support is essentially the ability to point more than one SonarCloud project at the same repo, and that the scoping of what is analyzed in those sub projects, is down to setting the right analysis scopes via the existing config mechanism in the constituent projects?
Yes – monorepo support ensures that when multiple SonarCloud analyses happen in the context of a single repo (with mutliple SonarCloud projects), the results don’t overwrite each other. It is still up to you, for each individual project analysis, to make sure that the analysis is scoped to only the relevant files.