Preparing report...

Report for github.com/yedamao/go_cmpp

A+    Excellent!    Found 18 issues across 31 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


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!


gocyclo93%

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.


golint41%

Golint is a linter for Go source code.

    • go_cmpp/cmpp/protocol/op_deliver.go
    • Line 10: warning: comment on exported type Deliver should be of the form "Deliver ..." (with optional leading article) (golint)
    • Line 21: warning: don't use underscores in Go names; struct field TP_pid should be TPPid (golint)
    • Line 22: warning: don't use underscores in Go names; struct field TP_udhi should be TPUdhi (golint)
    • Line 35: warning: exported function NewDeliver should have comment or be unexported (golint)
    • Line 37: warning: don't use underscores in Go names; func parameter TP_pid should be TPPid (golint)
    • Line 37: warning: don't use underscores in Go names; func parameter TP_udhi should be TPUdhi (golint)
    • Line 86: warning: exported function ParseDeliver should have comment or be unexported (golint)
    • Line 124: warning: exported method Deliver.Serialize should have comment or be unexported (golint)
    • Line 166: warning: exported method Deliver.Ok should have comment or be unexported (golint)
    • Line 170: warning: exported type DeliverResp should have comment or be unexported (golint)
    • Line 178: warning: exported function NewDeliverResp should have comment or be unexported (golint)
    • Line 199: warning: exported function ParseDeliverResp should have comment or be unexported (golint)
    • Line 213: warning: exported method DeliverResp.Serialize should have comment or be unexported (golint)
    • Line 233: warning: exported method DeliverResp.Ok should have comment or be unexported (golint)
    • go_cmpp/cmpp/conn/conn.go
    • Line 13: warning: exported var ErrReadLen should have comment or be unexported (golint)
    • Line 22: warning: comment on exported function NewConn should be of the form "NewConn ..." (golint)
    • Line 62: warning: exported method Conn.Close should have comment or be unexported (golint)
    • go_cmpp/cmpp/cmpptest/server.go
    • Line 16: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 34: warning: exported method Server.Run should have comment or be unexported (golint)
    • Line 58: warning: exported method Server.Stop should have comment or be unexported (golint)
    • go_cmpp/cmpp/cmpptest/session.go
    • Line 32: warning: comment on exported type Session should be of the form "Session ..." (with optional leading article) (golint)
    • Line 38: warning: exported method Session.ConnectResp should have comment or be unexported (golint)
    • Line 49: warning: exported method Session.TerminateResp should have comment or be unexported (golint)
    • Line 59: warning: exported method Session.ActiveTest should have comment or be unexported (golint)
    • Line 70: warning: exported method Session.ActiveTestResp should have comment or be unexported (golint)
    • Line 80: warning: exported method Session.SubmitResp should have comment or be unexported (golint)
    • Line 90: warning: exported method Session.QueryResp should have comment or be unexported (golint)
    • Line 93: warning: don't use underscores in Go names; method parameter MT_TLMsg should be MTTLMsg (golint)
    • Line 93: warning: don't use underscores in Go names; method parameter MT_Tlusr should be MTTlusr (golint)
    • Line 94: warning: don't use underscores in Go names; method parameter MT_Scs should be MTScs (golint)
    • Line 94: warning: don't use underscores in Go names; method parameter MO_Scs should be MOScs (golint)
    • Line 110: warning: exported method Session.Deliver should have comment or be unexported (golint)
    • go_cmpp/cmpp/protocol/op_cancel.go
    • Line 9: warning: comment on exported type Cancel should be of the form "Cancel ..." (with optional leading article) (golint)
    • Line 21: warning: exported function NewCancel should have comment or be unexported (golint)
    • Line 37: warning: exported function ParseCancel should have comment or be unexported (golint)
    • Line 49: warning: exported method Cancel.Serialize should have comment or be unexported (golint)
    • Line 67: warning: exported method Cancel.Ok should have comment or be unexported (golint)
    • Line 71: warning: exported type CancelResp should have comment or be unexported (golint)
    • Line 82: warning: exported function NewCancelResp should have comment or be unexported (golint)
    • Line 98: warning: exported function ParseCancelResp should have comment or be unexported (golint)
    • Line 109: warning: exported method CancelResp.Serialize should have comment or be unexported (golint)
    • Line 127: warning: exported method CancelResp.Ok should have comment or be unexported (golint)
    • go_cmpp/cmpp/cmpp.go
    • Line 11: warning: exported type SequenceFunc should have comment or be unexported (golint)
    • Line 13: warning: exported type Cmpp should have comment or be unexported (golint)
    • Line 20: warning: exported function NewCmpp should have comment or be unexported (golint)
    • Line 55: warning: exported method Cmpp.Connect should have comment or be unexported (golint)
    • Line 77: warning: exported method Cmpp.Terminate should have comment or be unexported (golint)
    • Line 87: warning: exported method Cmpp.TerminateResp should have comment or be unexported (golint)
    • Line 97: warning: exported method Cmpp.ActiveTest should have comment or be unexported (golint)
    • Line 107: warning: exported method Cmpp.ActiveTestResp should have comment or be unexported (golint)
    • Line 117: warning: exported method Cmpp.Cancel should have comment or be unexported (golint)
    • Line 127: warning: exported method Cmpp.DeliverResp should have comment or be unexported (golint)
    • Line 137: warning: exported method Cmpp.Submit should have comment or be unexported (golint)
    • Line 145: warning: don't use underscores in Go names; var TP_udhi should be TPUdhi (golint)
    • Line 169: warning: exported method Cmpp.Query should have comment or be unexported (golint)
    • go_cmpp/cmpp/protocol/header.go
    • Line 8: warning: comment on exported type Header should be of the form "Header ..." (with optional leading article) (golint)
    • Line 11: warning: don't use underscores in Go names; struct field Total_Length should be TotalLength (golint)
    • Line 13: warning: don't use underscores in Go names; struct field Command_Id should be CommandID (golint)
    • Line 15: warning: don't use underscores in Go names; struct field Sequence_Id should be SequenceID (golint)
    • Line 18: warning: exported method Header.GetHeader should have comment or be unexported (golint)
    • Line 22: warning: exported method Header.Serialize should have comment or be unexported (golint)
    • Line 40: warning: exported method Header.Parse should have comment or be unexported (golint)
    • Line 49: warning: exported function ParseHeader should have comment or be unexported (golint)
    • go_cmpp/cmpp/protocol/op_connect.go
    • Line 10: warning: comment on exported type Connect should be of the form "Connect ..." (with optional leading article) (golint)
    • Line 31: warning: exported function NewConnect should have comment or be unexported (golint)
    • Line 65: warning: exported function ParseConnect should have comment or be unexported (golint)
    • Line 86: warning: exported method Connect.Serialize should have comment or be unexported (golint)
    • Line 110: warning: exported method Connect.Ok should have comment or be unexported (golint)
    • Line 115: warning: exported type ConnectResp should have comment or be unexported (golint)
    • Line 126: warning: exported function NewConnectResp should have comment or be unexported (golint)
    • Line 150: warning: exported function ParseConnectResp should have comment or be unexported (golint)
    • Line 167: warning: exported method ConnectResp.Serialize should have comment or be unexported (golint)
    • Line 189: warning: exported method ConnectResp.Ok should have comment or be unexported (golint)
    • go_cmpp/cmpp/protocol/types.go
    • Line 10: warning: comment on exported type OctetString should be of the form "OctetString ..." (with optional leading article) (golint)
    • Line 29: warning: comment on exported method OctetString.Byte should be of the form "Byte ..." (golint)
    • go_cmpp/cmpp/protocol/consts.go
    • Line 4: warning: comment on exported const VERSION should be of the form "VERSION ..." (golint)
    • Line 15: warning: exported const CMPP_SUBMIT should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported const CMPP_CONNECT_RESP should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported const CMPP_SUBMIT_RESP should have comment (or a comment on this block) or be unexported (golint)
    • go_cmpp/cmpp/protocol/op_activetest.go
    • Line 8: warning: comment on exported type ActiveTest should be of the form "ActiveTest ..." (with optional leading article) (golint)
    • Line 15: warning: exported function NewActiveTest should have comment or be unexported (golint)
    • Line 27: warning: exported function ParseActiveTest should have comment or be unexported (golint)
    • Line 34: warning: exported method ActiveTest.Serialize should have comment or be unexported (golint)
    • Line 44: warning: exported method ActiveTest.Ok should have comment or be unexported (golint)
    • Line 48: warning: exported type ActiveTestResp should have comment or be unexported (golint)
    • Line 55: warning: exported function NewActiveTestResp should have comment or be unexported (golint)
    • Line 71: warning: exported function ParseActiveTestResp should have comment or be unexported (golint)
    • Line 82: warning: exported method ActiveTestResp.Serialize should have comment or be unexported (golint)
    • Line 100: warning: exported method ActiveTestResp.Ok should have comment or be unexported (golint)
    • go_cmpp/cmpp/protocol/op_submit.go
    • Line 10: warning: comment on exported type Submit should be of the form "Submit ..." (with optional leading article) (golint)
    • Line 40: warning: don't use underscores in Go names; struct field TP_pid should be TPPid (golint)
    • Line 41: warning: don't use underscores in Go names; struct field TP_udhi should be TPUdhi (golint)
    • Line 70: warning: exported function NewSubmit should have comment or be unexported (golint)
    • Line 74: warning: don't use underscores in Go names; func parameter TP_pid should be TPPid (golint)
    • Line 74: warning: don't use underscores in Go names; func parameter TP_udhi should be TPUdhi (golint)
    • Line 158: warning: exported function ParseSubmit should have comment or be unexported (golint)
    • Line 225: warning: exported method Submit.Serialize should have comment or be unexported (golint)
    • Line 301: warning: exported method Submit.Ok should have comment or be unexported (golint)
    • Line 305: warning: exported type SubmitResp should have comment or be unexported (golint)
    • Line 313: warning: exported function NewSubmitResp should have comment or be unexported (golint)
    • Line 334: warning: exported function ParseSubmitResp should have comment or be unexported (golint)
    • Line 348: warning: exported method SubmitResp.Serialize should have comment or be unexported (golint)
    • Line 368: warning: exported method SubmitResp.Ok should have comment or be unexported (golint)
    • go_cmpp/cmpp/protocol/op_terminate.go
    • Line 3: warning: comment on exported type Terminate should be of the form "Terminate ..." (with optional leading article) (golint)
    • Line 8: warning: exported function NewTerminate should have comment or be unexported (golint)
    • Line 20: warning: exported function ParseTermanite should have comment or be unexported (golint)
    • Line 27: warning: exported method Terminate.Serialize should have comment or be unexported (golint)
    • Line 37: warning: exported method Terminate.Ok should have comment or be unexported (golint)
    • Line 41: warning: exported type TerminateResp should have comment or be unexported (golint)
    • Line 45: warning: exported function NewTerminateResp should have comment or be unexported (golint)
    • Line 57: warning: exported function ParseTermaniteResp should have comment or be unexported (golint)
    • Line 64: warning: exported method TerminateResp.Serialize should have comment or be unexported (golint)
    • Line 74: warning: exported method TerminateResp.Ok should have comment or be unexported (golint)
    • go_cmpp/cmpp/protocol/op_query.go
    • Line 8: warning: comment on exported type Query should be of the form "Query ..." (with optional leading article) (golint)
    • Line 22: warning: don't use underscores in Go names; struct field Query_Type should be QueryType (golint)
    • Line 26: warning: don't use underscores in Go names; struct field Query_Code should be QueryCode (golint)
    • Line 30: warning: exported function NewQuery should have comment or be unexported (golint)
    • Line 59: warning: exported function ParseQuery should have comment or be unexported (golint)
    • Line 80: warning: exported method Query.Serialize should have comment or be unexported (golint)
    • Line 104: warning: exported method Query.Ok should have comment or be unexported (golint)
    • Line 108: warning: exported type QueryResp should have comment or be unexported (golint)
    • Line 117: warning: don't use underscores in Go names; struct field Query_Type should be QueryType (golint)
    • Line 121: warning: don't use underscores in Go names; struct field Query_Code should be QueryCode (golint)
    • Line 123: warning: don't use underscores in Go names; struct field MT_TLMsg should be MTTLMsg (golint)
    • Line 124: warning: don't use underscores in Go names; struct field MT_Tlusr should be MTTlusr (golint)
    • Line 126: warning: don't use underscores in Go names; struct field MT_Scs should be MTScs (golint)
    • Line 129: warning: don't use underscores in Go names; struct field MO_Scs should be MOScs (golint)
    • Line 134: warning: exported function NewQueryResp should have comment or be unexported (golint)
    • Line 137: warning: don't use underscores in Go names; func parameter MT_TLMsg should be MTTLMsg (golint)
    • Line 137: warning: don't use underscores in Go names; func parameter MT_Tlusr should be MTTlusr (golint)
    • Line 138: warning: don't use underscores in Go names; func parameter MT_Scs should be MTScs (golint)
    • Line 138: warning: don't use underscores in Go names; func parameter MO_Scs should be MOScs (golint)
    • Line 181: warning: exported function ParseQueryResp should have comment or be unexported (golint)
    • Line 217: warning: exported method QueryResp.Serialize should have comment or be unexported (golint)
    • Line 259: warning: exported method QueryResp.Ok should have comment or be unexported (golint)
    • go_cmpp/cmpp/protocol/report.go
    • Line 7: warning: comment on exported type Report should be of the form "Report ..." (with optional leading article) (golint)
    • Line 19: warning: exported function ParseReport should have comment or be unexported (golint)
    • Line 43: warning: exported function NewReport should have comment or be unexported (golint)
    • Line 60: warning: exported method Report.Serialize should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign77%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!