| 1 |
# Mutants that cannot be killed by any test, with the reason each one is |
| 2 |
# equivalent to the code it replaces. Recorded from the first two mutation runs |
| 3 |
# of this crate (infra `c1b3900b`, 2026-08-26: 31 survivors, then 6 after the |
| 4 |
# boundary tests landed). Excluding them is what keeps a later run's "0 missed" |
| 5 |
# meaningful; a run that always reports six survivors teaches nobody to read it. |
| 6 |
# |
| 7 |
# Add to this list only with the reason written out, and only after trying to |
| 8 |
# kill the mutant with a test. A survivor is a coverage gap until proven |
| 9 |
# otherwise, and five of the original six looked equivalent at a glance and were |
| 10 |
# not. |
| 11 |
exclude_re = [ |
| 12 |
# `CssRule::Ignored` prints as nothing, so sending it to `scopable` instead |
| 13 |
# of dropping it produces byte-identical CSS: `print_rules` yields "" and |
| 14 |
# the `scopable_css.trim().is_empty()` branch is taken either way. |
| 15 |
"delete match arm CssRule::Ignored in scope_and_sanitize", |
| 16 |
|
| 17 |
# The `worst > u32::MAX` early return at the foot of `projected_expansion` |
| 18 |
# is an optimisation, not a decision: anything that large is already an |
| 19 |
# order of magnitude past MAX_SELECTORS and is refused whether the walk |
| 20 |
# stops there or runs to the end. `>=` and `==` differ from `>` only at |
| 21 |
# exactly u32::MAX, which no stylesheet can be built to hit on purpose. |
| 22 |
# (`<` is NOT excluded: it returns early on the first cheap rule and misses |
| 23 |
# a bomb placed second, which `the_projection_walks_past_the_first_rule` |
| 24 |
# catches.) |
| 25 |
"replace > with >= in projected_expansion", |
| 26 |
"replace > with == in projected_expansion", |
| 27 |
|
| 28 |
# `flags: ParserFlags::NESTING` is inert at the pinned lightningcss version: |
| 29 |
# `ParserFlags::NESTING` is defined in parser.rs and read nowhere in |
| 30 |
# 1.0.0-alpha.71, so nesting parses regardless. The field stays because the |
| 31 |
# pin is deliberate and a later version may start reading the flag again, |
| 32 |
# but no test can observe its absence today (the reason is also at the |
| 33 |
# field itself, which is where a reader meets it). |
| 34 |
# |
| 35 |
# THIS ENTRY DOES NOT TAKE EFFECT, and is kept as the record. Measured |
| 36 |
# against cargo-mutants 27.1.0: `exclude_re` does not filter "delete field |
| 37 |
# X from struct Y expression" mutants at all, by any pattern, while it |
| 38 |
# filters every other kind. So a clean run of this crate reports one |
| 39 |
# survivor rather than none, and this is it. |
| 40 |
"delete field flags from struct ParserOptions expression in parser_options", |
| 41 |
|
| 42 |
# `token.ends_with('s')` and `ends_with('%')` in `update_max_iterations` are |
| 43 |
# a fast path, not a filter: a token they let through, such as `2s` or |
| 44 |
# `50%`, fails `parse::<f32>()` on the next line and is discarded there. So |
| 45 |
# `&&` in place of `||` changes which line rejects the token, never whether |
| 46 |
# it is rejected. Same for the `is_empty()` term. |
| 47 |
# (the pipes are escaped because these patterns are regexes, and a bare `||` |
| 48 |
# is an empty alternation that matches every mutant in the crate) |
| 49 |
"replace \\|\\| with && in update_max_iterations", |
| 50 |
] |
| 51 |
|