Disable Pull Request Analysis

We’ve been using Sonar in a very simple way at the tail end of CircleCi:

sonar-scanner -D sonar.login=$SONAR_KEY

However today, one of my projects started complaining:

INFO: Load project pull requests
INFO: Load project pull requests (done) | time=111ms
INFO: Load branch configuration
INFO: ------------------------------------------------------------------------
INFO: ------------------------------------------------------------------------
INFO: Total time: 23.845s
INFO: Final Memory: 7M/336M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Parameter ‘sonar.pullrequest.key’ is mandatory for a pull request analysis

Is there a way to disable Pull Request Analysis? I never enabled this feature in the first place, and see no options in SonarCloud for this.

I did manage to get Sonar to actually do Pull Request Analysis with:

-Dsonar.login=SONAR_KEY \ -Dsonar.pullrequest.key={CIRCLE_PULL_REQUEST##*/}
-Dsonar.pullrequest.branch={CIRCLE_BRANCH} \ -Dsonar.pullrequest.provider=GitHub \ -Dsonar.pullrequest.base=master \ -Dsonar.github.repository={CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}

However not every commit is via a PR – sometimes a tiny change is committed directly to a branch and that causes Sonar to error out and then CircleCi fails.