loadcov

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 21 Imported by: 0

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 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, relFiles []string, diffBase string) (*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
	DiffBase string

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

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