Preparing report...

Report for github.com/seashell/drago

A+    Excellent!    Found 71 issues across 167 files

Tweet

gofmt99%

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!


golint61%

Golint is a linter for Go source code.

    • drago/drago/structs/structs.go
    • Line 10: warning: exported type Filters should have comment or be unexported (golint)
    • Line 12: warning: exported method Filters.Get should have comment or be unexported (golint)
    • Line 19: warning: exported method Filters.Add should have comment or be unexported (golint)
    • drago/pkg/cli/command.go
    • Line 6: warning: exported const CommandReturnCodeHelp should have comment (or a comment on this block) or be unexported (golint)
    • drago/pkg/cli/config.go
    • Line 8: warning: comment on exported type Config should be of the form "Config ..." (with optional leading article) (golint)
    • Line 35: warning: comment on exported function DefaultConfig should be of the form "DefaultConfig ..." (golint)
    • Line 47: warning: exported method Config.Merge should have comment or be unexported (golint)
    • drago/pkg/cli/ui.go
    • Line 35: warning: comment on exported type SimpleUI should be of the form "SimpleUI ..." (with optional leading article) (golint)
    • Line 50: warning: exported method SimpleUI.Info should have comment or be unexported (golint)
    • Line 54: warning: exported method SimpleUI.Output should have comment or be unexported (golint)
    • Line 58: warning: exported method SimpleUI.Warn should have comment or be unexported (golint)
    • drago/pkg/concurrent/map.go
    • Line 14: warning: exported function NewMap should have comment or be unexported (golint)
    • Line 20: warning: comment on exported type MapItem should be of the form "MapItem ..." (with optional leading article) (golint)
    • Line 26: warning: comment on exported method Map.Set should be of the form "Set ..." (golint)
    • Line 34: warning: comment on exported method Map.Get should be of the form "Get ..." (golint)
    • Line 42: warning: comment on exported method Map.Len should be of the form "Len ..." (golint)
    • Line 49: warning: comment on exported method Map.Delete should be of the form "Delete ..." (golint)
    • Line 56: warning: comment on exported method Map.Iter should be of the form "Iter ..." (golint)
    • drago/client/client.go
    • Line 91: warning: exported method Client.Node should have comment or be unexported (golint)
    • Line 466: warning: exported method Client.RPC should have comment or be unexported (golint)
    • drago/pkg/cli/command_mock.go
    • Line 16: warning: exported method MockCommand.Help should have comment or be unexported (golint)
    • Line 20: warning: exported method MockCommand.Run should have comment or be unexported (golint)
    • Line 26: warning: exported method MockCommand.Synopsis should have comment or be unexported (golint)
    • drago/drago/connection.go
    • Line 16: warning: exported const ConnectionList should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported type ConnectionService should have comment or be unexported (golint)
    • drago/drago/state/etcd/etcd.go
    • Line 32: warning: exported type Config should have comment or be unexported (golint)
    • Line 80: warning: comment on exported method StateRepository.Transaction should be of the form "Transaction ..." (golint)
    • drago/agent/conn/conn.go
    • Line 17: warning: exported var ErrNoServers should have comment or be unexported (golint)
    • Line 20: warning: exported type RPCConnection should have comment or be unexported (golint)
    • Line 31: warning: exported function NewRPCConnection should have comment or be unexported (golint)
    • drago/drago/node.go
    • Line 19: warning: exported const NodeList should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported type NodeService should have comment or be unexported (golint)
    • Line 105: warning: exported method NodeService.Register should have comment or be unexported (golint)
    • Line 157: warning: exported method NodeService.UpdateStatus should have comment or be unexported (golint)
    • drago/version/version.go
    • Line 9: warning: comment on exported var GitCommit should be of the form "GitCommit ..." (golint)
    • Line 11: warning: exported var GitDescribe should have comment or be unexported (golint)
    • Line 13: warning: comment on exported var Version should be of the form "Version ..." (golint)
    • Line 16: warning: comment on exported var VersionPrerelease should be of the form "VersionPrerelease ..." (golint)
    • Line 53: warning: comment on exported method VersionInfo.VersionNumber should be of the form "VersionNumber ..." (golint)
    • drago/client/state/inmem/inmem.go
    • Line 10: warning: exported type Repository should have comment or be unexported (golint)
    • Line 19: warning: exported function NewRepository should have comment or be unexported (golint)
    • Line 26: warning: exported method Repository.Name should have comment or be unexported (golint)
    • Line 30: warning: exported method Repository.Interfaces should have comment or be unexported (golint)
    • Line 42: warning: exported method Repository.UpsertInterface should have comment or be unexported (golint)
    • Line 49: warning: exported method Repository.DeleteInterfaces should have comment or be unexported (golint)
    • drago/drago/acl_policy.go
    • Line 11: warning: exported const ACLPolicyList should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported method ACLService.GetPolicy should have comment or be unexported (golint)
    • Line 41: warning: exported method ACLService.UpsertPolicy should have comment or be unexported (golint)
    • Line 78: warning: exported method ACLService.DeletePolicies should have comment or be unexported (golint)
    • Line 99: warning: exported method ACLService.ListPolicies should have comment or be unexported (golint)
    • drago/pkg/log/log.go
    • Line 6: warning: comment on exported type LoggerOptions should be of the form "LoggerOptions ..." (with optional leading article) (golint)
    • drago/client/nic/nic.go
    • Line 17: warning: exported type PrivateKeyStore should have comment or be unexported (golint)
    • Line 23: warning: exported type PrivateKey should have comment or be unexported (golint)
    • drago/drago/interface.go
    • Line 15: warning: exported const InterfaceList should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type InterfaceService should have comment or be unexported (golint)
    • drago/client/state/boltdb/boltdb.go
    • Line 110: warning: exported method StateRepository.KeyByID should have comment or be unexported (golint)
    • Line 128: warning: exported method StateRepository.UpsertKey should have comment or be unexported (golint)
    • Line 136: warning: exported method StateRepository.DeleteKey should have comment or be unexported (golint)
    • drago/pkg/validator/validator.go
    • Line 16: warning: exported type Validator should have comment or be unexported (golint)
    • Line 20: warning: exported function New should have comment or be unexported (golint)
    • Line 29: warning: exported method Validator.Validate should have comment or be unexported (golint)
    • drago/drago/network.go
    • Line 15: warning: exported const NetworkList should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type NetworkService should have comment or be unexported (golint)
    • drago/pkg/rpc/config.go
    • Line 9: warning: exported type ServerConfig should have comment or be unexported (golint)
    • Line 20: warning: exported function DefaultConfig should have comment or be unexported (golint)
    • Line 27: warning: exported method ServerConfig.Merge should have comment or be unexported (golint)
    • Line 41: warning: exported type ClientConfig should have comment or be unexported (golint)
    • Line 52: warning: exported function DefaultClientConfig should have comment or be unexported (golint)
    • Line 59: warning: exported method ClientConfig.Merge should have comment or be unexported (golint)
    • drago/drago/structs/errors.go
    • Line 59: warning: exported function NewInternalError should have comment or be unexported (golint)
    • Line 63: warning: exported function NewInvalidInputError should have comment or be unexported (golint)
    • drago/pkg/util/util.go
    • Line 3: warning: exported function StrToPtr should have comment or be unexported (golint)
    • Line 7: warning: exported function BoolToPtr should have comment or be unexported (golint)
    • Line 11: warning: exported function IntToPtr should have comment or be unexported (golint)
    • Line 15: warning: exported function Uint16ToPtr should have comment or be unexported (golint)
    • drago/api/acl.go
    • Line 18: warning: comment on exported method Client.ACL should be of the form "ACL ..." (golint)
    • Line 23: warning: comment on exported method ACL.Bootstrap should be of the form "Bootstrap ..." (golint)

gocyclo97%

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.

    • drago/drago/connection.go
    • Line 112: warning: cyclomatic complexity 25 of function (*ConnectionService).UpsertConnection() is high (> 15) (gocyclo)
    • Line 61: warning: cyclomatic complexity 16 of function (*ConnectionService).ListConnections() is high (> 15) (gocyclo)
    • Line 233: warning: cyclomatic complexity 16 of function (*ConnectionService).DeleteConnection() is high (> 15) (gocyclo)

ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell0%

Misspell Finds commonly misspelled English words

An error occurred while running this test (exit status 2)