coverage

package
v2.11.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const IgnoreText = "coverage-ignore"

Variables

View Source
var ErrInvalidFormat = errors.New("invalid format")

Functions

func CoveredPercentage

func CoveredPercentage(total, covered int64) int

func SerializeStats added in v2.11.0

func SerializeStats(stats []Stats) []byte

func StatsSearchMap added in v2.11.0

func StatsSearchMap(stats []Stats) map[string]Stats

Types

type Config

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

type Stats

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

func CalcTotalStats

func CalcTotalStats(stats []Stats) Stats

func DeserializeStats added in v2.11.0

func DeserializeStats(b []byte) ([]Stats, error)

func GenerateCoverageStats

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

func (Stats) CoveredPercentage

func (s Stats) CoveredPercentage() int

func (Stats) CoveredPercentageF added in v2.11.0

func (s Stats) CoveredPercentageF() float64

func (Stats) Str added in v2.11.0

func (s Stats) Str() string

func (Stats) UncoveredLines added in v2.11.0

func (s Stats) UncoveredLines() int

Jump to

Keyboard shortcuts

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