I didn't see all file in Sonar Cloud while I'm doing code analysis in another branch(not master)

Hello,
I didn’t see all files in Sonar Cloud while I’m doing code analysis in another branch(not master)
I want to code analysis for …/src
My src file content 6 another code files (.c extension)
I’m doing code analysis with sonar-scanner and build-wrapper in another brach
My branch name in sonar-project.properties file
sonar.branch.name = sonar_local_test
I have not errros during analysis.
But I didn’t see all files in Sonar Cloud ( I can see only 4 files in src)
Also code analysis is working correctly in master (branch)
I had a question before but nobody responded

What is the problem?
I am your customer at SonarCloud so I want to use system effectively.

How can I fix this?
Thanks

What type of branch are you analyzing? If it’s supposed to be feature branch, then SonarCloud will analyze only the diff with the main branch. Given the name of your branch (sonar_local_test), SonarCloud will consider it is a feature branch.
If you want the big picture of the quality of the branch, then you should tell SonarCloud that this branch is a long-lived one (using the pattern in “Branches and PR” admin page of the project). If you change the pattern to match this branch as a long lived branch, note that you will have to delete the branch in SonarCloud before you re-analyse it.

Most of my branch types are long-lived branches.

I understand my problem now.

I will try as soon as possible and I’ll share result.

Thanks @Fabrice_Bellingard

1 Like