Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsLineChanged ¶
func IsLineChanged(cl ChangedLines, absFile string, line int) bool
IsLineChanged reports whether absFile at the given line falls within any changed range in cl.
When line == 0 (position could not be determined), the function returns true to avoid filtering mutations at unknown positions.
When a file is present in cl but line falls outside every changed range, false is returned — the mutation targets an unchanged line. When a file is absent from cl entirely, all of its mutations are filtered.
Types ¶
type ChangedLines ¶
ChangedLines maps relative file paths (from repo root, forward-slash separated) to the line ranges that were added or modified in the diff. A nil ChangedLines means "no filter" — all mutations are run.
func ParseChangedLines ¶
func ParseChangedLines(base string) (ChangedLines, error)
ParseChangedLines runs `git diff --unified=0 <base>` and returns each modified file's changed line ranges. Deleted-only hunks (count == 0) are excluded — there is nothing to mutate on a removed line.