Code coverage on branches does not break quality gate

Hi,

I think we have the same issue (No coverage on short-lived branches), 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 :

Code view :

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

1 Like