问题描述
我无法看到SonarCloud中的代码分析的细节.
I have issues seeing details of the code analysis in SonarCloud.
我正在使用的是带有Coverlet的.Net Core应用程序.我确实看到结果已上传,并且覆盖率显示出来.但是,我看不到仪表板,代码"标签也未显示代码,而度量值"也未提供详细信息.
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.
我的Github项目已链接,正如我所看到的,结果已上传.我想知道为什么我看不到代码和详细的覆盖范围.我不熟悉.NET代码,SonarQube已经安装在其他项目中,所以我想知道我是否忘记了一些东西.我可以看到两个PR构建的结果以及特定分支的结果.
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.
所以我的问题是如何查看详细信息.合并后,它是否只能显示在master分支上?
So my question is how to see the details. Could it be that it only shows on the master branch once I have merged?
这是一个.NET Core项目. .NET Framework应用程序也有同样的问题.
This is a .NET Core project. I have the same issue with a .NET Framework application.
推荐答案
我看不到您的声纳目标的说明符,但这看起来像是短暂的分支或请求请求分析.这些质量门总是代表着目标分支的变化.因此,如果没有新内容要覆盖,您将看不到任何覆盖信息.
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.
以一个开源项目为例
- 仅具有自述文件更改的拉请求分析- https://sonarcloud .io/dashboard?id = junit-pioneer_junit-pioneer& pullRequest = 224
- 具有代码更改和覆盖范围的拉动请求分析- https://sonarcloud.io/dashboard?id=junit-pioneer_junit- pioneer& pullRequest = 216
- 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
这篇关于SonarCloud for .Net解决方案中未显示代码和代码覆盖率的详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!