Preparing report...

Report for github.com/ksrichard/apm

B    Not bad!    Found 11 issues across 15 files

Tweet

gofmt60%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo93%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • apm/arduino/arduino.go
    • Line 156: warning: cyclomatic complexity 17 of function (*ArduinoCli).CheckDependencyVersionMismatch() is high (> 15) (gocyclo)

golint26%

Golint is a linter for Go source code.

    • apm/arduino/arduino.go
    • Line 24: warning: exported function RunCmdInteractive should have comment or be unexported (golint)
    • Line 37: warning: exported type ArduinoCli should have comment or be unexported (golint)
    • Line 45: warning: exported method ArduinoCli.Init should have comment or be unexported (golint)
    • Line 69: warning: exported method ArduinoCli.Destroy should have comment or be unexported (golint)
    • Line 90: warning: exported method ArduinoCli.SearchLibrary should have comment or be unexported (golint)
    • Line 135: warning: exported method ArduinoCli.InstallBoardCore should have comment or be unexported (golint)
    • Line 156: warning: exported method ArduinoCli.CheckDependencyVersionMismatch should have comment or be unexported (golint)
    • Line 172: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 185: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 201: warning: exported method ArduinoCli.InstallDependencies should have comment or be unexported (golint)
    • Line 264: warning: exported method ArduinoCli.UninstallDependency should have comment or be unexported (golint)
    • apm/cmd/init.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 41: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 42: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • apm/cmd/remove.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 102: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • apm/service/library.go
    • Line 11: warning: exported function SelectLibrary should have comment or be unexported (golint)
    • Line 56: warning: exported function CheckIfLibraryValid should have comment or be unexported (golint)
    • Line 95: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 101: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • apm/util/cli.go
    • Line 10: warning: exported function Select should have comment or be unexported (golint)
    • Line 12: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • Line 43: warning: exported function AutoCompleteInput should have comment or be unexported (golint)
    • apm/project/project.go
    • Line 13: warning: exported var ProjectDetailsFileName should have comment or be unexported (golint)
    • Line 15: warning: exported function GetProjectDir should have comment or be unexported (golint)
    • Line 19: warning: exported function GetProjectDetails should have comment or be unexported (golint)
    • Line 36: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 41: warning: exported function UpdateProjectDetails should have comment or be unexported (golint)
    • Line 61: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • apm/project/structs.go
    • Line 3: warning: exported type ProjectDetails should have comment or be unexported (golint)
    • Line 8: warning: exported type ProjectBoard should have comment or be unexported (golint)
    • Line 15: warning: exported type ProjectDependency should have comment or be unexported (golint)
    • apm/cmd/add.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 68: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!