parser

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Class

type Class struct {
	Filename string `xml:"filename,attr"`
	Lines    []Line `xml:"lines>line"`
}

Class represents a class/file in the coverage report

type CoverageJSON

type CoverageJSON struct {
	Files map[string]FileCoverageJSON `json:"files"`
}

CoverageJSON represents the structure of Python coverage JSON

type CoverageReport

type CoverageReport struct {
	XMLName  xml.Name  `xml:"coverage"`
	Packages []Package `xml:"packages>package"`
}

CoverageReport represents the root XML element

type FileCoverageJSON

type FileCoverageJSON struct {
	ExecutedLines []int       `json:"executed_lines"`
	MissingLines  []int       `json:"missing_lines"`
	Summary       SummaryJSON `json:"summary"`
}

FileCoverageJSON represents coverage data for a single file in JSON

type GoCoverParser

type GoCoverParser struct {
	// contains filtered or unexported fields
}

GoCoverParser parses Go coverage format (.out) files

func NewGoCoverParser

func NewGoCoverParser() *GoCoverParser

NewGoCoverParser creates a new Go coverage parser instance

func (*GoCoverParser) GetMode

func (p *GoCoverParser) GetMode() string

GetMode returns the coverage mode (set, count, or atomic)

func (*GoCoverParser) GetWarnings

func (p *GoCoverParser) GetWarnings() []string

GetWarnings returns all warnings collected during parsing

func (*GoCoverParser) Parse

func (p *GoCoverParser) Parse(reader io.Reader) (*models.CoverageReport, error)

Parse reads and parses a Go coverage format file Format: mode: set|count|atomic Then: file:startLine.startCol,endLine.endCol numberOfStatements count

type LCOVParser

type LCOVParser struct {
	// contains filtered or unexported fields
}

LCOVParser parses LCOV format coverage files

func NewLCOVParser

func NewLCOVParser() *LCOVParser

NewLCOVParser creates a new LCOV parser instance

func (*LCOVParser) GetWarnings

func (p *LCOVParser) GetWarnings() []string

GetWarnings returns all warnings collected during parsing

func (*LCOVParser) Parse

func (p *LCOVParser) Parse(reader io.Reader) (*models.CoverageReport, error)

Parse reads and parses an LCOV format coverage file

type Line

type Line struct {
	Number int `xml:"number,attr"`
	Hits   int `xml:"hits,attr"`
}

Line represents a line in the coverage report

type Package

type Package struct {
	Classes []Class `xml:"classes>class"`
}

Package represents a package in the coverage report

type PyCoverJSONParser

type PyCoverJSONParser struct {
	// contains filtered or unexported fields
}

PyCoverJSONParser parses Python coverage JSON format

func NewPyCoverJSONParser

func NewPyCoverJSONParser() *PyCoverJSONParser

NewPyCoverJSONParser creates a new Python JSON coverage parser instance

func (*PyCoverJSONParser) GetWarnings

func (p *PyCoverJSONParser) GetWarnings() []string

GetWarnings returns all warnings collected during parsing

func (*PyCoverJSONParser) Parse

func (p *PyCoverJSONParser) Parse(reader io.Reader) (*models.CoverageReport, error)

Parse reads and parses a Python coverage JSON file

type PyCoverXMLParser

type PyCoverXMLParser struct {
	// contains filtered or unexported fields
}

PyCoverXMLParser parses Python coverage XML format (Cobertura-compatible)

func NewPyCoverXMLParser

func NewPyCoverXMLParser() *PyCoverXMLParser

NewPyCoverXMLParser creates a new Python XML coverage parser instance

func (*PyCoverXMLParser) GetWarnings

func (p *PyCoverXMLParser) GetWarnings() []string

GetWarnings returns all warnings collected during parsing

func (*PyCoverXMLParser) Parse

func (p *PyCoverXMLParser) Parse(reader io.Reader) (*models.CoverageReport, error)

Parse reads and parses a Python coverage XML file

type SummaryJSON

type SummaryJSON struct {
	CoveredLines  int `json:"covered_lines"`
	NumStatements int `json:"num_statements"`
}

SummaryJSON represents the summary data

Jump to

Keyboard shortcuts

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