Skip to content

test: cover the git log line that does not parse - #5

Merged
fernandorocagonzalez merged 1 commit into
mainfrom
test/cover-unparsable-log-line
Nov 17, 2026
Merged

fernandorocagonzalez merged 1 commit into
mainfrom
test/cover-unparsable-log-line

Conversation

@fernandorocagonzalez

Copy link
Copy Markdown
Contributor

The test check fails on main right now, not just on PRs. A manual run on main today gives 99.76% lines, with one line missed. The runner moved to rust 1.100, which counts the implicit else of the if let in commits() as a line of its own, and no test ever produced a git log line without four fields. The nightly only runs audit and deny, which is why nobody saw it.

This moves the parsing into parse_log and adds a unit test that feeds it a malformed line, so the skip is actually checked instead of just counted. Behaviour doesn't change.

How I checked it: in a container with rust 1.100.0, cargo-llvm-cov 0.9.1 (same as CI) and a recent git, main reports the single miss at src/cli.rs:273 and this branch reports 100% lines.

This unblocks #4.

Rust 1.100 counts the implicit else of the if let in commits() as its own line, and no test ever produced a log line without four fields, so coverage dropped to 99.76% and the test check fails on main as well as on every PR.

The parsing moves to parse_log, and a unit test feeds it a malformed line, so the skip is actually checked rather than just counted.
@fernandorocagonzalez
fernandorocagonzalez merged commit eca4259 into main Nov 17, 2026
3 checks passed
@fernandorocagonzalez
fernandorocagonzalez deleted the test/cover-unparsable-log-line branch November 17, 2026 15:31
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.

1 participant