Documentation
¶
Overview ¶
Package model defines the format-agnostic coverage types that all coverage parsers produce and all coverage renderers consume.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BranchCov ¶
type BranchCov struct {
Line int
Block int
Index int
Taken int // -1 = not reachable, 0 = not taken, >0 = taken count
}
BranchCov records one branch outcome (true/false side of a conditional).
type CovReport ¶
CovReport is the top-level, format-independent coverage result.
type FileCov ¶
type FileCov struct {
Path string // normalised relative path (e.g. "src/core/parser.go")
Lines []LineCov
Branches []BranchCov
Funcs []FuncCov
// Precomputed totals (populated by parsers or via Compute).
LinesTotal int
LinesCovered int
BranchTotal int
BranchCovered int
FuncTotal int
FuncCovered int
}
FileCov holds all coverage data for one source file.
func (*FileCov) Compute ¶
func (f *FileCov) Compute()
Compute fills the precomputed totals from the raw slice data. Call this after a parser has finished populating Lines/Branches/Funcs.
Click to show internal directories.
Click to hide internal directories.