How the analysis of a Pull request analysis happened with SoanrCloud?

Template for a good new topic, formatted with Markdown:

  • ALM used (GitHub, Bitbucket Cloud, Azure DevOps) Bitbucket
  • CI system used (Bitbucket Cloud, Azure DevOps, Travis CI, Circle CI ) Bitbucket cloud
  • Scanner command used when applicable (private details masked) added it in the pom file as plugin
  • Languages of the repository Java
  • Only if the SonarCloud project is public, the URL
    • And if you need help with pull request decoration, then the URL to the PR too
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
  • Steps to reproduce
  • Potential workaround

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

I would like to understand the analysis of a pull request and how it happened. In the official docs, it said that it analyses only new code added but I see that the analysis happened on all the class and it displays errors from old code.
Is there a way t oconfigure sonarcloud to focus only on the new code other than the other errors?


This is what should be happening by default. If PR analysis is reporting issues on old code, then it’s typically a problem with collecting SCM information. Either that, or the branch being targeted by the PR wasn’t available in the local repository.