Preparing report...

Report for github.com/coapcloud/go-coap

A+    Excellent!    Found 19 issues across 56 files

Tweet

gofmt92%

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!


golint71%

Golint is a linter for Go source code.

    • go-coap/client.go
    • Line 82: warning: exported method Client.Dial should have comment or be unexported (golint)
    • Line 331: warning: exported method ClientConn.Exchange should have comment or be unexported (golint)
    • Line 335: warning: comment on exported method ClientConn.ExchangeWithContext should be of the form "ExchangeWithContext ..." (golint)
    • Line 374: warning: exported method ClientConn.WriteMsg should have comment or be unexported (golint)
    • Line 378: warning: comment on exported method ClientConn.WriteMsgWithContext should be of the form "WriteMsgWithContext ..." (golint)
    • Line 390: warning: comment on exported method ClientConn.PingWithContext should be of the form "PingWithContext ..." (golint)
    • Line 395: warning: comment on exported method ClientConn.Get should be of the form "Get ..." (golint)
    • Line 400: warning: exported method ClientConn.GetWithContext should have comment or be unexported (golint)
    • Line 407: warning: exported method ClientConn.Post should have comment or be unexported (golint)
    • Line 411: warning: comment on exported method ClientConn.PostWithContext should be of the form "PostWithContext ..." (golint)
    • Line 419: warning: exported method ClientConn.Put should have comment or be unexported (golint)
    • Line 423: warning: comment on exported method ClientConn.PutWithContext should be of the form "PutWithContext ..." (golint)
    • Line 431: warning: exported method ClientConn.Delete should have comment or be unexported (golint)
    • Line 435: warning: comment on exported method ClientConn.DeleteWithContext should be of the form "DeleteWithContext ..." (golint)
    • Line 443: warning: exported method ClientConn.Observe should have comment or be unexported (golint)
    • Line 447: warning: exported method ClientConn.ObserveWithContext should have comment or be unexported (golint)
    • go-coap/clientcommander.go
    • Line 107: warning: comment on exported method ClientCommander.ExchangeWithContext should be of the form "ExchangeWithContext ..." (golint)
    • Line 121: warning: comment on exported method ClientCommander.WriteMsgWithContext should be of the form "WriteMsgWithContext ..." (golint)
    • Line 133: warning: comment on exported method ClientCommander.PingWithContext should be of the form "PingWithContext ..." (golint)
    • Line 143: warning: comment on exported method ClientCommander.GetWithContext should be of the form "GetWithContext ..." (golint)
    • Line 157: warning: comment on exported method ClientCommander.PostWithContext should be of the form "PostWithContext ..." (golint)
    • Line 171: warning: comment on exported method ClientCommander.PutWithContext should be of the form "PutWithContext ..." (golint)
    • Line 185: warning: comment on exported method ClientCommander.DeleteWithContext should be of the form "DeleteWithContext ..." (golint)
    • Line 202: warning: exported method Observation.Cancel should have comment or be unexported (golint)
    • Line 206: warning: comment on exported method Observation.CancelWithContext should be of the form "CancelWithContext ..." (golint)
    • Line 224: warning: exported method ClientCommander.Observe should have comment or be unexported (golint)
    • Line 228: warning: comment on exported method ClientCommander.ObserveWithContext should be of the form "ObserveWithContext ..." (golint)
    • go-coap/utils.go
    • Line 29: warning: comment on exported function CalcETag should be of the form "CalcETag ..." (golint)
    • go-coap/message.go
    • Line 492: warning: exported method MessageBase.Type should have comment or be unexported (golint)
    • Line 496: warning: exported method MessageBase.SetType should have comment or be unexported (golint)
    • Line 500: warning: exported method MessageBase.Code should have comment or be unexported (golint)
    • Line 504: warning: exported method MessageBase.Token should have comment or be unexported (golint)
    • Line 508: warning: exported method MessageBase.Payload should have comment or be unexported (golint)
    • Line 512: warning: exported method MessageBase.AllOptions should have comment or be unexported (golint)
    • Line 601: warning: comment on exported method MessageBase.SetURIQuery should be of the form "SetURIQuery ..." (golint)
    • Line 606: warning: comment on exported method MessageBase.SetObserve should be of the form "SetObserve ..." (golint)
    • Line 611: warning: comment on exported method MessageBase.SetPayload should be of the form "SetPayload ..." (golint)
    • Line 616: warning: comment on exported method MessageBase.SetToken should be of the form "SetToken ..." (golint)
    • go-coap/messagetcp.go
    • Line 15: warning: exported const TCP_MESSAGE_LEN13_BASE should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported const MaxMessageSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 48: warning: exported const Custody should have comment (or a comment on this block) or be unexported (golint)
    • Line 103: warning: exported function NewTcpMessage should have comment or be unexported (golint)
    • Line 115: warning: exported method TcpMessage.MessageID should have comment or be unexported (golint)
    • Line 119: warning: comment on exported method TcpMessage.SetMessageID should be of the form "SetMessageID ..." (golint)
    • Line 124: warning: exported method TcpMessage.MarshalBinary should have comment or be unexported (golint)
    • Line 341: warning: exported method TcpMessage.ToBytesLength should have comment or be unexported (golint)
    • Line 359: warning: exported method TcpMessage.UnmarshalBinary should have comment or be unexported (golint)
    • Line 407: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-coap/net/conn.go
    • Line 52: warning: comment on exported method Conn.WriteWithContext should be of the form "WriteWithContext ..." (golint)
    • Line 80: warning: comment on exported method Conn.ReadFullWithContext should be of the form "ReadFullWithContext ..." (golint)
    • Line 93: warning: comment on exported method Conn.ReadWithContext should be of the form "ReadWithContext ..." (golint)
    • go-coap/net/error.go
    • Line 3: warning: exported type Error should have comment or be unexported (golint)
    • Line 7: warning: exported const ErrServerClosed should have comment or be unexported (golint)
    • go-coap/keepalive.go
    • Line 13: warning: exported type RetryFunc should have comment or be unexported (golint)
    • Line 14: warning: exported type RetryFuncFactory should have comment or be unexported (golint)
    • go-coap/messagedgram.go
    • Line 18: warning: exported function NewDgramMessage should have comment or be unexported (golint)
    • Line 30: warning: exported method DgramMessage.MessageID should have comment or be unexported (golint)
    • Line 34: warning: comment on exported method DgramMessage.SetMessageID should be of the form "SetMessageID ..." (golint)
    • go-coap/multicastClient.go
    • Line 14: warning: comment on exported type MulticastClientConn should be of the form "MulticastClientConn ..." (with optional leading article) (golint)
    • Line 71: warning: exported method MulticastClient.Dial should have comment or be unexported (golint)
    • Line 126: warning: comment on exported method MulticastClientConn.WriteMsgWithContext should be of the form "WriteMsgWithContext ..." (golint)
    • Line 154: warning: comment on exported method MulticastClientConn.PublishWithContext should be of the form "PublishWithContext ..." (golint)
    • go-coap/blockwise.go
    • Line 54: warning: exported function MarshalBlockOption should have comment or be unexported (golint)
    • Line 71: warning: exported function UnmarshalBlockOption should have comment or be unexported (golint)

gocyclo100%

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.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell96%

Misspell Finds commonly misspelled English words