Branch Created From Master Does Not Show Bugs/Issues Which Are Shown In Master

  • master branch => Scanned and found 30 issues in master branch
    develop branch => Created develop branch from master and scanned the develop branch then issues reported in master branch were not reported in develop branch.
    It seems like sonar scanner is only scanning new code.
  • ALM used Bitbucket Cloud
  • CI system used Bitbucket Cloud
  • Scanned using bitbucket pipeline
  • Langugae used Javascript, Typescript


Indeed, in branches or PR only the new code is scanned and reported to SonarCloud.

You should treat your develop branch as a “long living branch”. You can change the long living branch pattern for your project here:

Thanks Gregoire for your reply.

I have created a branch called as “branch” from master but it still appears in short-lived branches. Ideally it should be shown under long-lived branches. According to the pattern if a branch name starts with “branch” or “release” then it should appear as long-lived branch.
Check out the sceenshot.


if you didn’t change the default sonar.branch.longLivedBranches.regex then
it’s (branch|release)-.* which means ‘branch’ is correctly handled as short-lived branch.


1 Like

I am facing the same issue , the sonar dashboard always shows master branch even when I am running analysis on another branch. Were you able to resolve this?