GitHub Pull Request Scan: SonarCloud Code Analysis Expected — Waiting for status to be reported

I am creating a pull request to the main branch. The main branch has applied SonarCloud Code Analysis protection rules, and this is mandatory. However, it’s stuck on ‘Expected — Waiting for status to be reported.’ Is there a way to get this moving? Note that I can use GitHub actions for code analysis, but my requirement is to run SonarCloud Code Analysis and receive the report.

Hey there.

Do you see the Pull Request analysis for this Pull Request in SonarCloud (looking something like this)? If so, is this project bound?

Do you see the Pull Request analysis for this Pull Request in SonarCloud (looking something like this)?

No. In the Pull Request for the above image, the analysis results are not displayed. In the first Pull Request I asked about, I only wanted to try the automatic analysis by SonarCloud Code Analysis, so there was no Github actions workflow file.

However, in the Pull Request where the Github actions SonarCloud workflow file exists, the analysis results were displayed.

If so, is this project bound?

Yes. Both the project and the organization are bound.
スクリーンショット 2023-12-27 100100

Currently, the default branch on GitHub is develop. Also, the Main Branch registered in SonarCloud is develop. Should I create a Pull Request to merge into the develop branch instead of the main branch? (However, the main branch is also listed under Long-lived branches.)
スクリーンショット 2023-12-27 102742

May I ask an additional question? When using Automatic Analysis and GitHub Actions with SonarSource/sonarcloud-github-action@master, is the main difference whether the analysis process can be customized, while the content of the analysis itself remains essentially the same?

When using Automatic Analysis, the main difference is that you don’t have to configure anything in your CI (it’s… automatic). And it comes with some limitations around how it can be customized. The documentation is really good on this matter.

This is all for the same project? Keep in mind that a project can only use one or the other (automatic analysis or CI-basd analysis). If you have automatic analysis turned off (project Administration > Analysis Method), you will need to have that GitHub Action running on all PRs.