SonarCloud overwrites "WontFix" status on PR issues

The situation:

  • An Azure DevOps build pipeline is triggered for a pull request
  • SonarCloud finds an issue, and adds a comment in the pull request
  • The developers discuss the comment and decide to mark it as “WontFix”
  • Another build is triggered for the same pull request
  • SonarCloud removes the comment that was marked as “WontFix” and adds it as “Active” again

After several builds we notice people getting annoyed by seeing the same issue pop up again that they already marked as “WontFix” several times before. I’m wondering how other developer teams deal with this.

I believe I have seen SonarCloud “read” the comment status from Azure DevOps upon a PR analysis before. Can’t it leave a reported issue intact and just take over its status?

Hi Sebastian,

For now, the communication between SonarCloud and Azure DevOps is only one-way, from SonarCloud to Azure DevOps.
Hence, if you change the status of a comment in Azure Devops, it will be not reflected on SonarCloud side, this is the reason why, as new builds a rebuilding the comment thread entirely, theses changes are not saved and got back into their initial status.

As a workaround, we can propose you to change the status on SonarCloud side, they will be reflected on Azure DevOps, preventing the erase of current thread and comment status.

Mickaël