PR analysis not working as worked before in sonar cloud

Template for a good new topic, formatted with Markdown:

  • ALM used (GitHub, Bitbucket Cloud, Azure DevOps)
  • CI system used (Bitbucket Cloud, Azure DevOps, Travis CI, Circle CI
  • Scanner command used when applicable (private details masked)
  • Languages of the repository
  • 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)!

Few days back sonar cloud analysis is working both in PUSH/PR events , we can see both in the same page and notifies through the bot(PR Decoration),
we changed the some configuration in analysis method for short lived branches.

By default it feature branch is compared to main branch but we changed to develop like below with the configuration like (sonar-scanner -Dsonar.branch.name=$BRANCH_NAME -Dsonar.branch.target=develop)

after this setting PR analysis results not showing in sonar cloud UI

But it was analyses and showing in GitHub

This work flow is used to trigger
image

Pls let me know the fix, Thank you.

Hi,

This is two different things. For short-lived branches, you should be looking in the Branches menu item.

 
HTH,
Ann

can u pls elaborate here, and there is “0” pull request u can see in the picture ,but in GitHub PR process completed , I can see in GitHub logs as well, it trigger by PR, but PR analysis not showing.
image

Hi,

Can you post your analysis log? I believe it will show that you ran analysis with the parameters for branch analysis.

If it should have been a PR analysis instead, then you should try it after removing any branch-related parameters.

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