Preparing report...

Report for github.com/edgexfoundry/edgex-cli

A+    Excellent!    Found 15 issues across 23 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


gocyclo100%

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.

No problems detected. Good job!


golint34%

Golint is a linter for Go source code.

    • edgex-cli/pkg/utils/utils.go
    • Line 34: warning: exported function DisplayDuration should have comment or be unexported (golint)
    • Line 38: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 44: warning: exported const TimeUnitDescriptions should have comment or be unexported (golint)
    • Line 50: warning: comment on exported var TimeUnitsMap should be of the form "TimeUnitsMap ..." (golint)
    • Line 53: warning: exported function ConvertAgeToMillisecond should have comment or be unexported (golint)
    • edgex-cli/pkg/formatters/interface.go
    • Line 1: warning: package comment should be of the form "Package formatters ..." (golint)
    • Line 21: warning: exported type FormatWriter should have comment or be unexported (golint)
    • Line 25: warning: exported function NewFormatter should have comment or be unexported (golint)
    • edgex-cli/pkg/confirmation/confirm.go
    • Line 12: warning: exported type UserConfirmation should have comment or be unexported (golint)
    • Line 17: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 66: warning: comment on exported method UserConfirmation.Confirm should be of the form "Confirm ..." (golint)
    • edgex-cli/config/env.go
    • Line 21: warning: exported type Environment should have comment or be unexported (golint)
    • Line 27: warning: exported type ViperEnv should have comment or be unexported (golint)
    • Line 29: warning: exported method ViperEnv.SetConfigFile should have comment or be unexported (golint)
    • Line 33: warning: exported method ViperEnv.IsSet should have comment or be unexported (golint)
    • Line 37: warning: exported method ViperEnv.GetString should have comment or be unexported (golint)
    • Line 41: warning: exported function NewViperEnv should have comment or be unexported (golint)
    • edgex-cli/pkg/editor/interactive.go
    • Line 29: warning: exported const UnixDefaultEditor should have comment (or a comment on this block) or be unexported (golint)
    • Line 112: warning: comment on exported function IsLastElementOfSlice should be of the form "IsLastElementOfSlice ..." (golint)
    • edgex-cli/pkg/request.go
    • Line 16: warning: exported function Get should have comment or be unexported (golint)
    • Line 24: warning: exported function Delete should have comment or be unexported (golint)
    • Line 28: warning: exported function DeletePrt should have comment or be unexported (golint)
    • Line 37: warning: exported function Post should have comment or be unexported (golint)
    • Line 65: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 70: warning: exported function DeleteByIds should have comment or be unexported (golint)
    • edgex-cli/pkg/formatters/templateformatter.go
    • Line 1: warning: package comment should be of the form "Package formatters ..." (golint)
    • Line 23: warning: exported type HtmlTemplateFormatter should have comment or be unexported (golint)
    • Line 29: warning: exported function NewHtmlTemplateFormatter should have comment or be unexported (golint)
    • edgex-cli/config/configuration.go
    • Line 26: warning: exported const PathId should have comment or be unexported (golint)
    • Line 27: warning: exported const PathName should have comment or be unexported (golint)
    • Line 28: warning: exported const SampleConfigFileName should have comment or be unexported (golint)
    • Line 29: warning: exported const ConfigFileName should have comment or be unexported (golint)
    • Line 31: warning: exported var DefaultConfigFile should have comment or be unexported (golint)
    • Line 32: warning: exported var Conf should have comment or be unexported (golint)
    • Line 39: warning: exported type ClientInfo should have comment or be unexported (golint)
    • Line 41: warning: exported type Client should have comment or be unexported (golint)
    • Line 47: warning: exported method Client.Url should have comment or be unexported (golint)
    • Line 58: warning: exported function LoadConfig should have comment or be unexported (golint)
    • edgex-cli/pkg/const.go
    • Line 4: warning: exported const SUCCESSFUL_DELETE should have comment (or a comment on this block) or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell95%

Misspell Finds commonly misspelled English words