Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ByFilename ¶
type ByFilename []FileSummary
ByFilename implements sort.Interface for []Person based on the Age field.
func (ByFilename) Len ¶
func (a ByFilename) Len() int
func (ByFilename) Less ¶
func (a ByFilename) Less(i, j int) bool
func (ByFilename) Swap ¶
func (a ByFilename) Swap(i, j int)
type Check ¶
type Check interface { Name() string Description() string Weight() float64 // Percentage returns the passing percentage of the check, // as well as a map of filename to output Percentage() (float64, []FileSummary, error) }
Check describes what methods various checks (gofmt, go lint, etc.) should implement
type FileSummary ¶
type FileSummary struct { Filename string `json:"filename"` FileURL string `json:"file_url"` Errors []Error `json:"errors"` }
FileSummary contains the filename, location of the file on GitHub, and all of the errors related to the file
type GoCyclo ¶
GoCyclo is the check for the go cyclo command
func (GoCyclo) Description ¶
Description returns the description of GoCyclo
func (GoCyclo) Percentage ¶
func (g GoCyclo) Percentage() (float64, []FileSummary, error)
Percentage returns the percentage of .go files that pass gofmt
type GoFmt ¶
GoFmt is the check for the go fmt command
func (GoFmt) Description ¶
Description returns the description of gofmt
func (GoFmt) Percentage ¶
func (g GoFmt) Percentage() (float64, []FileSummary, error)
Percentage returns the percentage of .go files that pass gofmt
type GoLint ¶
GoLint is the check for the go lint command
func (GoLint) Description ¶
Description returns the description of go lint
func (GoLint) Percentage ¶
func (g GoLint) Percentage() (float64, []FileSummary, error)
Percentage returns the percentage of .go files that pass golint
type GoVet ¶
GoVet is the check for the go vet command
func (GoVet) Description ¶
Description returns the description of go lint
func (GoVet) Percentage ¶
func (g GoVet) Percentage() (float64, []FileSummary, error)
Percentage returns the percentage of .go files that pass go vet
type License ¶
License is the check for the go cyclo command
func (License) Description ¶
Description returns the description of License
func (License) Percentage ¶
func (g License) Percentage() (float64, []FileSummary, error)
Percentage returns 0 if no LICENSE, 1 if LICENSE