exago

package
v0.0.0-...-e0f7ac1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeStatsName    = "codestats"
	ThirdPartiesName = "thirdparties"
	TestCoverageName = "testcoverage"
	TestDurationName = "testduration"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Checklist

type Checklist struct {
	Failed []string `json:"failed"`
	Passed []string `json:"passed"`
}

type ChecklistItem

type ChecklistItem struct {
	Category string `json:"category"`
	Desc     string `json:"desc"`
	Name     string `json:"name"`
}

type CoveragePackage

type CoveragePackage struct {
	Name     string  `json:"name"`
	Path     string  `json:"path"`
	Coverage float64 `json:"coverage"`
}

type Data

type Data struct {
	Results  Results           `json:"results"`
	Metadata Metadata          `json:"metadata"`
	Score    Score             `json:"score"`
	Errors   map[string]string `json:"errors,omitempty"`
}

type EvaluatorResponse

type EvaluatorResponse struct {
	Name    string               `json:"name"`
	Score   float64              `json:"score"`
	Weight  float64              `json:"weight"`
	Desc    string               `json:"desc,omitempty"`
	Message string               `json:"msg"`
	URL     string               `json:"url,omitempty"`
	Details []*EvaluatorResponse `json:"details,omitempty"`
}

type Imports

type Imports []string

Imports stores the list of imports

type LinterMessage

type LinterMessage struct {
	Column   int    `json:"column"`
	Message  string `json:"message"`
	Row      int    `json:"row"`
	Severity string `json:"severity"`
}

type LinterResult

type LinterResult struct {
	Linter   string          `json:"linter"`
	Messages []LinterMessage `json:"messages"`
}

type LinterResults

type LinterResults map[string][]LinterResult

filename: []messages

type Metadata

type Metadata struct {
	Image       string    `json:"image"`
	Description string    `json:"description"`
	Stars       int       `json:"stars"`
	LastPush    time.Time `json:"last_push"`
}

type Results

type Results struct {
	Coverage struct {
		Label string `json:"label"`
		Data  struct {
			Packages []CoveragePackage `json:"packages"`
			Coverage float64           `json:"coverage"`
		} `json:"data"`
		RawOutput     string  `json:"rawOutput"`
		ExecutionTime float64 `json:"executionTime"`
	} `json:"coverage"`
	Download struct {
		Label         string      `json:"label"`
		Data          interface{} `json:"data"`
		RawOutput     string      `json:"rawOutput"`
		ExecutionTime float64     `json:"executionTime"`
	} `json:"download"`
	CodeStats struct {
		Label         string         `json:"label"`
		Data          map[string]int `json:"data"`
		RawOutput     string         `json:"rawOutput"`
		ExecutionTime float64        `json:"executionTime"`
	} `json:"codeStats"`
	Checklist struct {
		Label         string    `json:"label"`
		Data          Checklist `json:"data"`
		RawOutput     string    `json:"rawOutput"`
		ExecutionTime float64   `json:"executionTime"`
	} `json:"checklist"`
	Test struct {
		Label         string        `json:"label"`
		Data          []TestPackage `json:"data"`
		RawOutput     string        `json:"rawOutput"`
		ExecutionTime float64       `json:"executionTime"`
	} `json:"test"`
	ThirdParties struct {
		Label         string   `json:"label"`
		Data          []string `json:"data"`
		RawOutput     string   `json:"rawOutput"`
		ExecutionTime float64  `json:"executionTime"`
	} `json:"thirdParties"`
	Linters struct {
		Label         string        `json:"label"`
		Data          LinterResults `json:"data"`
		RawOutput     string        `json:"rawOutput"`
		ExecutionTime float64       `json:"executionTime"`
	} `json:"linters"`
}

Results received from the test runner.

func (Results) GetMeanCodeCov

func (t Results) GetMeanCodeCov() float64

GetAvgCodeCov returns the code coverage average.

func (Results) GetMeanTestDuration

func (t Results) GetMeanTestDuration() float64

GetAvgTestDuration returns the average test duration.

type Score

type Score struct {
	Value   float64              `json:"value"`
	Rank    string               `json:"rank"`
	Details []*EvaluatorResponse `json:"details,omitempty"`
}

type TestFile

type TestFile struct {
	Name          string  `json:"name"`
	ExecutionTime float64 `json:"executionTime"`
	Passed        bool    `json:"passed"`
}

type TestPackage

type TestPackage struct {
	Name          string     `json:"name"`
	ExecutionTime float64    `json:"executionTime"`
	Success       bool       `json:"success"`
	Tests         []TestFile `json:"tests"`
}

Directories

Path Synopsis
analysis
cov
score
Package score defines interface and generic receiver to be implemented by each criteria evaluator
Package score defines interface and generic receiver to be implemented by each criteria evaluator

Jump to

Keyboard shortcuts

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