coverage

package
v2.15.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: GPL-3.0 Imports: 19 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 StatsPluckName added in v2.12.0

func StatsPluckName(stats []Stats) []string

func StatsSearchMap added in v2.11.0

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

func StatsSerialize added in v2.12.1

func StatsSerialize(stats []Stats) []byte

Types

type Config

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

type Stats

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

func GenerateCoverageStats

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

func StatsCalcTotal added in v2.12.1

func StatsCalcTotal(stats []Stats) Stats

func StatsDeserialize added in v2.12.1

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

func StatsFilterWithCoveredLines added in v2.12.0

func StatsFilterWithCoveredLines(stats []Stats) []Stats

func StatsFilterWithUncoveredLines added in v2.12.0

func StatsFilterWithUncoveredLines(stats []Stats) []Stats

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) UncoveredLinesCount added in v2.12.0

func (s Stats) UncoveredLinesCount() int

Jump to

Keyboard shortcuts

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