jacoco

package
v0.0.0-...-6b86c04 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidReport = errors.New("invalid report")

Functions

This section is empty.

Types

type Class

type Class struct {
	Name     string    `xml:"name,attr"`
	FileName string    `xml:"sourcefilename,attr"`
	Methods  []Method  `xml:"method"`
	Counters []Counter `xml:"counter"`
}

type Counter

type Counter struct {
	Type    CounterType `xml:"type,attr"`
	Missed  int         `xml:"missed,attr"`
	Covered int         `xml:"covered,attr"`
}

type CounterType

type CounterType int
const (
	CounterTypeUnknown CounterType = iota
	CounterTypeInstruction
	CounterTypeLine
	CounterTypeComplexity
	CounterTypeMethod
	CounterTypeClass
)

func (CounterType) String

func (c CounterType) String() string

func (*CounterType) UnmarshalText

func (c *CounterType) UnmarshalText(text []byte) error

type Line

type Line struct {
	Number         int `xml:"nr,attr"`
	MissedCalls    int `xml:"mi,attr"`
	HitCalls       int `xml:"ci,attr"`
	MissedBranches int `xml:"mb,attr"`
	CalledBranches int `xml:"cb,attr"`
}

type Method

type Method struct {
	Name     string    `xml:"name,attr"`
	Desc     string    `xml:"desc,attr"`
	Line     int       `xml:"line,attr"`
	Counters []Counter `xml:"counter"`
}

type Package

type Package struct {
	Name        string       `xml:"name,attr"`
	Counters    []Counter    `xml:"counter"`
	Classes     []Class      `xml:"class"`
	SourceFiles []SourceFile `xml:"sourcefile"`
}

type Report

type Report struct {
	// Name is the name of the report.
	// This is usually the same as the artifactId or name of the Maven/Gradle project.
	Name string `xml:"name,attr"`

	Counters []Counter `xml:"counter"`
	Packages []Package `xml:"package"`
}

Report is a JaCoCo-specific report.

func ParseReport

func ParseReport(report []byte) (Report, error)

type SourceFile

type SourceFile struct {
	Name     string    `xml:"name,attr"`
	Lines    []Line    `xml:"line"`
	Counters []Counter `xml:"counter"`
}

Jump to

Keyboard shortcuts

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