I have got PR requests being analysed and results posted to the github PR. However Sonar doesn’t pickup any metrics (lines of code, % coverage, etc) when I look at it in the Sonarqube UI. It has everything as 0 despite there being changed lines. It also submits the same zero metrics to github ie
Kudos, SonarQube Quality Gate passed!
Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells
No Coverage information
No Duplication information
- SQ Version 8.3.1 (build 34397), Jenkins Jenkins 2.231
The code I am submitting has errors which is picked up by SonarLint in my IDE.
Any help greatly appreciated!
Did SonarQube detect the changed code? If the issues already exist in the target branch, they won’t be shown for the pull request. A screenshot would help.
Thanks for the reponse.
It looks like it didnt detect the changed code in the analysis - see screenshot.
However when I click on the code tab it is there. Its not on the target branch.
Hope this helps,
Could you please send us the logs of the scanner with debug enabled?
Can I send it to you privately rather than post it on here?
Sure, I sent you a private message.
We concluded there was a problem with the arguments passed to the scanner.
@dmeneses can you reveal what was the missing/incorrect arguments passed to the scanner? I’m encountering exactly the same symptoms.
There was just a typo in the parameters. Here are the parameters needed: https://docs.sonarqube.org/latest/analysis/pull-request/
Oh thanks. I’ll double check mine, otherwise I’ll open new thread.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.