Quick Start¶
1. Install¶
2. Run against your package¶
Each mutation prints PASS (killed — tests detected it) or FAIL (escaped — tests missed it). Escaped mutants print a diff showing exactly what changed.
3. Add coverage-awareness¶
Without --coverage, uncovered code inflates the "not covered" bucket and can produce a misleadingly low MSI. With it, mutants on untested lines are separated out and excluded from the covered-MSI denominator.
4. Set quality gates¶
Exit code 4 means a gate wasn't met. Exit code 0 means all gates passed.
5. Reduce noise¶
Use --quiet to suppress killed/skipped output and only show escaped mutants and the summary.
6. Limit to changed lines (PR mode)¶
go-mutesting \
--git-diff-lines \
--git-diff-base main \
--ignore-msi-with-no-mutations \
--min-msi 80 \
./...