SonarQube Branch Analysis

I configured a project in SonarQube to define new code based on a reference branch (master).
This is the error log I’m getting, and SQ doesn’t return any new code

INFO: Computing New Code since fork with 'master'
WARN: Could not find ref 'master' in refs/heads, refs/remotes, refs/remotes/upstream or refs/remotes/origin
WARN: Branch 'master' not found in git
WARN: Failed to detect fork date. No New Code will be computed.

Sonarqube version: Developer Edition * Version 8.9.7
I’m running the scan from Jenkins

Hi,

Welcome to the community!

I searched on your error message:

And found this, which might be helpful:

 
HTH,
Ann

Hi, in your case, most likely the branch is not available in the clone. When cloning the repo, make sure all branches are cloned (don’t use something like --single-branch).