Compute New Code for branches using master as reference on tfvc

My company has recently upgraded from SonarQube Enterprise 7.9.2 to SonarQube Enterprise 8.9 LTS and the way branch analysis work has changed considerably. Now I want analysis on branches to use master as a reference, but I get the following warning during the analysis:

INFO: Computing New Code since fork with ‘master’
WARN: Failed to detect fork date. No New Code will be computed.

I have a TFVC repository and I have scm-tfvc v2.3.1 installed on SonarQube but I could find no way to have the branch analysis to work in a proper way as it used to be before the upgrade.

Using a base analysis on the branch level does not help as it gets “poisoned” by forward integrations that are performed - a situation that would not happen in the old version since branches would always compute towards the master baseline.


Hello @tiocalibe
welcome to the SonarSource community!

If I understand your report, the Reference Branch new code period is not working for projects hosted in a TFVC repository and SonarQube equipped with the scm-tfvc plugin?

The scm-tfvc plugin is not something SonarSource maintains or supports, but I’ve made a quick check in its code and it appears that it does not implement the forkDate() method that was added to the ScmProvider abstract class for the reference branch New Code period implementation in version 8.4. Here is the implementation.

You may want to reach out to the lg2de / sonar-scm-tfvc project team directly about this.

Best regards

1 Like

Hi @tiocalibe,
were you able to solve this?