Preparing report...

Report for github.com/livbarn/agollo

A+    Excellent!    Found 15 issues across 32 files

Tweet

gofmt96%

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!


golint59%

Golint is a linter for Go source code.

    • agollo/componet_notify.go
    • Line 10: warning: don't use underscores in Go names; const default_notification_id should be defaultNotificationID (golint)
    • Line 32: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 37: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 76: warning: exported type NotifyConfigComponent should have comment or be unexported (golint)
    • Line 79: warning: exported method NotifyConfigComponent.Start should have comment or be unexported (golint)
    • Line 79: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • agollo/request.go
    • Line 11: warning: exported type CallBack should have comment or be unexported (golint)
    • Line 16: warning: exported type ConnectConfig should have comment or be unexported (golint)
    • Line 61: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 68: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • agollo/start.go
    • Line 3: warning: comment on exported function Start should be of the form "Start ..." (golint)
    • Line 8: warning: exported function StartWithLogger should have comment or be unexported (golint)
    • Line 12: warning: exported function StartWithCache should have comment or be unexported (golint)
    • Line 16: warning: exported function StartWithParams should have comment or be unexported (golint)
    • agollo/test/test.go
    • Line 11: warning: exported function Equal should have comment or be unexported (golint)
    • Line 20: warning: exported function StartWith should have comment or be unexported (golint)
    • Line 24: warning: exported function NotEqual should have comment or be unexported (golint)
    • Line 33: warning: exported function Nil should have comment or be unexported (golint)
    • Line 42: warning: exported function NotNil should have comment or be unexported (golint)
    • agollo/test/utils.go
    • Line 9: warning: comment on exported function ToJson should be of the form "ToJson ..." (golint)
    • Line 16: warning: comment on exported function ToXML should be of the form "ToXML ..." (golint)
    • Line 24: warning: comment on exported function ToDefault should be of the form "ToDefault ..." (golint)
    • agollo/change_event.go
    • Line 4: warning: exported const ADDED should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: comment on exported type ConfigChangeType should be of the form "ConfigChangeType ..." (with optional leading article) (golint)
    • Line 16: warning: comment on exported type ChangeEvent should be of the form "ChangeEvent ..." (with optional leading article) (golint)
    • Line 22: warning: exported type ConfigChange should have comment or be unexported (golint)
    • Line 28: warning: comment on exported function ListenChangeEvent should be of the form "ListenChangeEvent ..." (golint)
    • agollo/json_config.go
    • Line 10: warning: don't use underscores in Go names; var default_cluster should be defaultCluster (golint)
    • Line 11: warning: don't use underscores in Go names; var default_namespace should be defaultNamespace (golint)
    • agollo/log.go
    • Line 11: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 15: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 19: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 23: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 37: warning: exported type LoggerInterface should have comment or be unexported (golint)
    • agollo/repository.go
    • Line 1: warning: package comment should be of the form "Package agollo ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 38: warning: exported type CacheInterface should have comment or be unexported (golint)
    • Line 158: warning: exported function GetApolloConfigCache should have comment or be unexported (golint)
    • Line 162: warning: exported function GetCurrentApolloConfig should have comment or be unexported (golint)
    • Line 189: warning: exported function GetStringValue should have comment or be unexported (golint)
    • Line 198: warning: exported function GetIntValue should have comment or be unexported (golint)
    • Line 210: warning: exported function GetFloatValue should have comment or be unexported (golint)
    • Line 222: warning: exported function GetBoolValue should have comment or be unexported (golint)
    • agollo/app_config.go
    • Line 14: warning: don't use underscores in Go names; var long_poll_interval should be longPollInterval (golint)
    • Line 15: warning: don't use underscores in Go names; var long_poll_connect_timeout should be longPollConnectTimeout (golint)
    • Line 17: warning: don't use underscores in Go names; var connect_timeout should be connectTimeout (golint)
    • Line 19: warning: don't use underscores in Go names; var nofity_connect_timeout should be nofityConnectTimeout (golint)
    • Line 21: warning: don't use underscores in Go names; var on_error_retry_interval should be onErrorRetryInterval (golint)
    • Line 27: warning: don't use underscores in Go names; var max_retries should be maxRetries (golint)
    • Line 30: warning: don't use underscores in Go names; var refresh_ip_list_interval should be refreshIPListInterval (golint)
    • Line 39: warning: don't use underscores in Go names; var next_try_connect_period should be nextTryConnectPeriod (golint)
    • Line 42: warning: exported type AppConfig should have comment or be unexported (golint)
    • Line 51: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 55: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 66: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 73: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 81: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 158: warning: comment on exported function InitCustomConfig should be of the form "InitCustomConfig ..." (golint)
    • Line 234: warning: exported function GetAppConfig should have comment or be unexported (golint)
    • agollo/component_common.go
    • Line 8: warning: exported type AbsComponent should have comment or be unexported (golint)
    • Line 12: warning: exported function StartRefreshConfig should have comment or be unexported (golint)
    • Line 16: warning: exported type ApolloConnConfig should have comment or be unexported (golint)
    • Line 24: warning: exported type ApolloConfig should have comment or be unexported (golint)
    • agollo/env.go
    • Line 26: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)

gocyclo96%

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.


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!