Preparing report...

Report for github.com/segmentio/nsq-go

A+    Excellent!    Found 26 issues across 70 files

Tweet

gofmt91%

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!


golint74%

Golint is a linter for Go source code.

    • nsq-go/lookup.go
    • Line 15: warning: exported type ProducerInfo should have comment or be unexported (golint)
    • Line 24: warning: exported type LookupResult should have comment or be unexported (golint)
    • Line 29: warning: exported type LookupClient should have comment or be unexported (golint)
    • Line 36: warning: exported method LookupClient.Lookup should have comment or be unexported (golint)
    • nsq-go/nsqlookup/error.go
    • Line 12: warning: exported type Error should have comment or be unexported (golint)
    • Line 18: warning: exported const ErrInvalid should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported method Error.Status should have comment or be unexported (golint)
    • nsq-go/nsqlookup/ping.go
    • Line 5: warning: exported type Ping should have comment or be unexported (golint)
    • Line 8: warning: exported method Ping.Name should have comment or be unexported (golint)
    • nsq-go/nsq.go
    • Line 13: warning: exported type Client should have comment or be unexported (golint)
    • Line 20: warning: exported method Client.Ping should have comment or be unexported (golint)
    • Line 24: warning: exported method Client.Publish should have comment or be unexported (golint)
    • Line 31: warning: exported method Client.MutliPublish should have comment or be unexported (golint)
    • Line 38: warning: exported method Client.CreateTopic should have comment or be unexported (golint)
    • Line 44: warning: exported method Client.DeleteTopic should have comment or be unexported (golint)
    • Line 50: warning: exported method Client.EmptyTopic should have comment or be unexported (golint)
    • Line 56: warning: exported method Client.PauseTopic should have comment or be unexported (golint)
    • Line 62: warning: exported method Client.UnpauseTopic should have comment or be unexported (golint)
    • Line 68: warning: exported method Client.CreateChannel should have comment or be unexported (golint)
    • Line 75: warning: exported method Client.DeleteChannel should have comment or be unexported (golint)
    • Line 82: warning: exported method Client.EmptyChannel should have comment or be unexported (golint)
    • Line 89: warning: exported method Client.PauseChannel should have comment or be unexported (golint)
    • Line 96: warning: exported method Client.UnpauseChannel should have comment or be unexported (golint)
    • nsq-go/nsqlookup/ok.go
    • Line 5: warning: exported type OK should have comment or be unexported (golint)
    • Line 8: warning: exported method OK.Status should have comment or be unexported (golint)
    • nsq-go/nsqlookup/register.go
    • Line 8: warning: exported type Register should have comment or be unexported (golint)
    • Line 13: warning: exported method Register.Name should have comment or be unexported (golint)
    • nsq-go/nsqlookup/topology.go
    • Line 8: warning: comment on exported type Topology should be of the form "Topology ..." (with optional leading article) (golint)
    • Line 24: warning: exported method SubnetTopology.LookupIPZone should have comment or be unexported (golint)
    • nsq-go/nsqlookup/resolver.go
    • Line 14: warning: exported type Registry should have comment or be unexported (golint)
    • Line 40: warning: exported method LocalRegistry.Lookup should have comment or be unexported (golint)
    • Line 53: warning: exported method ConsulRegistry.Lookup should have comment or be unexported (golint)
    • nsq-go/command.go
    • Line 44: 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)
    • nsq-go/conn.go
    • Line 13: warning: exported const DefaultUserAgent should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported type Conn should have comment or be unexported (golint)
    • Line 37: warning: exported function NewConn should have comment or be unexported (golint)
    • Line 46: warning: exported function Dial should have comment or be unexported (golint)
    • Line 50: warning: exported function DialTimeout should have comment or be unexported (golint)
    • Line 83: warning: exported method Conn.WriteCommand should have comment or be unexported (golint)
    • Line 96: warning: exported method Conn.WriteFrame should have comment or be unexported (golint)
    • Line 120: warning: exported method Conn.ReadCommand should have comment or be unexported (golint)
    • Line 131: warning: exported method Conn.ReadFrame should have comment or be unexported (golint)
    • Line 153: warning: exported method Conn.Close should have comment or be unexported (golint)
    • Line 160: warning: exported method Conn.SetReadDeadline should have comment or be unexported (golint)
    • Line 167: warning: exported method Conn.SetWriteDeadline should have comment or be unexported (golint)
    • Line 174: warning: exported method Conn.SetDeadline should have comment or be unexported (golint)
    • Line 181: warning: exported method Conn.LocalAddr should have comment or be unexported (golint)
    • Line 185: warning: exported method Conn.RemoteAddr should have comment or be unexported (golint)
    • nsq-go/error.go
    • Line 15: warning: exported const ErrInvalid should have comment (or a comment on this block) or be unexported (golint)
    • nsq-go/nsqlookup/consul.go
    • Line 91: warning: exported method ConsulEngine.Close should have comment or be unexported (golint)
    • Line 95: warning: exported method ConsulEngine.RegisterNode should have comment or be unexported (golint)
    • Line 110: warning: exported method ConsulEngine.TombstoneTopic should have comment or be unexported (golint)
    • Line 124: warning: exported method ConsulEngine.LookupNodes should have comment or be unexported (golint)
    • Line 149: warning: exported method ConsulEngine.LookupProducers should have comment or be unexported (golint)
    • Line 200: warning: exported method ConsulEngine.LookupTopics should have comment or be unexported (golint)
    • Line 210: warning: exported method ConsulEngine.LookupChannels should have comment or be unexported (golint)
    • Line 220: warning: exported method ConsulEngine.LookupInfo should have comment or be unexported (golint)
    • Line 226: warning: exported method ConsulEngine.CheckHealth should have comment or be unexported (golint)
    • Line 452: warning: exported type ConsulNode should have comment or be unexported (golint)
    • Line 470: warning: exported method ConsulNode.Info should have comment or be unexported (golint)
    • Line 474: warning: exported method ConsulNode.Ping should have comment or be unexported (golint)
    • Line 478: warning: exported method ConsulNode.Unregister should have comment or be unexported (golint)
    • Line 482: warning: exported method ConsulNode.RegisterTopic should have comment or be unexported (golint)
    • Line 486: warning: exported method ConsulNode.UnregisterTopic should have comment or be unexported (golint)
    • Line 490: warning: exported method ConsulNode.RegisterChannel should have comment or be unexported (golint)
    • Line 494: warning: exported method ConsulNode.UnregisterChannel should have comment or be unexported (golint)
    • nsq-go/nsqlookup/handler.go
    • Line 30: warning: comment on exported const DefaultWriteTimeout should be of the form "DefaultWriteTimeout ..." (golint)
    • Line 433: warning: comment on exported type TCPHandler should be of the form "TCPHandler ..." (with optional leading article) (golint)
    • nsq-go/nsqlookup/local.go
    • Line 75: warning: exported method LocalEngine.Close should have comment or be unexported (golint)
    • Line 81: warning: exported method LocalEngine.RegisterNode should have comment or be unexported (golint)
    • Line 124: warning: exported method LocalEngine.TombstoneTopic should have comment or be unexported (golint)
    • Line 144: warning: exported method LocalEngine.LookupNodes should have comment or be unexported (golint)
    • Line 181: warning: exported method LocalEngine.LookupProducers should have comment or be unexported (golint)
    • Line 194: warning: exported method LocalEngine.LookupTopics should have comment or be unexported (golint)
    • Line 215: warning: exported method LocalEngine.LookupChannels should have comment or be unexported (golint)
    • Line 236: warning: exported method LocalEngine.LookupInfo should have comment or be unexported (golint)
    • Line 242: warning: exported method LocalEngine.CheckHealth should have comment or be unexported (golint)
    • Line 295: warning: exported type LocalNode should have comment or be unexported (golint)
    • Line 321: warning: exported method LocalNode.Info should have comment or be unexported (golint)
    • Line 325: warning: exported method LocalNode.Ping should have comment or be unexported (golint)
    • Line 329: warning: exported method LocalNode.Unregister should have comment or be unexported (golint)
    • Line 333: warning: exported method LocalNode.RegisterTopic should have comment or be unexported (golint)
    • Line 341: warning: exported method LocalNode.UnregisterTopic should have comment or be unexported (golint)
    • Line 349: warning: exported method LocalNode.RegisterChannel should have comment or be unexported (golint)
    • Line 357: warning: exported method LocalNode.UnregisterChannel should have comment or be unexported (golint)
    • nsq-go/nsqlookup/proxy.go
    • Line 49: warning: exported method ProxyEngine.Close should have comment or be unexported (golint)
    • Line 53: warning: exported method ProxyEngine.RegisterNode should have comment or be unexported (golint)
    • Line 57: warning: exported method ProxyEngine.TombstoneTopic should have comment or be unexported (golint)
    • Line 89: warning: exported method ProxyEngine.LookupNodes should have comment or be unexported (golint)
    • Line 138: warning: exported method ProxyEngine.LookupProducers should have comment or be unexported (golint)
    • Line 223: warning: exported method ProxyEngine.LookupTopics should have comment or be unexported (golint)
    • Line 272: warning: exported method ProxyEngine.LookupChannels should have comment or be unexported (golint)
    • Line 321: warning: exported method ProxyEngine.LookupInfo should have comment or be unexported (golint)
    • Line 327: warning: exported method ProxyEngine.CheckHealth should have comment or be unexported (golint)
    • Line 367: warning: receiver name e should be consistent with previous receiver name p for ProxyEngine (golint)
    • Line 433: warning: exported type ProxyNode should have comment or be unexported (golint)
    • nsq-go/consumer.go
    • Line 15: warning: exported type Consumer should have comment or be unexported (golint)
    • Line 42: warning: exported type ConsumerConfig should have comment or be unexported (golint)
    • Line 149: warning: exported method Consumer.Stop should have comment or be unexported (golint)
    • Line 153: warning: exported method Consumer.Messages should have comment or be unexported (golint)
    • nsq-go/nsqlookup/identify.go
    • Line 10: warning: exported type Identify should have comment or be unexported (golint)
    • Line 14: warning: exported method Identify.Name should have comment or be unexported (golint)
    • nsq-go/nsqlookup/unregister.go
    • Line 8: warning: exported type Unregister should have comment or be unexported (golint)
    • Line 13: warning: exported method Unregister.Name should have comment or be unexported (golint)

gocyclo95%

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.


ineffassign97%

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!