Limit sonarcloud analysis to only part of the repo in a monorepo

  • ALM used : Azure DevOps

  • CI system used :Azure DevOps

  • Scanner command used when applicable : SonarCloudAnalyze@1

  • Steps to reproduce : In a monorepo, make an azure pipeline that triggers on only part of the repo with help of trigger/paths/include, and ensure sonar only analyzes only that specific part of repo

Any advice on possible workarounds would be highly appreciated

Hi @sme

Which language are you analyzing ?

I would suggest to check that documentation where you can narrow the scope of the analysis by setting some properties :


Thanks a lot for the very useful link.
I’m using python.
The confusion started by not having the possibility of setting sonar.sources and sonar.tests from UI. It makes a lot of sense to me that these 2 options are accessible in UI if the project is set up as monorepo.

Yes you’re right those are not currently settable in the UI.