coverage

package
v2.0.0-...-ea0f0bb Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 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

func SerializeStats(stats []Stats) []byte

func StatsSearchMap

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

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

func (s Stats) CoveredPercentageF() float64

func (Stats) Str

func (s Stats) Str() string

func (Stats) UncoveredLines

func (s Stats) UncoveredLines() int

Jump to

Keyboard shortcuts

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