用途:该技能用于在 .NET 项目中使用开源免费的 ReportGenerator,把原始覆盖率输出转换为人类与 CI 均可读的报告,包括 HTML、Markdown、Cobertura、徽章,以及合并多份报告。适用触发条件包括仓库已使用或希望使用 ReportGenerator、CI 需要可读的覆盖率报告、需要合并多个覆盖率文件。不适用于仅收集原始覆盖率、没有报告渲染需求的场景。
主要能力:强调收集与渲染分离,Coverlet 负责收集,ReportGenerator 负责渲染;支持按需选择输出格式,如 HtmlSummary、Cobertura、MarkdownSummaryGithub、badges;仅在仓库确实需要统一视图时合并多份报告;倾向使用本地或基于清单的 .NET 工具,以保证 CI 运行可复现。
使用方式:先读取最近的 AGENTS.md,确认范围与约束,再按工作流执行并返回结果格式。若尚未配置,先检测当前状态,例如运行 rg --files -g '.config/dotnet-tools.json'、dotnet tool list --local、dotnet tool list --global、command -v reportgenerator。倾向于本地工具安装:dotnet new tool-manifest(若缺失)、dotnet tool install dotnet-reportgenerator-globaltool。随后在 AGENTS.md 与 CI 中加入明确的渲染命令,例如:dotnet tool run reportgenerator -reports:"**/coverage.cobertura.xml" -targetdir:"artifacts/coverage" -reporttypes:"HtmlSummary;Cobertura"。要求报告输入与生成的覆盖率格式匹配,报告输出落到稳定的产物路径。返回状态可为 complete、clean、improved、configured、not_applicable、blocked。
限制:资料未提供该技能的收费、价格、平台或效果信息;具体功能与步骤以实际工具和仓库配置为准。