Shallow clone deteced during the analysis

  • Which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    9.6.1 Developer Edition

  • What are you trying to achieve
    I have a problem sending to Github the Quality Gate from PR Analysis.
    The SonarQube is sending the Overall Code status and not the New Code.

    I get this warning when the analysis had completed:
    “Shallow clone detected during the analysis. Some files will miss SCM information. This will affect features like auto-assignment of issues. Please configure your build to disable shallow clone.” But this is not a Shallow clone.

    I’m using the Bamboo CI to perform these tasks.

  • What have you tried so far to achieve this
    I’ve tried to follow the SCM Integration documentation, and to set the sonar.scm.provider but unsuccessful.

I think “shallow” clones are the default in Bamboo, and I’d refer to some Atlassian documentation on Bamboo/Git to figure out how to disable them.

Hi Colin,

Indeed “shallow” clones are the default in Bamboo, I’ve changed this configuration and the “shallow” warning stop to appear.

But when I try to analyze a PR in GitHub, SonarQube analyzes all code and sends the decoration about the Overall Code and not just the New Code. I followed the configuration in this link:
https://docs.sonarqube.org/latest/analysis/pull-request/