Preparing report...

Report for github.com/rapidloop/nrpc

A    Great!    Found 9 issues across 23 files

Tweet

gofmt82%

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!


gocyclo82%

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.

    • nrpc/nrpc_test.go
    • Line 90: warning: cyclomatic complexity 20 of function TestStreamCall() is high (> 15) (gocyclo)
    • Line 431: warning: cyclomatic complexity 16 of function TestCaptureErrors() is high (> 15) (gocyclo)

golint78%

Golint is a linter for Go source code.

    • nrpc/nrpc.go
    • Line 28: warning: exported type NatsConn should have comment or be unexported (golint)
    • Line 51: warning: exported function Unmarshal should have comment or be unexported (golint)
    • Line 62: warning: exported function UnmarshalResponse should have comment or be unexported (golint)
    • Line 95: warning: exported function Marshal should have comment or be unexported (golint)
    • Line 106: warning: exported function MarshalErrorResponse should have comment or be unexported (golint)
    • Line 127: warning: exported function ParseSubject should have comment or be unexported (golint)
    • Line 183: warning: exported function ParseSubjectTail should have comment or be unexported (golint)
    • Line 209: warning: exported function Call should have comment or be unexported (golint)
    • Line 434: warning: exported var ErrEOS should have comment or be unexported (golint)
    • Line 435: warning: exported var ErrCanceled should have comment or be unexported (golint)
    • Line 437: warning: exported function NewStreamCallSubscription should have comment or be unexported (golint)
    • Line 462: warning: exported type StreamCallSubscription should have comment or be unexported (golint)
    • Line 532: warning: exported method StreamCallSubscription.Next should have comment or be unexported (golint)
    • Line 567: warning: exported function StreamCall should have comment or be unexported (golint)
    • Line 592: warning: exported function Publish should have comment or be unexported (golint)
    • Line 641: warning: exported function NewKeepStreamAlive should have comment or be unexported (golint)
    • Line 653: warning: exported type KeepStreamAlive should have comment or be unexported (golint)
    • Line 661: warning: exported method KeepStreamAlive.Stop should have comment or be unexported (golint)
    • nrpc/examples/helloworld/helloworld/helloworld.nrpc.go
    • Line 1: warning: package comment should be of the form "Package helloworld ..." (golint)
    • Line 31: warning: exported function NewGreeterHandler should have comment or be unexported (golint)
    • Line 41: warning: exported function NewGreeterConcurrentHandler should have comment or be unexported (golint)
    • Line 54: warning: exported method GreeterHandler.Subject should have comment or be unexported (golint)
    • Line 58: warning: exported method GreeterHandler.Handler should have comment or be unexported (golint)
    • Line 129: warning: exported type GreeterClient should have comment or be unexported (golint)
    • Line 136: warning: exported function NewGreeterClient should have comment or be unexported (golint)
    • Line 145: warning: exported method GreeterClient.SayHello should have comment or be unexported (golint)
    • Line 158: warning: exported type Client should have comment or be unexported (golint)
    • Line 165: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 175: warning: exported method Client.SetEncoding should have comment or be unexported (golint)
    • Line 182: warning: exported method Client.SetTimeout should have comment or be unexported (golint)
    • nrpc/examples/metrics_helloworld/helloworld/helloworld.nrpc.go
    • Line 1: warning: package comment should be of the form "Package helloworld ..." (golint)
    • Line 80: warning: exported function NewGreeterHandler should have comment or be unexported (golint)
    • Line 90: warning: exported function NewGreeterConcurrentHandler should have comment or be unexported (golint)
    • Line 103: warning: exported method GreeterHandler.Subject should have comment or be unexported (golint)
    • Line 107: warning: exported method GreeterHandler.Handler should have comment or be unexported (golint)
    • Line 202: warning: exported type GreeterClient should have comment or be unexported (golint)
    • Line 209: warning: exported function NewGreeterClient should have comment or be unexported (golint)
    • Line 218: warning: exported method GreeterClient.SayHello should have comment or be unexported (golint)
    • Line 240: warning: exported type Client should have comment or be unexported (golint)
    • Line 247: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 257: warning: exported method Client.SetEncoding should have comment or be unexported (golint)
    • Line 264: warning: exported method Client.SetTimeout should have comment or be unexported (golint)
    • nrpc/examples/nooption/nooption.nrpc.go
    • Line 1: warning: package comment should be of the form "Package nooption ..." (golint)
    • Line 31: warning: exported function NewGreeterHandler should have comment or be unexported (golint)
    • Line 41: warning: exported function NewGreeterConcurrentHandler should have comment or be unexported (golint)
    • Line 54: warning: exported method GreeterHandler.Subject should have comment or be unexported (golint)
    • Line 58: warning: exported method GreeterHandler.Handler should have comment or be unexported (golint)
    • Line 129: warning: exported type GreeterClient should have comment or be unexported (golint)
    • Line 136: warning: exported function NewGreeterClient should have comment or be unexported (golint)
    • Line 145: warning: exported method GreeterClient.SayHello should have comment or be unexported (golint)
    • Line 158: warning: exported type Client should have comment or be unexported (golint)
    • Line 165: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 175: warning: exported method Client.SetEncoding should have comment or be unexported (golint)
    • Line 182: warning: exported method Client.SetTimeout should have comment or be unexported (golint)
    • nrpc/examples/alloptions/alloptions.nrpc.go
    • Line 35: warning: exported function NewSvcCustomSubjectHandler should have comment or be unexported (golint)
    • Line 45: warning: exported function NewSvcCustomSubjectConcurrentHandler should have comment or be unexported (golint)
    • Line 58: warning: exported method SvcCustomSubjectHandler.Subject should have comment or be unexported (golint)
    • Line 62: warning: exported method SvcCustomSubjectHandler.MtNoRequestPublish should have comment or be unexported (golint)
    • Line 80: warning: exported method SvcCustomSubjectHandler.Handler should have comment or be unexported (golint)
    • Line 222: warning: exported type SvcCustomSubjectClient should have comment or be unexported (golint)
    • Line 231: warning: exported function NewSvcCustomSubjectClient should have comment or be unexported (golint)
    • Line 242: warning: exported method SvcCustomSubjectClient.MtSimpleReply should have comment or be unexported (golint)
    • Line 255: warning: exported method SvcCustomSubjectClient.MtVoidReply should have comment or be unexported (golint)
    • Line 269: warning: exported method SvcCustomSubjectClient.MtNoRequestSubject should have comment or be unexported (golint)
    • Line 279: warning: exported type SvcCustomSubjectMtNoRequestSubscription should have comment or be unexported (golint)
    • Line 285: warning: exported method SvcCustomSubjectMtNoRequestSubscription.Next should have comment or be unexported (golint)
    • Line 294: warning: exported method SvcCustomSubjectClient.MtNoRequestSubscribeSync should have comment or be unexported (golint)
    • Line 308: warning: exported method SvcCustomSubjectClient.MtNoRequestSubscribe should have comment or be unexported (golint)
    • Line 327: warning: exported method SvcCustomSubjectClient.MtNoRequestSubscribeChan should have comment or be unexported (golint)
    • Line 337: warning: exported method SvcCustomSubjectClient.MtStreamedReply should have comment or be unexported (golint)
    • Line 363: warning: exported method SvcCustomSubjectClient.MtVoidReqStreamedReply should have comment or be unexported (golint)
    • Line 407: warning: exported function NewSvcSubjectParamsHandler should have comment or be unexported (golint)
    • Line 417: warning: exported function NewSvcSubjectParamsConcurrentHandler should have comment or be unexported (golint)
    • Line 430: warning: exported method SvcSubjectParamsHandler.Subject should have comment or be unexported (golint)
    • Line 434: warning: exported method SvcSubjectParamsHandler.MtNoRequestWParamsPublish should have comment or be unexported (golint)
    • Line 452: warning: exported method SvcSubjectParamsHandler.Handler should have comment or be unexported (golint)
    • Line 575: warning: exported type SvcSubjectParamsClient should have comment or be unexported (golint)
    • Line 585: warning: exported function NewSvcSubjectParamsClient should have comment or be unexported (golint)
    • Line 597: warning: exported method SvcSubjectParamsClient.MtWithSubjectParams should have comment or be unexported (golint)
    • Line 611: warning: exported method SvcSubjectParamsClient.MtStreamedReplyWithSubjectParams should have comment or be unexported (golint)
    • Line 636: warning: exported method SvcSubjectParamsClient.MtNoReply should have comment or be unexported (golint)
    • Line 651: warning: exported method SvcSubjectParamsClient.MtNoRequestWParamsSubject should have comment or be unexported (golint)
    • Line 661: warning: exported type SvcSubjectParamsMtNoRequestWParamsSubscription should have comment or be unexported (golint)
    • Line 667: warning: exported method SvcSubjectParamsMtNoRequestWParamsSubscription.Next should have comment or be unexported (golint)
    • Line 676: warning: exported method SvcSubjectParamsClient.MtNoRequestWParamsSubscribeSync should have comment or be unexported (golint)
    • Line 690: warning: exported method SvcSubjectParamsClient.MtNoRequestWParamsSubscribe should have comment or be unexported (golint)
    • Line 709: warning: exported method SvcSubjectParamsClient.MtNoRequestWParamsSubscribeChan should have comment or be unexported (golint)
    • Line 735: warning: exported function NewNoRequestServiceHandler should have comment or be unexported (golint)
    • Line 745: warning: exported function NewNoRequestServiceConcurrentHandler should have comment or be unexported (golint)
    • Line 758: warning: exported method NoRequestServiceHandler.Subject should have comment or be unexported (golint)
    • Line 762: warning: exported method NoRequestServiceHandler.MtNoRequestPublish should have comment or be unexported (golint)
    • Line 780: warning: exported type NoRequestServiceClient should have comment or be unexported (golint)
    • Line 789: warning: exported function NewNoRequestServiceClient should have comment or be unexported (golint)
    • Line 800: warning: exported method NoRequestServiceClient.MtNoRequestSubject should have comment or be unexported (golint)
    • Line 810: warning: exported type NoRequestServiceMtNoRequestSubscription should have comment or be unexported (golint)
    • Line 816: warning: exported method NoRequestServiceMtNoRequestSubscription.Next should have comment or be unexported (golint)
    • Line 825: warning: exported method NoRequestServiceClient.MtNoRequestSubscribeSync should have comment or be unexported (golint)
    • Line 839: warning: exported method NoRequestServiceClient.MtNoRequestSubscribe should have comment or be unexported (golint)
    • Line 858: warning: exported method NoRequestServiceClient.MtNoRequestSubscribeChan should have comment or be unexported (golint)
    • Line 868: warning: exported type Client should have comment or be unexported (golint)
    • Line 879: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 892: warning: exported method Client.SetEncoding should have comment or be unexported (golint)
    • Line 905: warning: exported method Client.SetTimeout should have comment or be unexported (golint)
    • Line 918: warning: exported method Client.SetSvcSubjectParamsParams should have comment or be unexported (golint)
    • Line 930: warning: exported method Client.NewSvcSubjectParams 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!


misspell91%

Misspell Finds commonly misspelled English words