Integrate AzureDevOps and SonarQube?

Would it be possible to integrate SonarQube to Azure DevOps (nee VSTS). I mean this from the point of view that when you have bugs in SonarQube, it would be a huge benefit to automatically create a work item in Azure DevOps, so they can be included on the products backlog. Once those are actioned, either closed with no action or fixed, it could then update SonarQube accordingly so they don’t get reported again.

At the moment I think that process is manual. But if you store your code in Azure Repo or GitHub then it could create a work item and link directly to the code in question. Creating a full end to end process.

Hi,

This question has been asked many times in a Jira context. We generally feel that such integrations are a Bad Idea. Your example of issues that eventually get marked FP/WF is a chief example of this. There’s no point in creating the work ticket at all if after examining the code you decide you won’t address it. Similarly, there are often issues that can be fixed in sets and that would correspond to an individual work ticket. It would be spam to create a work ticket for each one.

So to answer your questions, we won’t do this integration, and we won’t create the APIs that would be needed to do it.

 
Ann

1 Like

Hi Ann,

Thanks for the quick reply.

I agree that it’s not an idea to spam the backlog with unconfirmed issues. However, once you have looked at the error in Sonar and confirm that it’s an issue, it would be useful to push that to the work items to track. We have all the details we need in Sonar, it would save time replicating those details in a different tool.

So it would be an automation in terms of creating the ticket, but not when the ticket is generated…if that makes sense.

Thanks, Andrew.

How I would do it is to first analyze every single issue and see which ones needs code fix. The one which do, tag them within SonarQube with something like “needs-codefix”. Once this analysis is complete, export all such tagged issues using WebAPI, convert json to xls and attach that xls to a ticket.

Hello Andrew,

I would like provide some information for your question. Check out the below link.