Preparing report...

Report for github.com/smancke/guble

A+    Excellent!    Found 43 issues across 174 files

Tweet

gofmt97%

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!


gocyclo98%

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.


golint79%

Golint is a linter for Go source code.

    • guble/protocol/message.go
    • Line 46: warning: exported type MessageDeliveryCallback should have comment or be unexported (golint)
    • Line 59: warning: exported method Message.BodyAsString should have comment or be unexported (golint)
    • Line 124: warning: exported method Message.SetFilter should have comment or be unexported (golint)
    • Line 192: warning: exported function ParseMessage should have comment or be unexported (golint)
    • guble/server/metrics/map.go
    • Line 17: warning: exported function SetRate should have comment or be unexported (golint)
    • Line 29: warning: exported function SetAverage should have comment or be unexported (golint)
    • Line 42: warning: exported function AddToMaps should have comment or be unexported (golint)
    • guble/server/metrics/ns.go
    • Line 8: warning: exported method NS.NewInt should have comment or be unexported (golint)
    • Line 12: warning: exported method NS.NewMap should have comment or be unexported (golint)
    • Line 16: warning: exported method NS.NewNS should have comment or be unexported (golint)
    • guble/server/apns/apns_sender.go
    • Line 20: warning: exported var ErrRetryFailed should have comment or be unexported (golint)
    • Line 28: warning: exported function NewSender should have comment or be unexported (golint)
    • Line 37: warning: exported function NewSenderUsingPusher should have comment or be unexported (golint)
    • Line 74: 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)
    • guble/server/fcm/testutil.go
    • Line 13: warning: exported const SuccessFCMResponse should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported function NewSenderWithMock should have comment or be unexported (golint)
    • Line 47: warning: exported type FCMSender should have comment or be unexported (golint)
    • Line 49: warning: exported method FCMSender.Send should have comment or be unexported (golint)
    • Line 53: warning: exported function CreateFcmSender should have comment or be unexported (golint)
    • guble/testutil/testutil.go
    • Line 38: warning: exported function NewMockBenchmarkCtrl should have comment or be unexported (golint)
    • Line 98: warning: exported function PprofDebug should have comment or be unexported (golint)
    • guble/server/sms/nexmo_sms_sender.go
    • Line 17: warning: exported var URL should have comment or be unexported (golint)
    • Line 22: warning: exported type ResponseCode should have comment or be unexported (golint)
    • Line 25: warning: exported const ResponseSuccess should have comment (or a comment on this block) or be unexported (golint)
    • Line 47: warning: exported var ErrNoSMSSent should have comment or be unexported (golint)
    • Line 90: warning: exported type NexmoMessageResponse should have comment or be unexported (golint)
    • Line 95: warning: exported method NexmoMessageResponse.Check should have comment or be unexported (golint)
    • Line 115: warning: exported type NexmoSender should have comment or be unexported (golint)
    • Line 123: warning: exported function NewNexmoSender should have comment or be unexported (golint)
    • Line 133: warning: exported method NexmoSender.Send should have comment or be unexported (golint)
    • guble/server/sms/sms_gateway.go
    • Line 20: warning: exported const SMSSchema should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported var ErrRetryFailed should have comment or be unexported (golint)
    • Line 28: warning: exported type Sender should have comment or be unexported (golint)
    • Line 32: warning: exported type Config should have comment or be unexported (golint)
    • Line 59: warning: exported function New should have comment or be unexported (golint)
    • guble/server/connector/connector.go
    • Line 20: warning: exported const DefaultWorkers should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported var TopicParam should have comment or be unexported (golint)
    • Line 29: warning: exported type Sender should have comment or be unexported (golint)
    • Line 34: warning: exported type SenderSetter should have comment or be unexported (golint)
    • Line 39: warning: exported type Metadata should have comment or be unexported (golint)
    • Line 43: warning: exported type ResponseHandler should have comment or be unexported (golint)
    • Line 48: warning: exported type ResponseHandlerSetter should have comment or be unexported (golint)
    • Line 53: warning: exported type Runner should have comment or be unexported (golint)
    • Line 57: warning: exported type Connector should have comment or be unexported (golint)
    • Line 68: warning: exported type ResponsiveConnector should have comment or be unexported (golint)
    • Line 90: warning: exported type Config should have comment or be unexported (golint)
    • Line 98: warning: exported function NewConnector should have comment or be unexported (golint)
    • guble/server/connector/subscriber.go
    • Line 19: warning: exported var ErrSubscriberExists should have comment or be unexported (golint)
    • Line 25: warning: exported type Subscriber should have comment or be unexported (golint)
    • Line 38: warning: exported type SubscriberData should have comment or be unexported (golint)
    • Line 64: warning: exported function NewSubscriber should have comment or be unexported (golint)
    • Line 72: warning: exported function NewSubscriberFromData should have comment or be unexported (golint)
    • Line 79: warning: exported function NewSubscriberFromJSON should have comment or be unexported (golint)
    • Line 156: warning: exported function GenerateKey should have comment or be unexported (golint)
    • guble/server/cluster/cluster_delegate.go
    • Line 43: warning: exported method Cluster.GetBroadcasts should have comment or be unexported (golint)
    • Line 49: warning: exported method Cluster.NodeMeta should have comment or be unexported (golint)
    • Line 51: warning: exported method Cluster.LocalState should have comment or be unexported (golint)
    • Line 53: warning: exported method Cluster.MergeRemoteState should have comment or be unexported (golint)
    • guble/server/router/route_params.go
    • Line 9: warning: exported type RouteParams should have comment or be unexported (golint)
    • Line 19: warning: exported method RouteParams.Key should have comment or be unexported (golint)
    • Line 71: warning: exported method RouteParams.Get should have comment or be unexported (golint)
    • Line 75: warning: exported method RouteParams.Set should have comment or be unexported (golint)
    • Line 79: warning: exported method RouteParams.Copy should have comment or be unexported (golint)
    • guble/server/store/fetch_request.go
    • Line 9: warning: exported var ErrRequestDone should have comment or be unexported (golint)
    • Line 12: warning: exported const DirectionOneMessage should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: comment on exported const FetchBufferSize should be of the form "FetchBufferSize ..." (golint)
    • Line 20: warning: exported type FetchDirection should have comment or be unexported (golint)
    • Line 80: warning: exported method FetchRequest.Init should have comment or be unexported (golint)
    • Line 96: warning: exported method FetchRequest.Messages should have comment or be unexported (golint)
    • Line 100: warning: exported method FetchRequest.Errors should have comment or be unexported (golint)
    • Line 108: warning: exported method FetchRequest.Push should have comment or be unexported (golint)
    • Line 112: warning: exported method FetchRequest.PushFetchMessage should have comment or be unexported (golint)
    • Line 116: warning: exported method FetchRequest.PushError should have comment or be unexported (golint)
    • Line 120: warning: exported method FetchRequest.IsDone should have comment or be unexported (golint)
    • Line 126: warning: exported method FetchRequest.Done should have comment or be unexported (golint)
    • guble/client/client.go
    • Line 18: warning: exported type WSConnection should have comment or be unexported (golint)
    • Line 24: warning: exported function DefaultConnectionFactory should have comment or be unexported (golint)
    • Line 37: warning: exported type WSConnectionFactory should have comment or be unexported (golint)
    • Line 39: warning: exported type Client should have comment or be unexported (golint)
    • guble/server/sms/nexmo_sms.go
    • Line 5: warning: exported type NexmoSms should have comment or be unexported (golint)
    • Line 13: warning: exported method NexmoSms.EncodeNexmoSms should have comment or be unexported (golint)
    • guble/server/cluster/cluster_event_delegate.go
    • Line 13: warning: exported method Cluster.NotifyJoin should have comment or be unexported (golint)
    • Line 20: warning: exported method Cluster.NotifyLeave should have comment or be unexported (golint)
    • Line 25: warning: exported method Cluster.NotifyUpdate should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell99%

Misspell Finds commonly misspelled English words