Main branch is not getting scanned in sonarcloud

  • ALM used - Bitbucket Cloud
  • CI system used - Bitbucket Cloud
  • Scanner command used when applicable (private details masked)
  • Languages of the repository - Python

we have below pipeline created in bitbucket cloud for sonarcloud, In the PR request we see codes were merged to “main” branch but still there is no stats in sonarcloud scan
““main” branch has not been analyzed yet and you have multiple branches already. It looks like it is not your Main Branch, check your configuration.”

pipelines:
  custom:
    scan:
      - step: *security-scan
      - step: *scan-sonarcloud
      - step: *check-quality-gate-sonarcloud

  pull-requests:
    "{feature/*,bugfix/*,hotfix/*,*}":
      - parallel:
        - step: *scan-sonarcloud
        - step: *security-scan
      - step: *check-quality-gate-sonarcloud
    develop/*:
      - parallel:
        - step: *scan-sonarcloud
        - step: *security-scan
      - step: *check-quality-gate-sonarcloud
    main:
      - parallel:
        - step: *scan-sonarcloud
        - step: *security-scan
      - step: *check-quality-gate-sonarcloud

Hi,

Welcome to the community!

I suggest you start by checking your job logs to see what actually is running in your pipeline.

 
HTH,
Ann