loadcov

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

package loadcov is a high level load function specifically for coverage

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeCoverageSummary added in v0.0.7

func ComputeCoverageSummary(project *model.ProjectAnnotation) map[string]*cov_model.Summary

func ConvertToBinaryProfile

func ConvertToBinaryProfile(res []*coverage.CovLine) (coverage_model.BinaryProfile, error)

func LoadAll

func LoadAll(opts LoadAllOptions) (*model.ProjectAnnotation, error)

func LoadCoverageProfileFiles

func LoadCoverageProfileFiles(modPath string, files []string, excludePrefix []string) (*ann_model.ProjectAnnotation, error)

func LoadGitDiff

func LoadGitDiff(dir string, ref string, diffBase string, relFiles []string) (*model.ProjectAnnotation, error)

func LoadOptionalCoverageProfileFiles added in v0.0.7

func LoadOptionalCoverageProfileFiles(modPath string, files []string, excludePrefix []string) (*ann_model.ProjectAnnotation, error)

func LoadStatic

func LoadStatic(astLoadInfo ast.LoadInfo, opts LodOpts) (*model.ProjectAnnotation, error)

func ParseProfiles

func ParseProfiles(files []string, excludePrefix []string) ([]*coverage.CovLine, error)

Types

type Block

type Block struct {
	Start Pos
	End   Pos
}

func (*Block) String

func (c *Block) String() string

type CoverageBlock

type CoverageBlock struct {
	FileName string // format: <pkg>/<file>, NOTE: ends with .go
	Block
	NumStmts int
	Count    int
}

func (*CoverageBlock) FormatWithCount

func (c *CoverageBlock) FormatWithCount(count int) string

func (*CoverageBlock) String

func (c *CoverageBlock) String() string

type LoadAllOptions

type LoadAllOptions struct {
	Dir      string
	Args     []string
	Profiles []string
	Ref      string
	DiffBase string

	// file filter
	Include []string
	Exclude []string

	OnlyChangedFiles bool
}

type LodOpts

type LodOpts struct {
	LoadFuncInfo bool
}

type Pos

type Pos struct {
	Line int
	Col  int
}

Jump to

Keyboard shortcuts

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