Commit Graph
9 Commits
Author SHA1 Message Date
Robert C. Martin 830ec7e9c3 Read Go coverage by module import path, the name go test gives a file.
Why: every Go run printed "No coverage data for <file>; its sites are
uncovered". `go test -coverprofile` keys files by import path
(`github.com/acme/tool/cmd/tool/main.go`); mutator looked them up by
absolute disk path (`/.../tool/cmd/tool/main.go`). Neither path ends with
the other, so no Go file ever matched and only --no-coverage ran sites.

What: `_go_lines` asks crapper's `go_import_name` for the profile's name
of the file (nearest go.mod module line plus path inside the module) and
`_lookup` tries that name as an exact key, then the existing suffix
match. Other languages pass no name and are unchanged. Needs crapper
c757ec7 or later.

Proof: two new specs (module at the root, module in a subdirectory with
a different name) failed with None first, now pass; 78 pass. crapper:
_go_lines 6.0, covered_lines 5.0, _lookup 4.0. dryer: no candidates.
mutator on the changed lines: one equivalent survivor (insert(0) vs
insert(1)) removed by appending the name; no survivors left.
2026-11-10 12:38:11 -06:00
Robert C. Martin a5a0cb803b Count multi-line statement sites as covered from their start line; skip TypeScript type positions 2026-10-21 14:33:45 -05:00
Robert C. Martin ba4065f3f1 Stop shelling generated test commands and fail closed on git and coverage.
A package path is one argument. Git status uses NUL records and returns git's status. A failed coverage command leaves reports unread, coverage keeps the longest path match, and site walks no longer recurse.
2026-10-03 17:48:32 -05:00
Robert C. Martin 1bad4b908a Mutate ?? and ?. in TypeScript and JavaScript, including Express handlers. 2026-10-03 08:49:10 -05:00
Robert C. Martin b35a9caf6f Run Python tests with the project's virtualenv.
Mutator's interpreter does not have the project installed, so the baseline failed before any mutant ran.
2026-10-02 10:29:11 -05:00
Robert C. Martin 4a9d0c0a5c Copy relative importers into the worker so Node loads the mutant.
Node resolves a relative import from the real path of the module. A symlinked test was loading the original source, so every mutant survived. Modules that reach the file under test are now real copies in the overlay.
2026-10-01 10:46:47 -05:00
Robert C. Martin 21d6d6f50b Run a file's mutants at the same time in symlink overlays.
Each worker keeps a private copy of the file under test and links the rest of the project, so the original tree stays put. The default is one worker per core, and --max-workers can set a lower cap.
2026-09-30 15:23:42 -05:00
Robert C. Martin 63fe452adb Add tests that kill the mutation survivors the suite can reach.
A self-run left covered gaps and live mutants. These cases exercise the real boundaries and leave equivalent mutants and lines coverage cannot see.
2026-09-30 14:39:16 -05:00
Robert C. Martin bf42bd22e7 Add a multi-language mutation tester that writes .metrics/mutate for uml-viewer. 2026-09-30 10:40:54 -05:00