Preparing report...

Report for github.com/edgexfoundry/edgex-ui-go

A    Great!    Found 25 issues across 26 files

Tweet

gofmt80%

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!


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!


golint3%

Golint is a linter for Go source code.

    • edgex-ui-go/internal/handler/profile.go
    • Line 40: warning: exported const TemplateDirName should have comment (or a comment on this block) or be unexported (golint)
    • Line 44: warning: exported function DowloadProfile should have comment or be unexported (golint)
    • Line 60: warning: exported function AddProfileYamlContent should have comment or be unexported (golint)
    • Line 93: warning: exported function FindProfileAndConvertToYamlByName should have comment or be unexported (golint)
    • Line 114: warning: exported function UpdateProfileYamlContent should have comment or be unexported (golint)
    • edgex-ui-go/internal/configs/config.go
    • Line 31: warning: exported var ServerConf should have comment or be unexported (golint)
    • Line 39: warning: exported type ConfigurationStruct should have comment or be unexported (golint)
    • Line 46: warning: exported type Service should have comment or be unexported (golint)
    • Line 54: warning: exported type Scheme should have comment or be unexported (golint)
    • Line 58: warning: exported type Database should have comment or be unexported (golint)
    • Line 69: warning: exported type ClientInfo should have comment or be unexported (golint)
    • Line 80: warning: exported type RegistryConfig should have comment or be unexported (golint)
    • Line 88: warning: exported function GetConfigs should have comment or be unexported (golint)
    • Line 92: warning: exported function LoadConfig should have comment or be unexported (golint)
    • edgex-ui-go/internal/core/filter.go
    • Line 29: warning: exported const RootURIPath should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: comment on exported var TokenCache should be of the form "TokenCache ..." (golint)
    • Line 38: warning: exported function GeneralFilter should have comment or be unexported (golint)
    • Line 54: warning: exported function AuthFilter should have comment or be unexported (golint)
    • edgex-ui-go/internal/handler/appservice.go
    • Line 34: warning: exported const AppServiceConfigurableFileName should have comment or be unexported (golint)
    • Line 36: warning: exported function HeartBeatAppService should have comment or be unexported (golint)
    • Line 45: warning: exported function ListAppServicesProfile should have comment or be unexported (golint)
    • Line 75: warning: exported function DeployConfigurableProfile should have comment or be unexported (golint)
    • Line 106: warning: exported function DownloadConfigurableProfile should have comment or be unexported (golint)
    • Line 145: warning: exported function ReceiveDataPostJSON should have comment or be unexported (golint)
    • Line 164: warning: exported function ReceiveDataPostXML should have comment or be unexported (golint)
    • Line 172: warning: exported function CurrentData should have comment or be unexported (golint)
    • edgex-ui-go/internal/errors/types.go
    • Line 7: warning: exported type ErrParserJsonBody should have comment or be unexported (golint)
    • Line 14: warning: exported function NewErrParserJsonBody should have comment or be unexported (golint)
    • Line 18: warning: exported type ErrDuplicateName should have comment or be unexported (golint)
    • Line 26: warning: exported function NewErrDuplicateName should have comment or be unexported (golint)
    • Line 30: warning: exported type ErrResourceNotFound should have comment or be unexported (golint)
    • Line 37: warning: exported function NewErrResourceNotFound should have comment or be unexported (golint)
    • Line 41: warning: exported type ErrWriteDatabase should have comment or be unexported (golint)
    • Line 48: warning: exported function NewErrWriteDatabase should have comment or be unexported (golint)
    • Line 52: warning: exported type ErrReadDatabase should have comment or be unexported (golint)
    • Line 59: warning: exported function NewErrReadDatabase should have comment or be unexported (golint)
    • edgex-ui-go/internal/repository/mongo/user.go
    • Line 26: warning: exported type UserMongoRepository should have comment or be unexported (golint)
    • Line 29: warning: exported method UserMongoRepository.ExistsUser should have comment or be unexported (golint)
    • Line 41: warning: exported method UserMongoRepository.Exists should have comment or be unexported (golint)
    • Line 56: warning: exported method UserMongoRepository.Insert should have comment or be unexported (golint)
    • Line 71: warning: exported method UserMongoRepository.Update should have comment or be unexported (golint)
    • Line 86: warning: exported method UserMongoRepository.Delete should have comment or be unexported (golint)
    • Line 99: warning: exported method UserMongoRepository.Select should have comment or be unexported (golint)
    • Line 114: warning: exported method UserMongoRepository.SelectByName should have comment or be unexported (golint)
    • Line 119: warning: exported method UserMongoRepository.SelectAll should have comment or be unexported (golint)
    • edgex-ui-go/internal/repository/mongo/mongo.go
    • Line 38: warning: exported type DataStore should have comment or be unexported (golint)
    • Line 42: warning: exported var DS should have comment or be unexported (golint)
    • Line 44: warning: exported method DataStore.DataStore should have comment or be unexported (golint)
    • Line 60: warning: exported function DBConnect should have comment or be unexported (golint)
    • edgex-ui-go/internal/repository/user.go
    • Line 15: warning: exported type UserRepos should have comment or be unexported (golint)
    • Line 26: warning: exported function GetUserRepos should have comment or be unexported (golint)
    • Line 29: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • edgex-ui-go/internal/repository/mm/user.go
    • Line 28: warning: exported type UserRepository should have comment or be unexported (golint)
    • Line 31: warning: exported method UserRepository.ExistsUser should have comment or be unexported (golint)
    • Line 40: warning: exported method UserRepository.Exists should have comment or be unexported (golint)
    • Line 44: warning: exported method UserRepository.Insert should have comment or be unexported (golint)
    • Line 53: warning: exported method UserRepository.Update should have comment or be unexported (golint)
    • Line 58: warning: exported method UserRepository.Delete should have comment or be unexported (golint)
    • Line 63: warning: exported method UserRepository.Select should have comment or be unexported (golint)
    • Line 68: warning: exported method UserRepository.SelectByName should have comment or be unexported (golint)
    • Line 77: warning: exported method UserRepository.SelectAll should have comment 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!