statement

package
v2.7.6 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MutatorDeferRemove added in v2.6.7

func MutatorDeferRemove(_ *types.Package, _ *types.Info, node ast.Node) []mutator.Mutation

MutatorDeferRemove removes the defer keyword, turning deferred calls into immediate calls. This tests whether the timing of cleanup matters for correctness — e.g. mutex unlocks, file closes, and span finishes that must happen after (not during) the function body.

func MutatorRemoveSelfAssign added in v2.6.1

func MutatorRemoveSelfAssign(_ *types.Package, _ *types.Info, node ast.Node) []mutator.Mutation

MutatorRemoveSelfAssign removes self-assignment statements (a = a). Mirrors gremlins' REMOVE_SELF_ASSIGNMENTS operator.

func MutatorRemoveStatement

func MutatorRemoveStatement(pkg *types.Package, info *types.Info, node ast.Node) []mutator.Mutation

MutatorRemoveStatement implements a mutator to remove statements.

func MutatorReturnValue added in v2.6.0

func MutatorReturnValue(pkg *types.Package, info *types.Info, node ast.Node) []mutator.Mutation

MutatorReturnValue replaces each non-zero return value with the zero value for its type (false, 0, "", nil, TypeName{}).

Types

This section is empty.

Jump to

Keyboard shortcuts

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