coverage

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DescribeAtom

func DescribeAtom(atom gitdiff.Atom) string

Types

type Assignment

type Assignment struct {
	Target   string `json:"target"`
	DiffFile string `json:"diff_file"`
	Diff     int    `json:"diff"`
}

type Orphan

type Orphan struct {
	Assignment Assignment         `json:"assignment"`
	Reference  saga.DiffReference `json:"reference"`
	Reason     string             `json:"reason"`
}

type Overlap

type Overlap struct {
	Atom      gitdiff.Atom `json:"atom"`
	CoveredBy []Assignment `json:"covered_by"`
}

type Report

type Report struct {
	Complete      bool                    `json:"complete"`
	CoverageScope string                  `json:"coverage_scope"`
	Summary       Summary                 `json:"summary"`
	Uncovered     []gitdiff.Atom          `json:"uncovered"`
	Overlaps      []Overlap               `json:"overlaps"`
	Orphans       []Orphan                `json:"orphans"`
	Targets       []TargetSummary         `json:"targets"`
	SagaChanges   []gitdiff.Atom          `json:"saga_changes"`
	Repository    string                  `json:"repository"`
	Base          string                  `json:"base"`
	Head          string                  `json:"head"`
	BaseOID       string                  `json:"base_oid"`
	HeadOID       string                  `json:"head_oid"`
	SchemaValid   bool                    `json:"schema_valid"`
	SchemaIssues  []saga.Issue            `json:"schema_issues"`
	Ownership     map[string][]Assignment `json:"-"`
}

Report is a machine-consumed contract. Every collection field is always present and never null, so an agent can index into it without first testing for a missing key: a complete saga reports "uncovered": [] rather than omitting the field or emitting null.

func Evaluate

func Evaluate(document *saga.Saga, validation saga.Validation, changes gitdiff.ChangeSet) Report

type Summary

type Summary struct {
	Total       int `json:"total"`
	Covered     int `json:"covered"`
	Uncovered   int `json:"uncovered"`
	Overlapping int `json:"overlapping"`
	Orphaned    int `json:"orphaned"`
	SagaChanges int `json:"saga_changes"`
}

type TargetSummary

type TargetSummary struct {
	Target  string `json:"target"`
	Covered int    `json:"covered"`
}

Jump to

Keyboard shortcuts

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