Sonar-scanner is not able to conduct full analysis of protected branch properly in case of active CI

This issue prevents our team from running full analysis of protected branch (e.g. “develop”) automatically.

We use the CircleCI Developer Hub - sonarsource/sonarcloud orb from CircleCI

The output of the scan is expected to be:
" INFO: Branch name: develop, type: short-lived "

but the actual result is:
" INFO: Pull request 2001 for merge into master from develop "

To reproduce:

  1. Merge non-protected feature branch into protected (e.g. “develop”) branch
  2. Log into CircleCI
  3. Open step “SonarCloud“ of the job corresponding to the workflow triggered by the merge of feature branch into develop branch
  4. Find the line below the following one: INFO: Organization key: organizationkey

Any way we can do a full scan on the protected branches?

Hi,

Welcome to the community!

Can you share your pipeline and analysis log?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann