Skip to content

fix(go): preserve requested coverage in passing test summaries - #5245

Open
Aschenbath wants to merge 1 commit into
rtk-ai:developfrom
Aschenbath:fix/oss40-20261124-928f-rtk-go-coverage
Open

Aschenbath wants to merge 1 commit into
rtk-ai:developfrom
Aschenbath:fix/oss40-20261124-928f-rtk-go-coverage

Conversation

@Aschenbath

Copy link
Copy Markdown
Contributor

rtk go test -cover currently reports only the pass count and discards every package's coverage. Keep one coverage result per package in the successful summary, including [no statements], and sort those results by full package name. Both standalone coverage lines and the final tab-separated package report are recognized without repeating them.

Fixes #1765.

Validation: captured go test -json -cover ./... from three real Go 1.19.8 packages. The regression failed on develop with only Go test: 3 passed in 3 packages; it now preserves 100.0%, 66.7% and no-statement results with no duplicates and more than 20% byte reduction. A manual rtk go test -cover ./... also passed. Root and proxy formatting, cargo clippy --all-targets, and cargo test --all passed.

Prepared with Codex assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: go test -cover didn't output test coverage

1 participant