One PR with multiple Sonar projects: PR decoration are erased by the last sonar analysis


(Mounsif Ghaoui) #1


My configuration is the following:

  • Sonarcloud + Azure Devops
  • 1 Repository
  • 2 .Net solutions: Solution A & B
  • 2 Sonarcloud projects one for each .net solution: project A & B respectively for solution A & B
  • 2 Azure devops builds with sonar analysis, one for each .net solution

My issue: the PR is decorated only by the analysis of the last executed sonar project out of the two.
For instance:

  1. Project A analysis: issue 1 & 2
  2. Project B analysis: issue 3
  3. Lets assume project B analysis is completed after project A ones
  4. ==> Issue: the PR is decorated only by project B analysis and contains only issue 3

Thanks for your help.

(Benoit) #2


When a PR is decorated, existing issue are deleted and replaced by issues from the new analysis. There is currently no workaround for this.

I am not familiar with .Net so I don’t know what a ‘solution’ is, but I guess having only one project instead of 2 is not possible?


(Mounsif Ghaoui) #3

Thank you for your prompt reply.

Solution A: desktop application
Solution B: rest api used by the desktop application

Each solution is a set of .net projects.

Having one sonar project is also a solution but we needs to reconsider the CI jobs for 10 teams. I wanted to be sure that this behavior is a limitation/design issue and not a miss-configuration of sonar tools.