coverage

package
v2.8.3 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CoveredPercentage

func CoveredPercentage(total, covered int64) int

Types

type Config

type Config struct {
	Profile      string
	LocalPrefix  string
	ExcludePaths []string
}

type FuncExtent

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

FuncExtent describes a function's extent in the source by file and position.

type FuncVisitor

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

FuncVisitor implements the visitor that builds the function position list for a file.

func (*FuncVisitor) Visit

func (v *FuncVisitor) Visit(node ast.Node) ast.Visitor

Visit implements the ast.Visitor interface.

type Stats

type Stats struct {
	Name      string
	Total     int64
	Covered   int64
	Threshold int
}

func CalcTotalStats

func CalcTotalStats(coverageStats []Stats) Stats

func GenerateCoverageStats

func GenerateCoverageStats(cfg Config) ([]Stats, error)

func (Stats) CoveredPercentage

func (s Stats) CoveredPercentage() int

Jump to

Keyboard shortcuts

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