We’re currently adding sonarcloud analysis to our projects and would like to restrict PR merges to only allow successful passes of sonarcloud analysis but currently we’re not seeing that option in all projects for some reason.
- The PR comment/update is reported back to the github project / PR with the sonarcloud analysis
results so that part of the setup is working correctly (jenkins CI → sonarcloud → github PR comment with results) - Based on some other threads it sounds like if there has been an analysis run on any branch within the past week it should show up as an option.
- We have a mix of .net/java projects and we do see it for some of the java projects so may be some distinction to how the .net and java projects are publishing but have only spot checked so can’t verify if its consistent across all .net/java projects
Seems like its a bug/issue with the github integration or the way that sonarcloud is handling the analysis and reporting it back. Since the results are getting attached to the PR correctly as a comment seems like the github app integration just isn’t working when we try to filter on the status checks that should be available.
Based on this thread sounds like there could be something to do with code coverage reporting not being accurate, if that’s the case is there anyway to have sonarcloud report that as the issue? Either way seems like even if there isn’t coverage reported there should still be a way to restrict merges based on the other conditions but currently it doesn’t allow that even as an option since it isn’t reporting the runs back to the github app.
Let me know if you have any guidance for how to fix/troubleshoot this or report the issue to the appropriate teams to get it resolved.