Help us shape the future of Go! Take the 2026 Go Developer Survey

mutate

command
v6.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Command mutate runs mutation testing over the lines a branch changed: it applies one small fault at a time (an operator flipped, a condition forced, a statement removed) to the Go files changed since a base commit, runs the tests of the mutated file's package, and reports every mutant the tests do not catch.

go run ./tools/mutate -base origin/main [-workers 3] [-pkgs ./pkg/...] [-run regexp]

A mutant that does not compile is not counted. A surviving mutant is either a missing test or code whose effect no test can observe (dead, redundant or performance-only); each one needs one or the other answer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL