Sonarqube server: 6.7.4 community
Github Plugin: 1.4.2
Quality gate fails because of critical and blocker issues but when i integrate it with github plugin
check is passed(green) for PR though critical and blocker issues are present.
How about some screenshots?
Only Quality Gate conditions “on New Code” are applied to PRs. Your failing QG conditions are on overall code. That’s why they’re not being applied.
When first time code is analyzed its new for sonar right. So, it should report under PR?
In the first analysis of a project, nothing is “new”. In the first analysis of a PR the SCM data is used to determine what’s new IIRC.
Thanks a lot for your help @ganncamp!!!
Hi @ganncamp recently deliberately generated new critical issue still it was not reported under PR in Github.
I’m gonna need a little more than this…
Please let me know if you need anything else
How about a screenshot of the blame data for the line the issue is raised on? E.G.:
Please check the below screenshots
Thanks for the screenshots. Your initial post said you were on SonarQube 6.7.4. IIRC, that version didn’t include PR decoration. What version are you on today?
I’ll be honest, nothing’s jumping out at me here, but I don’t have a firm handle on how “new” is calculated in every version. (As you would imagine, we’ve refined and improved it from version to version.)
Yes, I’m on the same version. When we implemented the github plugin and tested,
I found it was working. At that time also, generated critical issues deliberately and they were reported.
But now its not reporting any issue, always showing green for the check. I tried generating critical issues in couple of PR’s but always getting green check.
It’s difficult for me to tell what’s going on. What I can say though is that 6.7.4 is past EOL. The current version is 8.3, and the current LTS is 7.9.3. You should upgrade at your earliest convenience and come back to us if the problem persists.
Hi @ganncamp getting this in CI logs
WARN: Invalid character encountered in file /var/lib/jenkins/workspace/xxxxxxxxxxxxxxxxxxxxx/src/main/resources/config/tls/keystore.p12 at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property ‘sonar.sourceEncoding’.
INFO: 858/858 components tracked
INFO: ANALYSIS SUCCESSFUL
INFO: Executing post-job GitHub Pull Request Issue Publisher
is this warning is the matter of concern?
It’s “only” a warning. You might want to take care of it (or you might decide it’s not worth your time).