Preparing report...

Report for github.com/davyxu/cellmesh

A+    Excellent!    Found 39 issues across 55 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!


gocyclo96%

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.


golint30%

Golint is a linter for Go source code.

    • cellmesh/discovery/memsd/proto/msgbind_gen.go
    • Line 9: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 22: warning: don't use underscores in Go names; var Handle_Memsd_AuthREQ should be HandleMemsdAuthREQ (golint)
    • Line 23: warning: don't use underscores in Go names; var Handle_Memsd_ClearKeyREQ should be HandleMemsdClearKeyREQ (golint)
    • Line 24: warning: don't use underscores in Go names; var Handle_Memsd_ClearSvcREQ should be HandleMemsdClearSvcREQ (golint)
    • Line 25: warning: don't use underscores in Go names; var Handle_Memsd_DeleteValueREQ should be HandleMemsdDeleteValueREQ (golint)
    • Line 26: warning: don't use underscores in Go names; var Handle_Memsd_GetValueREQ should be HandleMemsdGetValueREQ (golint)
    • Line 27: warning: don't use underscores in Go names; var Handle_Memsd_SetValueREQ should be HandleMemsdSetValueREQ (golint)
    • Line 28: warning: don't use underscores in Go names; var Handle_Memsd_Default should be HandleMemsdDefault (golint)
    • Line 31: warning: exported function GetMessageHandler should have comment or be unexported (golint)
    • cellmesh/util/uuid64.go
    • Line 50: warning: exported type UUID64Component should have comment or be unexported (golint)
    • Line 55: warning: exported type UUID64Generator should have comment or be unexported (golint)
    • Line 62: warning: exported const MaxNumFInt64 should have comment (or a comment on this block) or be unexported (golint)
    • Line 65: warning: exported method UUID64Generator.AddComponent should have comment or be unexported (golint)
    • Line 65: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 78: warning: exported method UUID64Generator.UsedNumF should have comment or be unexported (golint)
    • Line 78: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 87: warning: exported method UUID64Generator.LeftNumF should have comment or be unexported (golint)
    • Line 87: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 91: warning: comment on exported method UUID64Generator.AddSeqComponent should be of the form "AddSeqComponent ..." (golint)
    • Line 92: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 115: warning: comment on exported method UUID64Generator.AddConstComponent should be of the form "AddConstComponent ..." (golint)
    • Line 116: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 136: warning: comment on exported method UUID64Generator.AddTimeComponent should be of the form "AddTimeComponent ..." (golint)
    • Line 137: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 148: warning: comment on exported method UUID64Generator.Generate should be of the form "Generate ..." (golint)
    • Line 149: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 166: warning: exported function NewUUID64Generator should have comment or be unexported (golint)
    • cellmesh/service/init.go
    • Line 16: warning: exported function Init should have comment or be unexported (golint)
    • Line 87: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 92: warning: exported function LogParameter should have comment or be unexported (golint)
    • Line 106: warning: comment on exported function ConnectDiscovery should be of the form "ConnectDiscovery ..." (golint)
    • Line 114: warning: exported function WaitExitSignal should have comment or be unexported (golint)
    • cellmesh/service/msg.go
    • Line 8: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 14: warning: exported type ServiceIdentifyACK should have comment or be unexported (golint)
    • Line 19: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 30: warning: exported var ErrInvalidRelayMessage should have comment or be unexported (golint)
    • Line 34: warning: comment on exported function GetPassThrough should be of the form "GetPassThrough ..." (golint)
    • Line 53: 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)
    • Line 59: warning: comment on exported function Reply should be of the form "Reply ..." (golint)
    • cellmesh/discovery/memsd/api/const.go
    • Line 6: warning: exported const MaxValueSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 10: warning: exported var ErrValueNotExists should have comment or be unexported (golint)
    • cellmesh/service/query.go
    • Line 8: warning: exported type QueryServiceOp should have comment or be unexported (golint)
    • Line 11: warning: don't use underscores in Go names; const QueryServiceOp_NextFilter should be QueryServiceOpNextFilter (golint)
    • Line 11: warning: exported const QueryServiceOp_NextFilter should have comment (or a comment on this block) or be unexported (golint)
    • Line 12: warning: don't use underscores in Go names; const QueryServiceOp_NextDesc should be QueryServiceOpNextDesc (golint)
    • Line 13: warning: don't use underscores in Go names; const QueryServiceOp_End should be QueryServiceOpEnd (golint)
    • Line 16: warning: exported type QueryResult should have comment or be unexported (golint)
    • Line 18: warning: comment on exported type FilterFunc should be of the form "FilterFunc ..." (with optional leading article) (golint)
    • Line 25: warning: comment on exported function QueryService should be of the form "QueryService ..." (golint)
    • Line 31: warning: exported type QueryServiceOption should have comment or be unexported (golint)
    • Line 35: warning: exported function QueryServiceEx should have comment or be unexported (golint)
    • Line 95: warning: comment on exported function Filter_MatchSvcGroup should be of the form "Filter_MatchSvcGroup ..." (golint)
    • Line 96: warning: don't use underscores in Go names; func Filter_MatchSvcGroup should be FilterMatchSvcGroup (golint)
    • Line 108: warning: comment on exported function Filter_MatchSvcID should be of the form "Filter_MatchSvcID ..." (golint)
    • Line 109: warning: don't use underscores in Go names; func Filter_MatchSvcID should be FilterMatchSvcID (golint)
    • Line 121: warning: comment on exported function Filter_MatchRule should be of the form "Filter_MatchRule ..." (golint)
    • Line 122: warning: don't use underscores in Go names; func Filter_MatchRule should be FilterMatchRule (golint)
    • cellmesh/service/svcid.go
    • Line 11: warning: comment on exported function MakeSvcID should be of the form "MakeSvcID ..." (golint)
    • Line 16: warning: comment on exported function MakeLocalSvcID should be of the form "MakeLocalSvcID ..." (golint)
    • Line 21: warning: comment on exported function GetLocalSvcID should be of the form "GetLocalSvcID ..." (golint)
    • Line 26: warning: exported function ParseSvcID should have comment or be unexported (golint)
    • cellmesh/discovery/discovery.go
    • Line 3: warning: exported type ValueMeta should have comment or be unexported (golint)
    • Line 8: warning: exported type CheckerFunc should have comment or be unexported (golint)
    • Line 10: warning: exported type Discovery should have comment or be unexported (golint)
    • Line 38: warning: exported var Default should have comment or be unexported (golint)
    • cellmesh/discovery/memsd/api/conn.go
    • Line 13: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 24: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • cellmesh/service/remotesvc.go
    • Line 8: warning: exported type RemoteServiceContext should have comment or be unexported (golint)
    • Line 13: warning: exported type NotifyFunc should have comment or be unexported (golint)
    • Line 21: warning: exported function AddRemoteService should have comment or be unexported (golint)
    • Line 31: warning: exported function RemoveRemoteService should have comment or be unexported (golint)
    • Line 54: warning: comment on exported function SetRemoteServiceNotify should be of the form "SetRemoteServiceNotify ..." (golint)
    • Line 65: warning: comment on exported function SessionToContext should be of the form "SessionToContext ..." (golint)
    • Line 78: warning: comment on exported function GetRemoteService should be of the form "GetRemoteService ..." (golint)
    • Line 91: warning: comment on exported function VisitRemoteService should be of the form "VisitRemoteService ..." (golint)
    • cellmesh/discovery/memsd/api/transmitter.go
    • Line 9: warning: exported type TCPMessageTransmitter should have comment or be unexported (golint)
    • Line 18: warning: exported method TCPMessageTransmitter.OnRecvMessage should have comment or be unexported (golint)
    • Line 42: warning: exported method TCPMessageTransmitter.OnSendMessage should have comment or be unexported (golint)
    • cellmesh/service/discovery.go
    • Line 8: warning: exported type DiscoveryOption should have comment or be unexported (golint)
    • Line 14: warning: comment on exported function DiscoveryService should be of the form "DiscoveryService ..." (golint)
    • cellmesh/discovery/util.go
    • Line 10: warning: exported function BytesToAny should have comment or be unexported (golint)
    • Line 49: warning: exported function ValueMetaToSlice should have comment or be unexported (golint)
    • Line 76: warning: exported function AnyToBytes should have comment or be unexported (golint)
    • Line 92: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • cellmesh/service/hooker.go
    • Line 6: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 11: warning: comment on exported type SvcEventHooker should be of the form "SvcEventHooker ..." (with optional leading article) (golint)
    • Line 15: warning: exported method SvcEventHooker.OnInboundEvent should have comment or be unexported (golint)
    • Line 53: warning: exported method SvcEventHooker.OnOutboundEvent should have comment or be unexported (golint)
    • cellmesh/service/matchrule.go
    • Line 9: warning: exported type MatchRule should have comment or be unexported (golint)
    • Line 17: warning: exported function ParseMatchRule should have comment or be unexported (golint)
    • cellmesh/discovery/kvconfig/kvconfig.go
    • Line 25: warning: comment on exported function String should be of the form "String ..." (golint)
    • Line 31: warning: exported function Int32 should have comment or be unexported (golint)
    • Line 36: warning: exported function Int64 should have comment or be unexported (golint)
    • Line 41: warning: exported function Bool should have comment or be unexported (golint)
    • cellmesh/discovery/memsd/model/kv.go
    • Line 10: warning: exported type ValueMeta should have comment or be unexported (golint)
    • Line 17: warning: exported var ErrDesc should have comment or be unexported (golint)
    • Line 19: warning: exported method ValueMeta.ValueAsServiceDesc should have comment or be unexported (golint)
    • Line 19: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 33: warning: exported var ValueDirty should have comment or be unexported (golint)
    • Line 36: warning: exported function SetValue should have comment or be unexported (golint)
    • Line 41: warning: exported function GetValue should have comment or be unexported (golint)
    • Line 46: warning: exported function DeleteValue should have comment or be unexported (golint)
    • Line 54: warning: exported function ValueCount should have comment or be unexported (golint)
    • Line 58: warning: exported function VisitValue should have comment or be unexported (golint)
    • Line 66: warning: exported type PersistFile should have comment or be unexported (golint)
    • Line 75: warning: exported function SaveValue should have comment or be unexported (golint)
    • Line 100: warning: exported function LoadValue should have comment or be unexported (golint)
    • cellmesh/discovery/safevalue.go
    • Line 41: warning: comment on exported function SafeSetValue should be of the form "SafeSetValue ..." (golint)
    • Line 88: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 97: warning: exported function SafeGetValue should have comment or be unexported (golint)
    • cellmesh/discovery/memsd/api/rpc.go
    • Line 36: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 44: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • cellmesh/discovery/memsd/api/svc.go
    • Line 13: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 43: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 48: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 56: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 68: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 72: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 109: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 125: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 135: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 167: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • cellmesh/service/model.go
    • Line 5: warning: exported var LinkRules should have comment or be unexported (golint)
    • Line 8: warning: comment on exported function GetProcName should be of the form "GetProcName ..." (golint)
    • Line 13: warning: comment on exported function GetWANIP should be of the form "GetWANIP ..." (golint)
    • Line 18: warning: exported function GetSvcGroup should have comment or be unexported (golint)
    • Line 22: warning: exported function GetSvcIndex should have comment or be unexported (golint)
    • Line 26: warning: exported function GetDiscoveryAddr should have comment or be unexported (golint)
    • cellmesh/service/multipeer.go
    • Line 10: warning: comment on exported type MultiPeer should be of the form "MultiPeer ..." (with optional leading article) (golint)
    • Line 26: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 30: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 34: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 38: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 45: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 63: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 73: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 84: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • cellmesh/service/reg.go
    • Line 14: warning: exported type ServiceMeta should have comment or be unexported (golint)
    • Line 16: warning: comment on exported function Register should be of the form "Register ..." (golint)
    • Line 60: warning: comment on exported function Unregister should be of the form "Unregister ..." (golint)
    • cellmesh/discovery/memsd/model/svcmodel.go
    • Line 10: warning: exported const ServiceKeyPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported var Queue should have comment or be unexported (golint)
    • Line 23: warning: exported function IsServiceKey should have comment or be unexported (golint)
    • Line 28: warning: exported function GetSvcIDByServiceKey should have comment or be unexported (golint)
    • Line 42: warning: exported function GetSessionToken should have comment or be unexported (golint)
    • Line 48: warning: exported function Broadcast should have comment or be unexported (golint)
    • Line 55: warning: exported function TokenExists should have comment or be unexported (golint)
    • cellmesh/discovery/desc.go
    • Line 11: warning: comment on exported type ServiceDesc should be of the form "ServiceDesc ..." (with optional leading article) (golint)
    • Line 21: warning: exported method ServiceDesc.Equals should have comment or be unexported (golint)
    • Line 21: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 50: warning: exported method ServiceDesc.ContainTags should have comment or be unexported (golint)
    • Line 50: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 60: warning: exported method ServiceDesc.SetMeta should have comment or be unexported (golint)
    • Line 60: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 68: warning: exported method ServiceDesc.GetMeta should have comment or be unexported (golint)
    • Line 68: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 76: warning: exported method ServiceDesc.GetMetaAsInt should have comment or be unexported (golint)
    • Line 76: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 85: warning: exported method ServiceDesc.Address should have comment or be unexported (golint)
    • Line 85: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 89: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 106: warning: exported method ServiceDesc.FormatString should have comment or be unexported (golint)
    • Line 106: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • cellmesh/discovery/memsd/api/packet.go
    • Line 13: warning: exported var ErrMaxPacket should have comment or be unexported (golint)
    • Line 23: warning: comment on exported function RecvLTVPacket should be of the form "RecvLTVPacket ..." (golint)
    • Line 77: warning: comment on exported function SendLTVPacket should be of the form "SendLTVPacket ..." (golint)
    • cellmesh/discovery/memsd/cmd.go
    • Line 9: warning: exported function ViewSvc should have comment or be unexported (golint)
    • Line 41: warning: exported function ViewKey should have comment or be unexported (golint)
    • Line 57: warning: exported function GetValue should have comment or be unexported (golint)
    • Line 69: warning: exported function SetValue should have comment or be unexported (golint)
    • Line 78: warning: exported function ClearSvc should have comment or be unexported (golint)
    • Line 84: warning: exported function ClearValue should have comment or be unexported (golint)
    • Line 90: warning: exported function DeleteValue should have comment or be unexported (golint)
    • cellmesh/discovery/memsd/api/kv.go
    • Line 9: warning: exported type Option should have comment or be unexported (golint)
    • Line 26: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 33: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 39: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 45: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 72: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 83: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 94: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 112: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 127: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 147: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (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!


misspell98%

Misspell Finds commonly misspelled English words