How can i change short lived branch to long lived branch

Hi,
this is a known problem when using sonar.branch.name != master for an initial scan.
See https://community.sonarsource.com/t/project-was-never-analyzed-when-analysing-on-sonarcloud-with-travis/511 for a similar posting.
Before using sonar.branch.name there has to be a project with a main branch (default = master), to be able to scan the changeset between the main branch and the feature branch.
The simple solution proposed by @Fabrice_Bellingard says the project has to be created first.
I’ve created a feature request via Sonarsource Enterprise support to catch that “error” and create the project automatically instead, before doing the scan for the feature branch.
Our workaround in Jenkins pipelines so far is to use the property sonar.branch.name only if branchname != master.

Regards,
Gilbert