SonarCloud for .Net 解决方案中未显示代码覆盖率的代码和详细信息 [英] Code and details of code coverage not showing in SonarCloud for .Net solution

查看:41
本文介绍了SonarCloud for .Net 解决方案中未显示代码覆盖率的代码和详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在查看 SonarCloud 中代码分析的详细信息时遇到问题.

I have issues seeing details of the code analysis in SonarCloud.

我的工作是一个带有 Coverlet 的 .Net Core 应用程序.我确实看到结果已上传并显示覆盖范围.但是,我没有看到仪表板,代码"选项卡没有显示代码,Measures 也没有提供详细信息.

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.

推荐答案

我看不到您的 sonarqube 目标的说明符,但这看起来像是一个短暂的生存分支或拉取请求分析.这些质量门总是代表对目标分支的更改.因此,如果没有任何新内容需要报道,您将看不到任何报道信息.

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

  • 仅更改自述文件的拉取请求分析 -
  • 通过代码更改和覆盖率拉取请求分析 -

这篇关于SonarCloud for .Net 解决方案中未显示代码覆盖率的代码和详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆