How do I configure long running branches on our repo?

Template for a good new topic, formatted with Markdown:

  • ALM used: Github
  • CI system used: Circle CI
  • Languages of the repository: 99% Kotlin 1% XML
  • Only if the SonarCloud project is public, the URL

I am not seeing our release/ and feat/ branches show up in long running branches.


Screen Shot 2022-09-01 at 2.28.08 PM

We have 3 main branches that can be long-running branches

release/
feat/
develop

I see develop in our UI, but never release or feat. Release may look like

release/1.10.0

feat may look like feat/some-feature

I would like all of those branches to be analyzed.

Our branch regex is (feat|release).*

This seems to match in any online regex validator I use. What could be the issue? Thanks.

Hi,

Welcome to the community!

Are these other branches being analyzed at all? And if not, that’s really a pipeline configuration question.

 
HTH,
Ann

They are being run on PRs into those base branches (release/feat, etc), but they do not show as long running branches despite the config.

I tried something like this as well

(^release\/[0-9]+\.[0-9]+\.[0-9]+$|develop|^feat\/.*).*

which also did not work for release/1.10.0

Also my develop branch does get recognized as a long running branch and even analyzed.

Hey there.

There’s a distinction to be made between branch analysis (of which there is a distinction between short/long-lived branches) and pull request analysis (effectively a short-lived branch, can never be a long lived branch).

Where are your analyses showing up? In the Branches tab of your project, or Pull Requests?

Develop shows up on PRs and in the branch tab. All other branches only show the sonar analysis for PRs.

Am I not allowed to have multiple long-running branches? I am having no issues with sonar showing on any PR’s for any branch.

Hey there.

Stepping back a bit – you mentioned that CircleCI is the CI being used… but is it running the analysis? If Automatic Analysis is being used, you are limited to the main branch of your project and pull requests. If you want other long-lived branches scanned, you’ll need to switch to CI-based analysis.

We are using automatic analysis for now, not the CI type.

If Automatic Analysis is being used, you are limited to the main branch of your project and pull requests. If you want other long-lived branches scanned, you’ll need to switch to CI-based analysis.

Ah okay! That is the issue then, I was not aware of that. I had plans to switch to that. Thank you.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.