# Code coverage on branches does not break quality gate

**URL:** <https://community.sonarsource.com/t/code-coverage-on-branches-does-not-break-quality-gate/9042>\
**Category:** SonarQube Server / Community Build\
**Tags:** branches, jacoco, coverage, java\
**Created:** [April 23, 2019, 8:55am UTC](https://community.sonarsource.com/t/code-coverage-on-branches-does-not-break-quality-gate/9042 "2019-04-23T08:55:28Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![Christophe](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/christophe/32/3683_2.png) [@Christophe](https://community.sonarsource.com/u/Christophe)\
**Post date:** [May 3, 2019, 7:54am UTC](https://community.sonarsource.com/t/code-coverage-on-branches-does-not-break-quality-gate/9042/13 "2019-05-03T07:54:58Z")

</div>

Hi,

I think we have the same issue ([No coverage on short-lived branches](https://community.sonarsource.com/t/no-coverage-on-short-lived-branches/9237)), I will drop my thread and paste its content here :

I am using Teamcity to build and analyse a C# project on Sonarcloud. As our project needs multiple repositories to build, we have disable SCM to avoid the _Not inside a Git work tree_ error related to Teamcity root workspace. The leak period is set on a fix date (beginning of the quarter).

Everything works fine on the master branch but for an unknown reason I have empty values in short-lived branches. It seems that the new code is not considered as new : when looking in a class, the code is not on yellow background as it is on the main branch.

Here are some screenshots of a projet created to demonstrate the issue:

Overview :

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/f/f6df79a4179f94496a8bdcad08db125abfc83637.png)

Code view :

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/2/2892aa6ed187806d976553987dc89a229cf05fd2.png)

Class detail (the ReturnNull method is newly added code):

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/d/d9f442e5d93c0b8ec1348d0c8c88794a8f271c4b.png)

---

_[View the full topic](https://community.sonarsource.com/t/code-coverage-on-branches-does-not-break-quality-gate/9042)._
