store

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2017 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CSV = iota
	Checkstyle
	Unknown
)

Variables

This section is empty.

Functions

func CommitMeasureCommand

func CommitMeasureCommand(prefix string) *exec.Cmd

func CommitMeasures

func CommitMeasures(gitlog *exec.Cmd) (func() (CommitMeasure, error), error)

func GetCommitterName

func GetCommitterName() (string, error)

func GetExclusions

func GetExclusions(prefix string, hash string) ([]string, error)

func GitLog

func GitLog(ref string, commitrange string, format string) *exec.Cmd

func ParseExclusion

func ParseExclusion(ex string) ([]string, error)

func PushNotes

func PushNotes(ref string) error

func PutMeasures

func PutMeasures(prefix string, m []Measure) error

func WriteExclusion

func WriteExclusion(prefix string, ex Exclusion) error

func WriteMeasures

func WriteMeasures(measures []Measure, w io.Writer) error

func WriteNotes

func WriteNotes(writef func(io.Writer) error, ref string) error

Types

type ByName

type ByName []Measure

func (ByName) Len

func (a ByName) Len() int

func (ByName) Less

func (a ByName) Less(i, j int) bool

func (ByName) Swap

func (a ByName) Swap(i, j int)

type CommitMeasure

type CommitMeasure struct {
	CommitHash string
	Timestamp  time.Time
	Committer  string
	Measures   []Measure
}

func (*CommitMeasure) String

func (cm *CommitMeasure) String() string

type Exclusion

type Exclusion struct {
	Committer string
	Excuse    string
	Measure   []string
}

type InputType added in v0.1.3

type InputType int

func ParseInputType added in v0.1.3

func ParseInputType(input string) InputType

type Measure

type Measure struct {
	Name     string
	Value    int
	Baseline int
}

func CompareMeasures

func CompareMeasures(prefix string, hash string, storedm []Measure, computedm []Measure, slack float64, usePercents bool, zeroOnMissing bool) ([]Measure, error)

func ParseMeasures

func ParseMeasures(r io.Reader, t InputType) ([]Measure, error)

func ParseMeasuresCSV added in v0.1.3

func ParseMeasuresCSV(r io.Reader) ([]Measure, error)

func ParseMeasuresCheckstyle added in v0.1.3

func ParseMeasuresCheckstyle(r io.Reader) ([]Measure, error)

Jump to

Keyboard shortcuts

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