Prevent SonarQube from adding comments to Gitlab MergeRequest

  • which version are you using: SonarQube 9.9
  • how is SonarQube deployed: zip


we use SonarQube to analyze several projects in a Gitlab monorepo. When a merge request is analysed, Sonar adds a comment for each project to the gitlab merge request. This leads to having 7 blocks of mostly irrelevant information as comments and a lot of scrolling. In addition, each comment triggers a notification per mail, which is useful for relevant comments, but not for those added by Sonar. This is considered as spam by the developers and leads to important information getting missed.

The only relevant information in our case is, if all projects passed the Quality Gate and if not, which of them didn’t. How can we stop Sonar from adding these comments?



Hey there.

It’s not possible to turn off these comments. I’ve moved your post to our “Product Manager for a Day” section.

I’m curious – in the context of a monorepo (and these 7 projects), would be better if, for example, only one comment was sent for all 7 projects? Would you still consider it noisy?

Hi Colin,

thanks for your reply.

One comment with a summary would be ok, still it should be smaller than the current comment block.
Maybe it could be made optional to have a detailed or a short comment.

Is there a workaround to prevent SonarQube from adding these comments by restricting Gitlab Permissions?


You can remove any comments from being added whatsoever by removing the DevOps Platform Integration in your project settings.

Restricting permissions would result in an analysis warning on each pull request because it was unsuccessfully decorating the PR.

Thanks! When removing the integration we probably loose some other functionality as well, right?
Can you please tell me, what else would change apart from the comments, when I remove the DevOps Platform Integration?

For Gitlab, nothing. The integration is limited to the comment.