coverage

package
v0.15.5 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const MimeType = "application/json+coverage"

MimeType used by coverage reports.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Name            string  `json:"filename"`
	Digest          string  `json:"checksum,omitempty"`
	Coverage        []*int  `json:"coverage"`
	Covered         float64 `json:"covered_percent,omitempty"`
	CoveredStrength float64 `json:"covered_strength,omitempty"`
	CoveredLines    int     `json:"covered_lines,omitempty"`
	TotalLines      int     `json:"lines_of_code"`
}

File represents a coverage report for a single file.

type Metrics

type Metrics struct {
	Covered         float64 `json:"covered_percent"`
	CoveredStrength float64 `json:"covered_strength"`
	CoveredLines    int     `json:"covered_lines"`
	TotalLines      int     `json:"total_lines"`
}

Metrics represents total coverage metrics for all files.

type Report

type Report struct {
	Timestamp int64   `json:"timestmp,omitempty"`
	Command   string  `json:"command_name,omitempty"`
	Files     []File  `json:"files"`
	Metrics   Metrics `json:"metrics"`
}

Report represents a coverage report.

func (*Report) WriteTo

func (r *Report) WriteTo(w *multipart.Writer) error

WriteTo writes the report to multipart.Writer w.

Jump to

Keyboard shortcuts

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