Repository navigation
fix(cargo-gamma): include Some value mutants by default - #244
chinayangxiaowei wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The sample configuration still contains obsolete guidance to add @pedantic for non-default mutations.
1 open finding
What changed in this PR
Enables fn_value.some mutants by default while retaining @pedantic as a focused alias.
Changes:
- Adds
fn_value.someto the default mutator catalog. - Tests default
Some(0)andSome(1)generation. - Updates engine and CLI documentation.
| File | Description |
|---|---|
crates/cargo-gamma/src/main.rs |
Updates CLI documentation. |
crates/cargo-gamma/README.md |
Updates generated user documentation. |
crates/cargo-gamma/docs/MUTATORS.md |
Documents default and preset membership. |
crates/cargo-gamma/docs/DESIGN.md |
Records CLI selection behavior. |
crates/cargo-gamma/docs/CONFIG.md |
Updates configuration guidance. |
crates/cargo-gamma-engine/src/ops/registry/selection.rs |
Tests default and pedantic selection. |
crates/cargo-gamma-engine/src/ops/registry/catalog.rs |
Enables the mutator by default. |
crates/cargo-gamma-engine/src/ops/collect/tests.rs |
Adds default-selection regression coverage. |
crates/cargo-gamma-engine/docs/DESIGN.md |
Records engine behavior. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
350d3ca to
da895b9
Compare
|
This was intentional, this mutator is too noisy to be on by default. |
|
Thanks for clarifying the intention. I approached this from the broader mutation coverage I was used to with cargo-mutants, and I understand the concern about noise in the default set. I'm happy to keep |

Problem
fn_value.somewas excluded from@default, so a default run did not generateSome(value)whole-body mutants for functions returningOption<T>. Users had to add--mutators @default,fn_value.someexplicitly.Change
fn_value.somein the default selection.@pedanticas a focused alias for the same mutator, preserving scripts that select it.Some(0)andSome(1)for anOption<u8>return.Validation
cargo fmt --all -- --checkpassed.cargo test --locked -p cargo-gamma-engine --libpassed: 811 tests.This PR contains one independent default-selection change. It does not include the macOS, workspace, regex, or reference-return patches in #240–#243.