covermerger

package
v0.0.0-...-4b25d55 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyKernelRepo   = "kernel_repo"
	KeyKernelBranch = "kernel_branch"
	KeyKernelCommit = "kernel_commit"
	KeyFilePath     = "file_path"
	KeyStartLine    = "sl"
	KeyHitCount     = "hit_count"
)

Variables

This section is empty.

Functions

func GetFileVersion

func GetFileVersion(filePath, repo, commit string) (string, error)

func MakeBQCSVReader

func MakeBQCSVReader() *bqCSVReader

func MergeCSVData

func MergeCSVData(config *Config, reader io.Reader) (map[string]*MergeResult, error)

Types

type Config

type Config struct {
	Jobs    int
	Workdir string

	Base             RepoCommit
	FileVersProvider FileVersProvider
	StoreDetails     bool
	// contains filtered or unexported fields
}

type DeletedFileLineMerger

type DeletedFileLineMerger struct {
}

func (*DeletedFileLineMerger) Add

func (*DeletedFileLineMerger) Result

func (a *DeletedFileLineMerger) Result() *MergeResult

type FileCoverageMerger

type FileCoverageMerger interface {
	Add(record *FileRecord)
	Result() *MergeResult
}

type FileLineCoverMerger

type FileLineCoverMerger struct {
	*MergeResult
	// contains filtered or unexported fields
}

func (*FileLineCoverMerger) Add

func (a *FileLineCoverMerger) Add(record *FileRecord)

func (*FileLineCoverMerger) Result

func (a *FileLineCoverMerger) Result() *MergeResult

type FileRecord

type FileRecord struct {
	FilePath string
	RepoCommit
	StartLine int
	HitCount  int
}

type FileRecords

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

type FileVersProvider

type FileVersProvider interface {
	GetFileVersions(targetFilePath string, repoCommits ...RepoCommit,
	) (fileVersions, error)
}

func MakeMonoRepo

func MakeMonoRepo(workdir string) FileVersProvider

func MakeWebGit

func MakeWebGit(funcProxy FuncProxyURI) FileVersProvider

type FuncProxyURI

type FuncProxyURI func(filePath, commit string) string

type LineToLineMatcher

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

func (*LineToLineMatcher) SameLinePos

func (lm *LineToLineMatcher) SameLinePos(line int) int

type MergeResult

type MergeResult struct {
	HitCounts   map[int]int
	FileExists  bool
	LineDetails map[int][]*FileRecord
}

type RepoCommit

type RepoCommit struct {
	Repo   string
	Commit string
}

Jump to

Keyboard shortcuts

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