Multi projectkey in single file

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) : Enterprise
  • how is SonarQube deployed: zip, Docker, Helm : On premises
  • what are you trying to achieve: We multi language (C++, C# ,TS) projects in single repository and we would like scan each projects separately and send scan result to different SonarQube projects. But we would like use single properties file at root.

For example:
├── path1
│ ├── src
│ └── test
├── path2
│ ├── src
│ └── test
├── path1
│ ├── src
│ └── test
├── path2
│ ├── src
│ └── test
#meta data…<SONAR_HOST_URL>
sonar.modules=mod,app #Example of modules

  • what have you tried so far to achieve this Our Ask:
  1. Can use multiple project key in single sonar-project.propertie files
  2. Does sonarqube modules approach best fit our use case?
  3. Any better suggestion do you have details our use case

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!


Welcome to the community!

What you’re after is monorepo analysis. You can do it, but you’ll need to set properties per SonarQube project. You can do that in (multiple!) properties files or on the analysis command line.

The module configuration you’ve outlined won’t do what you think. It will analyze all your modules as one, combined project.

Having said (written) that, having one properties file for the common values might not be a bad idea:

And then pass the other values, such as sonar.sources on the command line.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.