Coverage on changes in short-living branches in SQ7 Developer Edition

200 views
Skip to first unread message

Eugene Dubrovka

unread,
Mar 14, 2018, 10:36:47 AM3/14/18
to SonarQube
Hi,

Subject is considered in the context of SonarQube 7.0 Developer Edition.

We are happy to have coverage on long living branches. But we lack coverage reports on short-living branches, especially on introduced changes. Builds in gitlab are broken if branch does not comply code smells limits for example but missing coverage does not break the build.

Part of the problem is that we have 1M lines of legacy code with extremely low coverage. Due to relation model we use with our developers we have to provide them with information about code coverage on their changes up front, before merge request will be completed. Yes, we can get code coverage on new code after we have merged short-living branch, but this is still cumbersome and requires lost of clicking.

I have found more that a half year old thread on SO with Ann offering a solution and mentioning plans but that for version before 7.0.

Searching documentation did not help. Developer Cockpit plugin is deprecated and not available for SQ7.0 Developer Edition.

Do we miss something in our setup to make such feature if it exists to work for us? If it is not available whether there is any plans to introduce it?

Looks like this can be implemented by combining JGit with parsed jacoco.exec report. Since we have current state of the branch and it's upstream so we can calculate the diff and match it against the coverage report. Cannot tell anything about the way the results can be displayed.

BR, Eugene

// P.S Ann, sorry for raising old topic.

G. Ann Campbell

unread,
Mar 14, 2018, 10:47:18 AM3/14/18
to SonarQube
Hi Eugene,

Thanks for starting a new thread in a modern context. ;-)

The SO answer you found does defer the question to "robust branch support". We've made a good start on that topic, but we're not where we want to be yet. We do plan to add metrics (coverage and duplications) to short-lived branches "soon", but that's not scheduled yet.

So no, you're not missing anything. 


Ann

Eugene Dubrovka

unread,
Mar 14, 2018, 10:52:54 AM3/14/18
to SonarQube
Hi Ann,

Thank you for update! 
Subscribed to your JIRA, looking forward to updates.
Reply all
Reply to author
Forward
0 new messages