Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Effective gate treats missing coverage totals as 0% and can pass without measurements

未关闭
#15 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
74/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
testing-qa

调研方向

Start with score_coverage/effective_coverage.py around the effective totals and zero-denominator fallback, then inspect score_coverage/generate_coverage_html.py where the gate reads the effective percentage. Reproduce the supplied archive and threshold cases with the real generate_coverage_html CLI. Done means missing or unusable HTML and LCOV measurements consistently exit 2, including at threshold 0, for both HTML backends.

由索引模型根据 Issue 内容生成。

描述

bug

Found while reviewing the architecture documentation. Verified against upstream HEAD d99515b87bbe1dde89984403e9c330d640fc5d33 using synthetic report archives and the real generate_coverage_html CLI (no gate/justification mocks).

The effective coverage path converts missing/unparseable/zero HTML totals to a numeric 0% report. The gate treats this as an evaluated percentage. At the default threshold it exits 1; at threshold 0 it exits 0, although there are no usable measurements. The raw LCOV path rejects zero instrumented lines with exit 2.

Reproduction

Create a report zip containing html_report/index.html with no parseable LLVM Totals row, an empty html_report/style.css, and lcov_report/lcov.dat with LF:0 and LH:0. Supply a valid empty YAML:

version: 1
justifications: []

Run the real generate_coverage_html CLI with --yaml:

  • COVERAGE_THRESHOLD=100: warning about unparseable totals, effective 0%, exit 1.
  • COVERAGE_THRESHOLD=0: same warning, effective 0%, exit 0.

Without YAML the zero-line LCOV yields exit 2.

Expected

Unavailable measurements must produce exit 2 for every threshold, including 0. Validate usable totals before constructing/accepting an effective gate value. Cover missing/malformed HTML totals and zero instrumented lines in both HTML backends.

This violates tool_req__coverage_gate_exit_codes and tool_req__coverage_gate_no_verdict.

Relevant code
主要语言
Python
星标
0
派生
3
平均合并
21 小时 15 分钟
30 天内合并 PR
14

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

eclipse-score/coverage_tool 的其他 Issue

查看 eclipse-score/coverage_tool 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。