SonarCloud Code Analysis Expected — Waiting for status to be reported

we are currently having issues with Sonarcloud stuck in github required checks stage with the response SonarCloud code Analysis Expected-— Waiting for status to be reported.
was working well before with no issues.
has anyone had a fix for this issue ? checked all post on this issue but no definite resolution.
we have to disable Code Analysis for Pull Requests so we can merge the code.

Hey there.

  • Do you see the Pull Request analyzed in SonarCloud?
  • Are you using Automatic Analysis or CI-based analysis?

HI Collin no pull request are captured for new branches only old branches when it worked previously are till active.
i have use automatic analysis and use the gitactions CI based analysis workflow but the issue is still the same.

So you are using GitHub Actions now?

Can you share how your GitHub Action is configured (the YAML), and check the logs of your Action run against recent pull requests to see if the analysis was attempted, and whether it was failed or successful?

hello Collin so i tried this, and i enabled automatic analysis again ,but created a sonarcloud.yaml file and and sonar-project.properties, file created my pull request ran my PR, the PR was captured on sonarcloud and and analysis result was sent back to the PR.
image

previous times i created automatic analysis without the sonar.yaml file.

Hey there.

I feel like a few confusing things might be going on, let me clarify how this should work:

  • sonarcloud.yaml is not a file recognized by SonarCloud
  • A .sonarcloud.properties file can be used to add some additional analysis config to SonarCloud
  • Having a sonar-project.properties file in your repo will disable Automatic Analysis

Hi Collin
by standard configuration both settings should be separate Automatic Analysis or CI-based analysis?
which i agree with you.so i will just use the CI analysis approach since that is working for me right now.is it possible to check why automatic analysis is failing ? where can i check the logs?
is it a like a bug as it worked previously and suddenly stopped.

I’m honestly a bit confused at this point – do you have Automatic Analysis turned off or on?

Hi Collin right now automatic analysis is disabled or turned off am using the CI based analysis.

Thanks.

If you’d like to troubleshoot this more, I would suggest turning on Automatic Analysis and raising a new PR in GitHub.

Assuming the PR doesn’t get analyzed by SonarCloud, I would need to know:

  • The SonarCloud project key
  • The GitHub repo slug
  • The PR ID

I can open a private channel if you’re more comfortable sharing the info that way