SonarQube VSTS Pull Request commenting

31 views
Skip to first unread message

abdullahk...@gmail.com

unread,
May 3, 2018, 9:09:31 AM5/3/18
to SonarQube

Hi All, 


VSTS PR commenting is not working as expected. I am using SonarQube extension v3 in vsts and latest version of SonarQube which is 7.1. Vsts extension is talking to SonarQube perfectly fine, PR comments are coming through as well. In an ideal scenario you would look into your PR and see comments and fix issues and push your changes to your remote branch and build would be triggered again. I have got 37 comments on my PR and as soon as second build with only one fix triggered, it resolves all of the comments. I think there must be a bug. Second build says 0 new messages. It looks like doing nothing at all but resolves all the comments. To reproduce, cerate a PR with some bugs, make sure more than one. VSTS extension 3 should comment on PR. Go back to Visual studio and fix one of the issues and leave the other one. Push changes back to your PR and see build triggered again. Extension will mark all comments as resolved although you have fixed only one issue.


Second issue is, if you run analysis on a SonarQube project, it wont consider PR comments next time when you build it. To reproduce, send a pr and run sonarqube analysis as part of PR. Make sure you can see analysis on SonarQube dashboard. Abondon that PR and create another PR with same changes. VSTS Extension version 3 supposed to comment on PR in this case but it does not. I kind of think that these 2 issues are related to one another.


As a hacky solution to these, I put datetime next to project name and create new sonarqube project each time when I trigger the build. This way each time I get a brand new analysis whithout history and it works fine but obviously I am loosing ability to say wont fix, false positive etc.


I have already created this on visual studio dev community but they think it belongs to this group. 


https://developercommunity.visualstudio.com/content/problem/242599/sonarqube-vsts-pull-request-commenting.html


Best regards.

Reply all
Reply to author
Forward
0 new messages