golint fixes

This commit is contained in:
shawnps
2015-02-07 07:25:05 -08:00
parent 9ecc3714e2
commit 3dd8e2d465
6 changed files with 14 additions and 0 deletions

View File

@@ -1,5 +1,7 @@
package check
// Check describes what methods various checks (gofmt, go lint, etc.)
// should implement
type Check interface {
Name() string
Description() string

View File

@@ -1,10 +1,12 @@
package check
// GoVet is the check for the go vet command
type GoVet struct {
Dir string
Filenames []string
}
// Name returns the name of the display name of the command
func (g GoVet) Name() string {
return "go_vet"
}

View File

@@ -1,10 +1,12 @@
package check
// GoCycle is the check for the go cyclo command
type GoCyclo struct {
Dir string
Filenames []string
}
// Name returns the name of the display name of the command
func (g GoCyclo) Name() string {
return "gocyclo"
}

View File

@@ -1,10 +1,12 @@
package check
// GoFmt is the check for the go fmt command
type GoFmt struct {
Dir string
Filenames []string
}
// Name returns the name of the display name of the command
func (g GoFmt) Name() string {
return "gofmt"
}

View File

@@ -1,10 +1,12 @@
package check
// GoLint is the check for the go lint command
type GoLint struct {
Dir string
Filenames []string
}
// Name returns the name of the display name of the command
func (g GoLint) Name() string {
return "golint"
}

View File

@@ -54,11 +54,15 @@ func lineCount(filepath string) (int, error) {
return count, nil
}
// Error contains the line number and the reason for
// an error output from a command
type Error struct {
LineNumber int `json:"line_number"`
ErrorString string `json:"error_string"`
}
// FileSummary contains the filename, location of the file
// on GitHub, and all of the errors related to the file
type FileSummary struct {
Filename string `json:"filename"`
FileURL string `json:"file_url"`