Sonar-scanner flagging unrelated issues in Github PR analysis

Hi,

Welcome to the community!

Is the analysis command you’ve posted a direct copy/paste from your configuration? Because there shouldn’t be a space after -D. It should be:

sonar-scanner -Dsonar.newCode.referenceBranch=main -Dsonar.pullrequest.base=main -Dsonar.pullrequest.branch=branch-name -Dsonar.pullrequest.key=1111 -Dsonar.scm.revision=commit-hash-of-last-commit-in-pr

Actually, I’m surprised this isn’t erroring-out with an “unexpected command” message. But it can’t be helping. Can you correct that, run again, and then post your analysis log if you’re still seeing the problem?

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.

And also, thanks for pointing out the docs error. I’ve reported that internally, so it should be fixed soon.

 
Thx,
Ann