Full code coverage for branch

Hello,
I am using sonarqube Enterprise Edition Version 8.0 (build 29455).
I created a branch and run sonarqube, it only did partial of code coverage like 100 lines. but the master has a coverage of 5k lines of code.

how can I make the SonarQube support the FULL code coverage for branch?
thanks.

Hi,

Did you create a short-lived branch or a long-lived branch? For the former, only code that’s new in the branch is handled.

And BTW we’ve made a lot of advancements since 8.0. I urge you to upgrade to the latest at your earliest convenience.

 
Ann

Hi Ann,
Thanks. I checked sonar, and it looks that they are short-lived branch. how to create long-lived branch?
Thanks so much for your suggestion about the update.
Wayne

Hi,

If you omit the sonar.branch.target parameter, you should get a long-lived branch. (8.0 docs)

 
HTH,
Ann

@ganncamp thanks for the help, for the long-lived branch, will it be there forever, or is there a way to delete them automatically, like setting up a time to expire? thanks

Hi,

You have to clean out Long-lived branches manually.

And again, 8.0 has some age on it at this point. 8.8 is due any minute and we’ve made strides in our handling of branches & PRs since 8.0. You should upgrade at your earliest convenience; you’ll find the PR experience greatly enhanced. And since PRs are cleaned up automatically it may handle what you need with the least amount of effort.

 
HTH,
Ann