coverfile

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package coverfile parses Covet reports and formats files in the diff

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiffChunk

type DiffChunk struct {
	FirstLine, LastLine uint
	Lines               []string
}

DiffChunk is a chunk of lines parsed from a Covet report. Includes the associated beginning and end line numbers of the chunk and the diff-like lines of text from the file.

NOTE: This struct is in package 'coverfile' to expose in the main 'covet' package while breaking import cycles. Avoid exporting any methods or unnecessary data fields.

func DiffChunks

func DiffChunks(file File, fileReader io.Reader) ([]DiffChunk, error)

DiffChunks return diff-like Chunks from a covet.File and the file contents' Reader.

type File

type File struct {
	Name      string
	Covered   uint
	Uncovered uint
	Lines     []Line
}

File represents a file parsed in a Covet report. Includes the file name and which lines are covered.

NOTE: This struct is in package 'coverfile' to expose in the main 'covet' package while breaking import cycles. Avoid exporting any methods or unnecessary data fields.

type Line

type Line struct {
	Covered    bool
	LineNumber uint
}

Line represents a line in a file parsed in a Covet report

NOTE: This struct is in package 'coverfile' to expose in the main 'covet' package while breaking import cycles. Avoid exporting any methods or unnecessary data fields.

Jump to

Keyboard shortcuts

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