gomutants

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: Apache-2.0, MIT Imports: 26 Imported by: 0

README

go-mutants

Mutation testing for Go modules that is fast enough to leave switched on. go-mutants instruments every compilable mutant once into a disposable snapshot of your module, then activates one mutant per test process through an environment variable. Your working tree is never modified, and the toolchain builds essentially once instead of once per mutant. Coverage data then decides which test binaries a mutant needs to run against at all, and a mutant no test reaches is reported without being executed.

The design targets the things that make mutation testing painful in practice. A live TUI dashboard instead of a silent wait, coverage-guided selection, deterministic stable mutant IDs, a lossless JSON report, --changed for pull requests, --shard K/N for CI fan-out, an outcome cache that keeps a second run from re-measuring what has not moved, and a self-contained HTML report that opens from file:// with the network unplugged are all built today.

Status: pre-release, feature-complete for v1

The v1 command tree is complete. go-mutants run performs real mutation testing: it snapshots the workspace, proves the baseline, discovers candidates, validates that they compile, instruments the snapshot once, and measures one mutant per test process — then writes a run-report-v1 document, publishes reports/mutation/mutation.{json,html}, and reports a mutation score it actually measured. go-mutants list enumerates the same mutants without executing them, as text or as a JSON catalogue that answers to schema/catalog-v1.schema.json. go-mutants doctor checks that this machine can run any of it, as a table or as a JSON document, and go-mutants init writes a fully commented .go-mutants.toml in which every value is the built-in default. go-mutants report reads those documents back: list and latest show the run history, clean deletes it, merge combines the reports of a sharded run into the whole run's report, and validate checks any report against the schema this build embeds. go-mutants cache works with the outcomes a run has proven: status says where they are and what is stored, gc --days N removes what was written more than N days ago, and clean removes them all.

Coverage guidance is automatic and needs no flag: a run with the default test command profiles each test binary once, then measures a mutant only against the binaries that reach its lines, and reports one no binary reaches without executing it at all.

The outcome cache needs no flag either. Outcomes go-mutants has proven are kept under your OS cache directory, keyed by everything that could change one — the build, the code, the catalogue, the command, the environment — so a second run over unchanged code measures only what has moved, and one over changed code finds nothing to reuse rather than reusing something stale.

On a terminal that can do better than ASCII, run draws a live dashboard — the phase, a score gauge, one row per worker, and a scrolling survivor feed — and prints the closing summary into the scrollback once the screen is restored. Everywhere else it prints deterministic plain lines instead: into a pipe or a file, on a dumb terminal, under --no-tui, --json, --quiet, or --no-color, and whenever NO_COLOR or CI is set. The summary block is byte-identical either way, because a dashboard run replays it through the plain renderer rather than formatting its own.

All eleven operator families and all forty-two rules are discovered, instrumented, compile-validated, executed, and scored. A score from go-mutants is a score against the whole v1 catalogue, narrowed only by the profile you chose. The tiers are monotonically inclusive: balanced is the default and leaves out bitwise, arithmetic-assignment, and statement-deletion; strong adds the first two; all adds the third, statement deletion being the classic source of equivalent mutants. docs/operators.md is the table.

The honest limits:

  • No switch/select case mutation, and no if-branch replacement. They are v2: each needs a guard form or a neutral-value model the instrumenter does not build. Package-level var initialisers, const declarations, array lengths, and generic type parameter lists are excluded for reasons that are not going to change, and cgo packages and generated files are excluded wholesale. Every one of those is a recorded skip with a reason rather than a silent omission.
  • A rewrite site none of the three guard forms can express is skipped, with the reason unnameable-decl-type. The commonest are a := that redeclares rather than declares, a declared type the file cannot spell with the imports it has, and a statement in a for post or an if initialiser, where a block is not legal Go. go-mutants list prints the count.
  • A test.command go-mutants can read is also a scope. go test followed only by package patterns — the built-in go test ./..., or a narrowing such as go test ./internal/... — means only those packages get a test binary, and coverage guidance is on over exactly those. Anything else (a flag of any kind, another program) cannot be attributed to go-mutants' own per-package binaries, so such a run measures every mutant against every binary and says so with a GOM7601 warning. A scope that resolves to nothing is GOM4022 and stops the run rather than silently widening. Any failure of the coverage pass itself publishes GOM7602: that optimisation can never fail a run.
  • The Stryker projection is one-way and lossy, by design. The HTML report and reports/mutation/mutation.json are built from the run report after it has been filed, and are never read back. Six outcomes become five statuses: an uncovered survivor projects as Survived rather than NoCoverage, so that the two documents agree about how many survivors there were, and the expectations ledger, the cache accounting, and coverage do not survive the trip. The run-report-v1 document is the one to diagnose, resume, or audit from; docs/stryker-compatibility.md states the whole mapping.
  • One host platform per report. Build constraints decide which files a package even has, so a report is a statement about the platform it was measured on; there is no cross-GOOS matrix. doctor warns when the go on PATH targets a platform other than the host. A go.work workspace is supported only for the modules the snapshot itself holds.
  • The outcome cache is on only for the default test command, on the same terms and for the same reason as coverage guidance: cache.mode = "auto" reuses nothing for a command go-mutants cannot reason about and says so with GOM7901. cache.mode = "on" is how you promise your own command is reproducible. Inconclusive outcomes, harness errors, interruptions, uncovered mutants, and every mutant named in [[mutation.expect]] are measured on every invocation, and nothing the cache does can change a verdict or fail a run.
  • --changed needs git and a repository, and fails rather than guessing when it cannot read a diff: a narrowing that silently fell back to "everything" or to "nothing" would be worse than not running at all. Rename detection is off, so a renamed file selects every mutant in it.
  • The run history is filed per workspace, and a workspace is identified by a digest of its contents, so runs with an edit between them are stored apart. report list|latest|clean gather one module's runs back together by the module path in each document, and are run from a module root.

The design is settled and written down under docs/, every page carries a status line saying how much of it is built, and the toolchain, gates, and CI are real and green.

Do not describe go-mutants as production-ready. Nothing is published, tagged, or released.

Requirements

  • Go 1.26 or newer (the module targets go 1.26)
  • Windows, Linux, or macOS on x64 or arm64
  • Git, for --changed only
  • mise for development; it pins every tool this repository uses, including the Go toolchain itself

Quick start

# from the root of this repository
go install ./cmd/go-mutants  # builds into `go env GOPATH`/bin

cd path/to/your-module
go-mutants doctor            # is this machine ready?
go-mutants init              # write a commented .go-mutants.toml (optional)
go-mutants run

Building from a checkout is not one option among several; it is currently the only one. Nothing is tagged yet, so there is no module version for go install …@latest to resolve.

Once v0.1.0 is released, the checkout stops being a prerequisite and the first line becomes:

go install github.com/P4suta/go-mutants/cmd/go-mutants@latest

That command does not work yet, and will not until the first release exists. It is written down now because the release automation that produces that tag is in this tree — see docs/release-checklist.md — and because a binary installed that way still reports its own version correctly: the module proxy records what it fetched, and go-mutants --version reads it back out of the build information when no release stamped anything. Pin a specific release with @v0.1.0 rather than @latest in CI.

go install writes the binary into go env GOPATH/bin. If that directory is not on your PATH, the three commands after cd still work — invoke the binary by its full path instead of by name.

doctor is first for a reason: go-mutants shells out to the go on your PATH, and a toolchain owned by a version manager is often not on it. If doctor says so, run go-mutants through the manager — mise exec -- go-mutants run — rather than adding Go to PATH for one command.

Then open reports/mutation/mutation.html. It is one file: double-click it, attach it to a CI job, drop it on a shared drive. It fetches nothing, so it works from file:// on a laptop with no network — see Safety model.

init is optional and changes nothing by itself: every value it writes is the built-in default, so the file is a place to start editing rather than a prerequisite. It never overwrites an existing one.

On a terminal the run draws the dashboard. Into a pipe, in CI, or under --no-tui, it prints its phases as it goes, then one line per mutant as it settles — survivors carrying their diff — then the summary. Abridged:

baseline ok: avg 1.011s, slowest 1.969s, timeout 10s (derived)
phase mutate: discovering candidates, validating them, then executing the mutants
discovered 14 candidates, 0 skips
validated 13 mutants, 0 rejections
coverage: 1 test binary, 10 of 13 mutants covered, 3 uncovered
SURVIVED (uncovered)  bf513c0d  untested.go:14:11  neq-to-eq  != -> ==  (0s)
    - !=
    + ==
mutants 13  killed 10  survived 3  timeout 0  inconclusive 0  errored 0
    not-run 0  rejected 0  uncovered 3  cached 0
score 76.92%
run 20260820T221649Z-67af  exit 0

The counters are one line on a real terminal; they are wrapped above to fit.

SURVIVED (uncovered) and the uncovered 3 column are coverage's own finding: no test binary reaches that line, so the mutant was never executed and the run knows why it survived. The column appears only in a coverage-guided run, and uncovered is a subset of survived rather than a seventh bucket — the columns still add up to mutants. cached 0 is the same kind of column on the same terms: it appears only when the cache was on, it counts outcomes this run reused rather than measured, and those mutants are already counted under the verdict they carry.

score N/A is printed instead of a percentage when nothing scoreable was measured; there is no sentinel number for it. The full document goes to the history store under your OS cache directory, and run --json writes it to standard output instead.

Every run also publishes into your own tree, at reports/mutation/: mutation.json, the Stryker-ecosystem projection, and mutation.html, the self-contained viewer. The run prints where each went, one labelled path per line, so a CI step can grep for the one it wants to attach. They are the only files go-mutants writes into a workspace; --report none turns them off, and --report json or --report html asks for one of the two. The pair is published together or not at all — a mutation.json from this run beside a mutation.html from last week is worse than either alone — and both are written only after the run's own record is safely filed.

Other flags that work today:

go-mutants run --jobs 8 --strict
go-mutants run --include './internal/**' -- go test -run TestFast ./...
go-mutants run --mutant bf513c0d
go-mutants run --no-tui
go-mutants run --explain
go-mutants run --changed=origin/main
go-mutants run --shard 1/4
go-mutants run --report none
go-mutants list --operator comparison --json
go-mutants doctor --json
go-mutants init --check
go-mutants report latest
go-mutants report merge shard-*.json --output mutation.json
go-mutants report validate mutation.json

--changed executes only the mutants sitting on lines you have changed since a ref — the merge base of it and HEAD, so a branch is measured against the commit it left rather than against whatever has landed on the target since. Bare --changed uses the upstream of HEAD and reports it by name. Its value needs an equals sign, because the ref is optional: --changed=origin/main, not --changed origin/main. What counts as changed is your working tree: edits you have not committed, and files you have not added either — every line of a file git has never seen is a new line.

--shard K/N executes only its own share, assigned from the mutant id alone so that editing one file never reshuffles the rest. Every shard discovers, validates and reports the entire catalogue, so the N documents are directly comparable — and report merge proves they describe one run before combining them into the document an unsharded run would have written.

--explain prints, underneath the usual output, every rejected mutant with the compiler's own words and every suppressed site by reason. It is the answer to "why is this smaller than I expected", and it cannot be combined with --json: everything it prints is already in the document.

--no-tui is the escape hatch for a terminal you would rather read as lines — a script session, a recorded demo. It changes nothing about what the run measures. An editor's output pane needs no flag: it is a pipe rather than a terminal, so it already gets the plain lines.

With no arguments, help is printed. The v1 command tree is run, list, doctor, init, report list|latest|validate|clean|merge, and cache status|gc|clean, and all of it is built.

Everything after -- is captured verbatim as the test command's argv; it is never handed to a shell. It replaces test.command, so a passthrough of go test over package patterns scopes the run's test binaries and keeps coverage guidance, and anything else turns coverage-guided selection off with a GOM7601 warning. The reading is of the resulting command and not of where it was written, so a passthrough that spells the default out is the default.

Working on this repository instead:

mise trust
mise install
mise run bootstrap
mise run check

Engine API

The module root also exposes package github.com/P4suta/go-mutants for tools that need mutation as an engine rather than as a score-producing command. It keeps the same safety boundary: Open freezes a disposable snapshot, Workspace.Exec runs a shell-free baseline inside it, and Prepare discovers, compile-validates, instruments, and builds the selected test binaries once. Session.Exec can then reuse those binaries for any number of mutant and top-level test or fuzz-target combinations.

workspace, err := gomutants.Open(ctx, ".")
if err != nil {
	return err
}
defer workspace.Close()

baseline, err := workspace.Exec(ctx, gomutants.Command{
	Argv: []string{"go", "test", "./..."},
})
if err != nil {
	return err
}
if baseline.TimedOut || baseline.ExitCode != 0 {
	return fmt.Errorf("baseline failed with exit %d", baseline.ExitCode)
}

session, err := workspace.Prepare(ctx, gomutants.PrepareOptions{
	Profile: "strong",
})
if err != nil {
	return err
}
defer session.Close()

result, err := session.Exec(ctx, gomutants.ExecRequest{
	Mutant: mutantID,
	Package: "example.com/project/internal/codec",
	Args: []string{"-test.run=^TestRoundTrip$"},
})

Use standard test-binary flags such as -test.run=^TestX$ and -test.fuzz=^FuzzX$; the API defines no second test DSL. Commands and targets may add ordinary KEY=VALUE environment entries, while GO_MUTANTS_* and the temporary-directory variables remain reserved. Session.Changes reports, in stable path order, anything a target wrote into the prepared snapshot. Public values use only standard-library types; discovery, instrumentation, runner, and report internals do not cross the package boundary. A fuzz target that writes standard go test fuzz v1 inputs into its private cache returns bounded copies as MutantResult.Artifacts before that cache is removed, so a caller can validate and promote a killing input without retaining session scratch.

Safety model

  • Your tree is read-only. Discovery reads it; every build, edit, and test happens in a disposable snapshot built from a sorted manifest that excludes .git, caches, and the report directory, and that rejects symlinks, junctions, and special files.
  • Run reports and cached outcomes are written outside your tree, into the OS cache directory, temp-file-then-atomic-rename. The single exception is reports/mutation/, where the JSON projection and the HTML page are published; it is excluded from snapshot and cache identity, so writing one cannot change a digest. Add it to your .gitignore — it is build output.
  • go-mutants proves a directory is its own before it deletes anything. Every workspace directory in the OS cache carries an ownership marker naming the workspace it belongs to, and cache gc and cache clean refuse any directory without one — so a truncated key collision, or somebody else's tool keeping files under the same root, is a diagnosable skip rather than a deletion.
  • Test commands are trusted project code. They run inside the snapshot with a per-worker TMPDIR, but a snapshot is not an operating-system sandbox.
  • Process trees are cleaned up. Timeouts and interrupts kill the whole tree via a Windows Job Object (fail-closed) or a POSIX process group.
  • No network, no telemetry, at any point, including the HTML report.

Exit codes

Code Meaning
0 Run completed; no policy failure
1 Opt-in gate failure only (--strict, policy.minimum_score, init --check)
2 Infrastructure, configuration, baseline, or expectation failure
130 Interrupted (Ctrl-C); a partial report is published first
143 Terminated (SIGTERM); a partial report is published first

strict defaults to false: go-mutants does not fail your build unless you ask it to, in a terminal, a pipe, and CI alike. A confirmed timeout counts as detected in the score but is always displayed separately; errors, inconclusive results, and not-run mutants are excluded from the score denominator.

Documentation

Sibling projects

go-mutants is the third in a family of mutation testing tools that share this architecture — read-only workspaces, disposable snapshots, stable IDs, strict configuration, and honest reports:

License

Licensed under either the MIT License or the Apache License 2.0, at your option. See LICENSE-MIT, LICENSE-APACHE, and third-party notices.

Documentation

Overview

Package gomutants exposes go-mutants' reusable mutation engine.

Open freezes a source tree in a disposable snapshot. A Workspace can run baseline commands against that snapshot and can be prepared exactly once. Preparing discovers, validates, and instruments the selected mutants and compiles the selected packages' test binaries once. The resulting Session then executes any number of mutant and test-target combinations without rebuilding or rewriting the user's source tree.

Commands are argv vectors and never pass through a shell. Directories are module-relative, GO_MUTANTS_ activation variables are reserved, temporary files and compiled binaries live outside the snapshot, and every child is supervised as a process tree. Workspace and Session both own temporary resources and should be closed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Path   string
	SHA256 string
	Data   []byte
}

Artifact is one bounded standard fuzz-corpus file captured before a target's private execution scratch is removed.

type Catalog

type Catalog struct {
	WorkspaceDigest string
	Digest          string
	ModulePath      string
	GoVersion       string
	Toolchain       string
	Profile         string
	Mutants         []Mutant
	Rejections      []Rejection
	TestPackages    []string
}

Catalog is the immutable public description of one prepared session. Session.Catalog returns a deep copy.

type Change

type Change struct {
	Kind         ChangeKind
	Path         string
	BeforeSHA256 string
	AfterSHA256  string
}

Change is one module-relative difference from the state captured when Prepare completed. Changes are returned in path order.

type ChangeKind

type ChangeKind string

ChangeKind describes how a prepared snapshot moved while targets ran.

const (
	ChangeAdded    ChangeKind = "added"
	ChangeRemoved  ChangeKind = "removed"
	ChangeModified ChangeKind = "modified"
)

Snapshot change kinds.

type Command

type Command struct {
	// Argv is the executable followed by its arguments. No element is split,
	// expanded, substituted, or interpreted by a shell.
	Argv []string
	// Dir is the working directory relative to the module root. Empty means
	// the module root. Absolute and escaping paths are rejected.
	Dir string
	// Env overlays the environment frozen by Open. Each element has KEY=VALUE
	// form. Activation and temporary-directory variables are reserved.
	Env []string
	// Timeout bounds the whole process tree. Zero uses a ten-minute safety
	// default. A negative duration is invalid.
	Timeout time.Duration
	// OutputLimit caps retained combined stdout and stderr. The runner's safe
	// default is used when this is not positive.
	OutputLimit int
}

Command is one shell-free process invocation in a frozen workspace.

type CommandResult

type CommandResult struct {
	ExitCode int
	TimedOut bool
	Duration time.Duration
	Output   []byte
}

CommandResult describes a command that started. A non-zero exit and a timeout are results rather than infrastructure errors.

type ExecRequest

type ExecRequest struct {
	// Mutant is a full ID or an unambiguous catalog prefix.
	Mutant string
	// Package is an import path or one module-relative package directory.
	// Empty executes the selected target in every compiled test package.
	Package string
	// Args are passed verbatim to each selected test binary. -test.timeout is
	// reserved because the session owns both timeout layers.
	Args []string
	// Env overlays the environment frozen by Open for this execution.
	Env []string
	// Timeout overrides PrepareOptions.MutantTimeout when positive. A negative
	// duration is invalid.
	Timeout time.Duration
}

ExecRequest selects one mutant and one test or fuzz target from a prepared session. Args are standard Go test-binary arguments, for example `-test.run=^TestRoundTrip$` or `-test.fuzz=^FuzzRoundTrip$`.

type Mutant

type Mutant struct {
	Index        uint32
	ID           string
	DisplayID    string
	Path         string
	Package      string
	Line         int
	Column       int
	StartByte    uint32
	EndByte      uint32
	Family       string
	Rule         string
	RuleVersion  int
	SourceDigest string
	Original     string
	Replacement  string
	Accepted     bool
}

Mutant is one canonical, deduplicated source edit.

type MutantResult

type MutantResult struct {
	ID         string
	DisplayID  string
	Outcome    Outcome
	KilledBy   string
	Duration   time.Duration
	OutputTail string
	Artifacts  []Artifact
}

MutantResult is one execution of one mutant against the selected binaries.

type OpenOptions

type OpenOptions struct {
	// GoBinary selects the go executable. Empty resolves "go" through PATH.
	GoBinary string
	// ReportDirectory is a module-relative report directory to exclude from
	// the snapshot in addition to go-mutants' conventional report directory.
	ReportDirectory string
	// TempDirectory is the parent for the snapshot and all session scratch
	// directories. Empty uses the operating system's temporary directory.
	TempDirectory string
	// Env is the complete environment to freeze for child processes. Nil
	// captures the current process environment. GO_MUTANTS_ and temporary
	// directory variables are removed and replaced by the engine as needed.
	Env []string
}

OpenOptions controls how Open freezes a workspace. Its zero value is the ordinary local invocation.

type Outcome

type Outcome string

Outcome is the stable result vocabulary returned by Session.Exec.

const (
	OutcomeNotRun       Outcome = "not_run"
	OutcomeKilled       Outcome = "killed"
	OutcomeSurvived     Outcome = "survived"
	OutcomeTimedOut     Outcome = "timed_out"
	OutcomeInconclusive Outcome = "inconclusive"
	OutcomeErrored      Outcome = "errored"
)

Mutation execution outcomes.

type PrepareOptions

type PrepareOptions struct {
	// Profile is balanced, strong, or all. Empty selects balanced.
	Profile string
	// Operators, when non-empty, selects canonical operator family or rule
	// names instead of Profile. The result is always in canonical order.
	Operators []string
	// Include and Exclude are module-relative mutation glob patterns. Excludes
	// win. They select candidates and never remove files from the snapshot.
	Include []string
	Exclude []string
	// Packages are relative Go package patterns whose test binaries are built.
	// Empty selects ./....
	Packages []string
	// Jobs bounds concurrent test-binary builds. Zero uses min(NumCPU, 8).
	Jobs int
	// BuildTimeout bounds each validation and test-binary build. Zero uses ten
	// minutes. A negative duration is invalid.
	BuildTimeout time.Duration
	// MutantTimeout is the default outer timeout used by Session.Exec. Zero
	// uses ten seconds. An ExecRequest may override it with a positive value.
	MutantTimeout time.Duration
	// Verify is run once after instrumentation with no mutant active. Its zero
	// value means `go test ./...`. Vet is disabled only for this generated tree.
	Verify Command
}

PrepareOptions selects and prepares a reusable mutation session.

type Rejection

type Rejection struct {
	ID         string
	DisplayID  string
	Path       string
	Line       int
	Column     int
	Rule       string
	Diagnostic string
}

Rejection is a catalogued mutant that validation proved does not compile.

type Session

type Session struct {
	// contains filtered or unexported fields
}

Session is a discovered, validated, instrumented snapshot with test binaries compiled once. Its zero value is not usable. A Session permits concurrent Exec calls; Changes and Close wait for those calls to finish.

func (*Session) Catalog

func (s *Session) Catalog() Catalog

Catalog returns a deep copy of the session's deterministic catalog.

func (*Session) Changes

func (s *Session) Changes() ([]Change, error)

Changes compares the current snapshot with the state captured after preparation. It waits for in-flight Exec calls so the result cannot observe a target halfway through a write.

func (*Session) Close

func (s *Session) Close() error

Close waits for target executions and releases the session's binaries and scratch files. It is idempotent. Closing a Session does not close its parent Workspace; closing the Workspace closes both.

func (*Session) Exec

func (s *Session) Exec(ctx context.Context, request ExecRequest) (MutantResult, error)

Exec runs one mutant against a selected test or fuzz target without rebuilding the prepared test binaries.

type Workspace

type Workspace struct {
	// contains filtered or unexported fields
}

Workspace is a frozen disposable copy of one module. Its zero value is not usable. Open constructs one and Close releases it.

func Open

func Open(ctx context.Context, root string, options ...OpenOptions) (*Workspace, error)

Open locates the Go toolchain and copies root into a disposable snapshot. At most one OpenOptions value may be supplied.

func (*Workspace) Close

func (w *Workspace) Close() error

Close stops accepting work and removes the session scratch directory and snapshot. It is idempotent and waits for in-flight Session.Exec calls.

func (*Workspace) Exec

func (w *Workspace) Exec(ctx context.Context, command Command) (CommandResult, error)

Exec runs command against the frozen snapshot. It is available before Prepare; after instrumentation begins, commands belong to Session targets.

func (*Workspace) Prepare

func (w *Workspace) Prepare(ctx context.Context, options PrepareOptions) (*Session, error)

Prepare discovers, validates, instruments, verifies, and builds one reusable mutation session. A Workspace may be prepared exactly once, including when preparation fails after it has begun.

Directories

Path Synopsis
cmd
go-mutants command
Command go-mutants is the mutation testing CLI for Go modules.
Command go-mutants is the mutation testing CLI for Go modules.
internal
cache
Package cache stores the outcome of one mutant so that a later run of the same code, by the same build, against the same command, need not measure it again.
Package cache stores the outcome of one mutant so that a later run of the same code, by the same build, against the same command, need not measure it again.
cli
Package cli is the go-mutants command tree.
Package cli is the go-mutants command tree.
config
Package config reads .go-mutants.toml and resolves it against built-in defaults and command-line flags.
Package config reads .go-mutants.toml and resolves it against built-in defaults and command-line flags.
console
Package console renders an engine event stream as plain lines.
Package console renders an engine event stream as plain lines.
coverage
Package coverage reads Go coverage profiles and decides which test binaries each mutant needs to be measured against.
Package coverage reads Go coverage profiles and decides which test binaries each mutant needs to be measured against.
discover
Package discover finds the mutation candidates in a snapshot.
Package discover finds the mutation candidates in a snapshot.
drift
Package drift identifies snapshot changes that mutation instrumentation did not make.
Package drift identifies snapshot changes that mutation instrumentation did not make.
engine
Package engine orchestrates one mutation run and reports what it is doing through a single stream of events.
Package engine orchestrates one mutation run and reports what it is doing through a single stream of events.
execute
Package execute builds a snapshot's test binaries once and then schedules every mutant against them.
Package execute builds a snapshot's test binaries once and then schedules every mutant against them.
gitdiff
Package gitdiff answers one question: which lines of the workspace have changed since a given ref.
Package gitdiff answers one question: which lines of the workspace have changed since a given ref.
glob
Package glob implements the path matching language that decides which files go-mutants mutates.
Package glob implements the path matching language that decides which files go-mutants mutates.
gocmd
Package gocmd finds the Go toolchain and describes how to invoke it.
Package gocmd finds the Go toolchain and describes how to invoke it.
instrument
Package instrument rewrites snapshot source bytes so that every compilable mutant of a file lives in the file at once, dormant behind a guard.
Package instrument rewrites snapshot source bytes so that every compilable mutant of a file lives in the file at once, dormant behind a guard.
interval
Package interval composes overlapping byte spans into a forest of nested rewrite sites.
Package interval composes overlapping byte spans into a forest of nested rewrite sites.
mutation
Package mutation holds the pure core of go-mutants: byte spans, the stable mutant identity, the operator registry, the mutant catalogue, run outcomes, the mutation score, and the exit-code policy.
Package mutation holds the pure core of go-mutants: byte spans, the stable mutant identity, the operator registry, the mutant catalogue, run outcomes, the mutation score, and the exit-code policy.
operatorselect
Package operatorselect resolves mutation profiles, family names, and rule names against the canonical registry.
Package operatorselect resolves mutation profiles, family names, and rule names against the canonical registry.
report
Package report is the RunReport v1 document: the lossless record of one mutation run, and the store it is kept in.
Package report is the RunReport v1 document: the lossless record of one mutation run, and the store it is kept in.
runner
Package runner starts one child process, supervises its whole process tree, and returns what happened.
Package runner starts one child process, supervises its whole process tree, and returns what happened.
schemas
Package schemas validates go-mutants JSON documents against the schemas embedded in the binary.
Package schemas validates go-mutants JSON documents against the schemas embedded in the binary.
snapshot
Package snapshot copies a source tree into a disposable working directory so that mutation testing never writes to the tree a user is editing.
Package snapshot copies a source tree into a disposable working directory so that mutation testing never writes to the tree a user is editing.
testflag
Package testflag recognises flags passed directly to a Go test binary.
Package testflag recognises flags passed directly to a Go test binary.
testsupport
Package testsupport holds the test helpers that more than one package needs.
Package testsupport holds the test helpers that more than one package needs.
tui
Package tui renders an engine event stream as a live dashboard.
Package tui renders an engine event stream as a live dashboard.
validate
Package validate compiles an instrumented snapshot and finds out, one build at a time, which of its mutants are real.
Package validate compiles an instrumented snapshot and finds out, one build at a time, which of its mutants are real.
Package schema carries the JSON Schema documents go-mutants publishes, and nothing else.
Package schema carries the JSON Schema documents go-mutants publishes, and nothing else.
stryker
Package stryker carries the vendored mutation-testing-report schema, and nothing else.
Package stryker carries the vendored mutation-testing-report schema, and nothing else.
Package vendorassets carries the third-party browser assets the HTML report is built from, and nothing else.
Package vendorassets carries the third-party browser assets the HTML report is built from, and nothing else.

Jump to

Keyboard shortcuts

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