Preparing report...

Report for github.com/XiaoMi/pegasus-go-client

A+    Excellent!    Found 14 issues across 66 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!


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!


golint80%

Golint is a linter for Go source code.

    • pegasus-go-client/idl/base/error_code.go
    • Line 9: warning: comment on exported type ErrorCode should be of the form "ErrorCode ..." (with optional leading article) (golint)
    • Line 21: warning: comment on exported type DsnErrCode should be of the form "DsnErrCode ..." (with optional leading article) (golint)
    • Line 25: warning: exported const ERR_OK should have comment (or a comment on this block) or be unexported (golint)
    • Line 109: warning: comment on exported type RocksDBErrCode should be of the form "RocksDBErrCode ..." (with optional leading article) (golint)
    • Line 113: warning: exported const Ok should have comment (or a comment on this block) or be unexported (golint)
    • Line 129: warning: exported function NewRocksDBErrFromInt should have comment or be unexported (golint)
    • pegasus-go-client/idl/base/rpc_address.go
    • Line 15: warning: exported type RPCAddress should have comment or be unexported (golint)
    • Line 19: warning: exported function NewRPCAddress should have comment or be unexported (golint)
    • Line 53: warning: exported method RPCAddress.GetAddress should have comment or be unexported (golint)
    • Line 57: warning: exported method RPCAddress.GetRawAddress should have comment or be unexported (golint)
    • pegasus-go-client/session/codec.go
    • Line 25: warning: exported type PegasusCodec should have comment or be unexported (golint)
    • Line 29: warning: exported function NewPegasusCodec should have comment or be unexported (golint)
    • Line 33: warning: exported method PegasusCodec.Marshal should have comment or be unexported (golint)
    • Line 69: warning: exported method PegasusCodec.Unmarshal should have comment or be unexported (golint)
    • Line 318: warning: exported type UnmarshalFunc should have comment or be unexported (golint)
    • Line 320: warning: exported type MarshalFunc should have comment or be unexported (golint)
    • Line 322: warning: exported method MockCodec.Marshal should have comment or be unexported (golint)
    • Line 329: warning: exported method MockCodec.Unmarshal should have comment or be unexported (golint)
    • Line 340: warning: exported method MockCodec.MockMarshal should have comment or be unexported (golint)
    • Line 344: warning: exported method MockCodec.MockUnMarshal should have comment or be unexported (golint)
    • Line 348: warning: comment on exported type RpcRequestArgs should be of the form "RpcRequestArgs ..." (with optional leading article) (golint)
    • Line 354: warning: comment on exported type RpcResponseResult should be of the form "RpcResponseResult ..." (with optional leading article) (golint)
    • Line 360: warning: exported type PegasusRpcCall should have comment or be unexported (golint)
    • Line 375: warning: exported method PegasusRpcCall.Trace should have comment or be unexported (golint)
    • Line 382: warning: exported method PegasusRpcCall.TilNow should have comment or be unexported (golint)
    • Line 386: warning: exported function MarshallPegasusRpc should have comment or be unexported (golint)
    • Line 401: warning: exported function ReadRpcResponse should have comment or be unexported (golint)
    • pegasus-go-client/session/replica_session.go
    • Line 22: warning: exported method ReplicaSession.Get should have comment or be unexported (golint)
    • Line 33: warning: exported method ReplicaSession.Put should have comment or be unexported (golint)
    • Line 45: warning: exported method ReplicaSession.Del should have comment or be unexported (golint)
    • Line 56: warning: exported method ReplicaSession.MultiGet should have comment or be unexported (golint)
    • Line 67: warning: exported method ReplicaSession.MultiSet should have comment or be unexported (golint)
    • Line 78: warning: exported method ReplicaSession.MultiDelete should have comment or be unexported (golint)
    • Line 89: warning: exported method ReplicaSession.TTL should have comment or be unexported (golint)
    • Line 100: warning: exported method ReplicaSession.GetScanner should have comment or be unexported (golint)
    • Line 111: warning: exported method ReplicaSession.Scan should have comment or be unexported (golint)
    • Line 122: warning: exported method ReplicaSession.ClearScanner should have comment or be unexported (golint)
    • Line 132: warning: exported method ReplicaSession.CheckAndSet should have comment or be unexported (golint)
    • Line 143: warning: exported method ReplicaSession.SortKeyCount should have comment or be unexported (golint)
    • Line 154: warning: exported method ReplicaSession.Incr should have comment or be unexported (golint)
    • Line 186: warning: comment on exported method ReplicaManager.GetReplica should be of the form "GetReplica ..." (golint)
    • Line 201: warning: exported function NewReplicaManager should have comment or be unexported (golint)
    • Line 208: warning: exported method ReplicaManager.Close should have comment or be unexported (golint)
    • Line 222: warning: exported method ReplicaManager.ReplicaCount should have comment or be unexported (golint)
    • pegasus-go-client/rpc/rpc_conn.go
    • Line 24: warning: exported type ConnState should have comment or be unexported (golint)
    • Line 27: warning: comment on exported const ConnStateInit should be of the form "ConnStateInit ..." (golint)
    • Line 30: warning: exported const ConnStateConnecting should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: comment on exported const ConnStateTransientFailure should be of the form "ConnStateTransientFailure ..." (golint)
    • Line 37: warning: comment on exported const ConnStateClosed should be of the form "ConnStateClosed ..." (golint)
    • Line 58: warning: exported var ErrConnectionNotReady should have comment or be unexported (golint)
    • Line 77: warning: comment on exported method RpcConn.GetState should be of the form "GetState ..." (golint)
    • Line 91: warning: comment on exported method RpcConn.TryConnect should be of the form "TryConnect ..." (golint)
    • Line 126: warning: comment on exported method RpcConn.Close should be of the form "Close ..." (golint)
    • Line 186: warning: comment on exported function NewRpcConn should be of the form "NewRpcConn ..." (golint)
    • Line 197: warning: comment on exported method RpcConn.SetWriteTimeout should be of the form "SetWriteTimeout ..." (golint)
    • Line 202: warning: comment on exported method RpcConn.SetReadTimeout should be of the form "SetReadTimeout ..." (golint)
    • Line 213: warning: comment on exported function NewFakeRpcConn should be of the form "NewFakeRpcConn ..." (golint)
    • pegasus-go-client/rpc/stream_in.go
    • Line 51: warning: comment on exported type ReadStream should be of the form "ReadStream ..." (with optional leading article) (golint)
    • Line 56: warning: exported method ReadStream.Next should have comment or be unexported (golint)
    • Line 73: warning: exported function NewReadStream should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!