Skip to main content

max / docengine

1.8 KB · 32 lines History Blame Raw
1 # Mutants no test can kill, with the reason each is equivalent to the code it
2 # replaces. Recorded from the first mutation run of the render chain (infra
3 # `bb414371`, 2026-08-26: 9 survivors, 2 timeouts). Excluding them is what keeps
4 # a later run's "0 missed" worth reading.
5 #
6 # The patterns are regexes, so `+`, `*` and `|` need escaping. A bare `||` is an
7 # empty alternation and silently excludes every mutant in the crate.
8 #
9 # Add an entry only with its reason written out, and only after trying to kill
10 # the mutant with a test: of the nine survivors here, four were coverage gaps.
11 exclude_re = [
12 # `inject_heading_ids` scans for a heading's text between its Start and its
13 # End. Starting that scan at the Start event itself rather than one past it
14 # changes nothing: `Event::Start` falls to the `_ => {}` arm and contributes
15 # no text. Same for the outer cursor: landing on the End event instead of
16 # one past it costs one loop iteration that matches no Start.
17 "replace \\+ with \\* in inject_heading_ids",
18
19 # The inner scan's bound. pulldown-cmark always closes a heading it opened,
20 # so the loop leaves on `Event::End(TagEnd::Heading)` and the bound is never
21 # the thing that stops it. `<=` would only differ on an event stream that
22 # ends inside a heading, which the parser cannot produce.
23 "replace < with <= in inject_heading_ids",
24
25 # `permissive_builder` IS `ammonia::Builder::default()`, so replacing its
26 # body with `Default::default()` is the same code. The function exists to be
27 # the one named construction point for the permissive preset (UX-S3), not to
28 # behave differently from the default, and the regression tests in
29 # `sanitize` pin what that default has to keep doing.
30 "replace permissive_builder -> ammonia::Builder<'static> with Default::default\\(\\)",
31 ]
32