Commit Graph
5 Commits
Author SHA1 Message Date
Cursor AgentandRobert C. Martin 53865e4a31 Resolve Swift coverage regions through each function's filenames.
llvm-cov region[5] indexes that function's filenames, not unit["files"].
On Apple LLVM 21 those orders differ, so the span covering Place.swift line 5
was stored on test_entry_point.swift and the return stayed uncovered.

Proved by tests/fixtures/swift/function-filenames.json, which failed before
the fix (Place.swift received (1, 1, 1) instead of (4, 5, 1)). 226 pytest
tests passed. crapper worst CRAP on coverage.py is 9.0. dryer found no
candidates at 0.8 in coverage.py. mutator on coverage.py: 237 killed,
0 survived, 0 uncovered.

Co-authored-by: Robert C. Martin <[email protected]>
2026-11-26 03:21:08 +00:00
Cursor AgentandRobert C. Martin 7222b2b8e2 Kill the mutation survivors in the coverage runners.
The Swift fixes left the changed files with 33 survivors. Tests now
distinguish an empty suffix, an equal path, a segment that starts on the
function's last line, the shorter extra prefix, an equal report key that
blocks a longer file, a blank candidate, a repeated source, form-html keys,
a short llvm-cov segment, a Swift export that has a profile but no binary,
and the quiet success paths for Java, Go, Rust, Python, Vitest, rustup,
and a custom coverage command.

Proved by mutator on runners.py and coverage.py: 432 killed, 0 survived,
0 uncovered.

Co-authored-by: Robert C. Martin <[email protected]>
2026-11-26 01:51:44 +00:00
Robert C. Martin 9f1bead298 Fix the coverage, git, and Clojure bugs, and bring CRAP under 10.
A path in a built-in coverage command is one argument, a failed custom coverage command does not read a stale report, and git failures exit with git's status. The Clojure reader honors discards, metadata, and character literals. Long functions are split so every score is under 10 except the option switch.
2026-10-03 17:27:59 -05:00
Robert C. Martin f0cb973110 Count ?? and ?., Express handlers, and JavaScript files, and score missing coverage as 0%. 2026-10-03 08:49:10 -05:00
Robert C. Martin ce3895211e Add tests for the branches the first mutation run left alive. 2026-10-02 10:36:31 -05:00