scopedrepository

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScopedRepository

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

ScopedRepository narrows a release to named byte ranges of named files.

It exists for the case ditto is built for: a change is staged, only the lines it touched are worth measuring, and every mutant outside them costs a full run of the test command to confirm something the change did not ask about.

The ranges are handed to each file rather than kept in one set, because byte offsets only mean anything against the file they were measured in. A scope that has lost track of which file a range came from makes every file answer to every range, and the work grows as the square of the number of files rather than in proportion to them.

func New

func New(ranges map[string][]gosourcefile.Range, delegate ditto.Repository) *ScopedRepository

func (*ScopedRepository) LinkAllToTemporaryRepository

func (r *ScopedRepository) LinkAllToTemporaryRepository(temporaryPath string) ditto.TemporaryRepository

func (*ScopedRepository) ListGoSourceFiles

func (r *ScopedRepository) ListGoSourceFiles() []*gosourcefile.GoSourceFile

ListGoSourceFiles keeps only the files the scope names, each restricted to its own ranges.

A file with no entry is dropped rather than mutated whole: it holds no changed line, so every mutant in it would measure code the change never touched.

Jump to

Keyboard shortcuts

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