问题
I have issues seeing details of the code analysis in SonarCloud.
What I have working is a .Net Core application with Coverlet. I do see that the results are uploaded and the coverage shows. However, I don't get to see a dashboard, the tab 'code' doesn't show code and Measures doesn't give detailed information either.
My Github project is linked and as I can see, the results are uploaded. I wondered why I can't see the code and detailed coverage. I'm not familiar with .NET code and SonarQube was already installed at other projects, so I wondered if I am forgetting something. I get to see the results for both PR builds as for the specific branch.
So my question is how to see the details. Could it be that it only shows on the master branch once I have merged?
This is a .NET Core project. I have the same issue with a .NET Framework application.
回答1:
I cant see the specifier of your sonarqube target, but this looks like either a short living branch or a pull request analysis. Those quality gates are always representing the change to the target branch. hence that, you will see no coverage information, if there is nothing new to cover.
Add a dummy class, without tests, and check if this issue still persists. Or if i am wrong with my assumption that this is not a long living branch let me know.
As an example from an opensource project
- Pull request analysis with just readme changes - https://sonarcloud.io/dashboard?id=junit-pioneer_junit-pioneer&pullRequest=224
- Pull Request analysis with a code change and coverage - https://sonarcloud.io/dashboard?id=junit-pioneer_junit-pioneer&pullRequest=216
来源:https://stackoverflow.com/questions/61745826/code-and-details-of-code-coverage-not-showing-in-sonarcloud-for-net-solution