Gradle Subprojects not reported to Sonarcloud for Github Pull Requests

It could be.
Here is the ticket open in circle ci: Git checkout of a branch destroys local reference to master - Feedback & Bug Reports - CircleCI Discuss
And the other user reporting empty P/R: Code is empty on Pull Request reviews

@SebMel Having the logs of the scanner would indeed help. I’ve sent you a private message to which you can reply with the logs.

Please try the same workaround discussed in the other topic.

Thanks.
So the only thing we can think of is that the clone of the git repository in circleci has some references that are no longer valid.
Could you please add, to the P/R, the following to the beginning of your build script.

git fetch --all
git branch -D master
git rev-parse origin/master

This will update all remote references, delete local master branch (if exists) and print the current remote reference to master.