Preparing report...

Report for github.com/scorum/bitshares-go

A+    Excellent!    Found 27 issues across 33 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!


golint21%

Golint is a linter for Go source code.

    • bitshares-go/types/suint.go
    • Line 16: warning: exported method Suint64.UnmarshalJSON should have comment or be unexported (golint)
    • Line 39: warning: exported method Suint32.UnmarshalJSON should have comment or be unexported (golint)
    • bitshares-go/types/time.go
    • Line 8: warning: exported const Layout should have comment or be unexported (golint)
    • Line 10: warning: exported type Time should have comment or be unexported (golint)
    • Line 14: warning: exported function NewTime should have comment or be unexported (golint)
    • Line 20: warning: exported method Time.MarshalJSON should have comment or be unexported (golint)
    • Line 24: warning: exported method Time.UnmarshalJSON should have comment or be unexported (golint)
    • Line 33: warning: exported method Time.MarshalTransaction should have comment or be unexported (golint)
    • bitshares-go/transport/websocket/transport.go
    • Line 17: warning: exported type Transport should have comment or be unexported (golint)
    • Line 41: warning: exported function NewTransport should have comment or be unexported (golint)
    • Line 57: warning: exported method Transport.Call should have comment or be unexported (golint)
    • Line 120: 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 196: warning: exported method Transport.SetCallback should have comment or be unexported (golint)
    • bitshares-go/apis/database/data.go
    • Line 8: warning: exported type Asset should have comment or be unexported (golint)
    • Line 16: warning: exported type BlockHeader should have comment or be unexported (golint)
    • Line 24: warning: exported type Block should have comment or be unexported (golint)
    • Line 34: warning: exported type MarketTicker should have comment or be unexported (golint)
    • Line 46: warning: exported type LimitOrder should have comment or be unexported (golint)
    • Line 55: warning: exported type DynamicGlobalProperties should have comment or be unexported (golint)
    • Line 72: warning: exported type Config should have comment or be unexported (golint)
    • Line 82: warning: exported type AccountsMap should have comment or be unexported (golint)
    • Line 84: warning: exported method AccountsMap.UnmarshalJSON should have comment or be unexported (golint)
    • bitshares-go/sign/rfc6979/rfc6979.go
    • Line 79: warning: exported function RandStringBytes should have comment or be unexported (golint)
    • Line 92: warning: don't use underscores in Go names; var hash_clone should be hashClone (golint)
    • Line 98: warning: don't use underscores in Go names; var nonce_a should be nonceA (golint)
    • Line 236: warning: exported function HmacSHA256 should have comment or be unexported (golint)
    • bitshares-go/encoding/transaction/encoder.go
    • Line 13: warning: exported type Encoder should have comment or be unexported (golint)
    • Line 17: warning: exported function NewEncoder should have comment or be unexported (golint)
    • Line 21: warning: exported method Encoder.EncodeVarint should have comment or be unexported (golint)
    • Line 31: warning: exported method Encoder.EncodeUVarint should have comment or be unexported (golint)
    • Line 37: warning: exported method Encoder.EncodeLittleEndianUInt64 should have comment or be unexported (golint)
    • Line 44: warning: exported method Encoder.EncodeLittleEndianUInt32 should have comment or be unexported (golint)
    • Line 51: warning: exported method Encoder.EncodeNumber should have comment or be unexported (golint)
    • Line 58: warning: exported method Encoder.EncodeBool should have comment or be unexported (golint)
    • Line 61: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 66: warning: exported method Encoder.Encode should have comment or be unexported (golint)
    • Line 102: warning: exported method Encoder.EncodeMoney should have comment or be unexported (golint)
    • Line 139: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • bitshares-go/apis/login/api.go
    • Line 5: warning: exported const APIID should have comment or be unexported (golint)
    • Line 7: warning: exported type API should have comment or be unexported (golint)
    • Line 11: warning: exported function NewAPI should have comment or be unexported (golint)
    • Line 19: warning: exported method API.GetApiByName should have comment or be unexported (golint)
    • Line 25: warning: exported method API.Login should have comment or be unexported (golint)
    • Line 31: warning: exported method API.Database should have comment or be unexported (golint)
    • Line 37: warning: exported method API.History should have comment or be unexported (golint)
    • Line 43: warning: exported method API.NetworkBroadcast should have comment or be unexported (golint)
    • bitshares-go/transport/protocol.go
    • Line 9: warning: exported var ErrShutdown should have comment or be unexported (golint)
    • Line 12: warning: exported type RPCRequest should have comment or be unexported (golint)
    • Line 18: warning: exported type RPCResponse should have comment or be unexported (golint)
    • Line 24: warning: exported type RPCError should have comment or be unexported (golint)
    • Line 47: warning: exported type RPCIncoming should have comment or be unexported (golint)
    • bitshares-go/client.go
    • Line 19: warning: exported type Client should have comment or be unexported (golint)
    • Line 106: warning: exported method Client.LimitOrderCreate should have comment or be unexported (golint)
    • Line 143: warning: don't use underscores in Go names; var create_op should be createOp (golint)
    • Line 155: warning: exported method Client.LimitOrderCancel should have comment or be unexported (golint)
    • bitshares-go/apis/database/api.go
    • Line 9: warning: exported type API should have comment or be unexported (golint)
    • Line 14: warning: exported function NewAPI should have comment or be unexported (golint)
    • Line 26: warning: exported method API.GetChainID should have comment or be unexported (golint)
    • Line 46: warning: comment on exported method API.GetRecentTransactionByID should be of the form "GetRecentTransactionByID ..." (golint)
    • Line 94: warning: comment on exported method API.GetObjects should be of the form "GetObjects ..." (golint)
    • Line 108: warning: comment on exported method API.GetAccountBalances should be of the form "GetAccountBalances ..." (golint)
    • Line 124: warning: comment on exported method API.GetNamedAccountBalances should be of the form "GetNamedAccountBalances ..." (golint)
    • bitshares-go/types/optype.go
    • Line 3: warning: exported type OpType should have comment or be unexported (golint)
    • Line 6: warning: exported const TransferOpType should have comment (or a comment on this block) or be unexported (golint)
    • bitshares-go/types/price.go
    • Line 9: warning: exported type Price should have comment or be unexported (golint)
    • Line 14: warning: exported type AssetAmount should have comment or be unexported (golint)
    • Line 19: warning: exported method AssetAmount.MarshalTransaction should have comment or be unexported (golint)
    • Line 26: warning: comment on exported method AssetAmount.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • bitshares-go/caller/caller.go
    • Line 8: warning: exported var EmptyParams should have comment or be unexported (golint)
    • Line 10: warning: exported type APIID should have comment or be unexported (golint)
    • Line 12: warning: exported type Caller should have comment or be unexported (golint)
    • Line 17: warning: exported type CallCloser should have comment or be unexported (golint)
    • bitshares-go/sign/signed_transaction.go
    • Line 16: warning: exported type SignedTransaction should have comment or be unexported (golint)
    • Line 20: warning: exported function NewSignedTransaction should have comment or be unexported (golint)
    • Line 24: warning: exported method SignedTransaction.Serialize should have comment or be unexported (golint)
    • Line 34: warning: exported method SignedTransaction.Digest should have comment or be unexported (golint)
    • Line 66: warning: exported method SignedTransaction.Sign should have comment or be unexported (golint)
    • bitshares-go/types/objectid.go
    • Line 12: warning: comment on exported type ObjectID should be of the form "ObjectID ..." (with optional leading article) (golint)
    • Line 24: warning: exported method ObjectID.MarshalJSON should have comment or be unexported (golint)
    • Line 28: warning: exported method ObjectID.UnmarshalJSON should have comment or be unexported (golint)
    • Line 43: warning: exported method ObjectID.MarshalTransaction should have comment or be unexported (golint)
    • Line 48: warning: exported function MustParseObjectID should have comment or be unexported (golint)
    • Line 56: warning: exported function ParseObjectID should have comment or be unexported (golint)
    • bitshares-go/types/operations.go
    • Line 10: warning: exported type Operation should have comment or be unexported (golint)
    • Line 14: warning: exported type Operations should have comment or be unexported (golint)
    • Line 16: warning: exported method Operations.UnmarshalJSON should have comment or be unexported (golint)
    • Line 62: warning: exported method Operations.MarshalJSON should have comment or be unexported (golint)
    • Line 82: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 97: warning: comment on exported type UnknownOperation should be of the form "UnknownOperation ..." (with optional leading article) (golint)
    • Line 103: warning: exported method UnknownOperation.Type should have comment or be unexported (golint)
    • Line 118: warning: comment on exported type TransferOperation should be of the form "TransferOperation ..." (with optional leading article) (golint)
    • Line 128: warning: exported type Memo should have comment or be unexported (golint)
    • Line 135: warning: exported method TransferOperation.Type should have comment or be unexported (golint)
    • Line 137: warning: exported method TransferOperation.MarshalTransaction should have comment or be unexported (golint)
    • Line 152: warning: comment on exported type LimitOrderCreateOperation should be of the form "LimitOrderCreateOperation ..." (with optional leading article) (golint)
    • Line 163: warning: exported method LimitOrderCreateOperation.MarshalTransaction should have comment or be unexported (golint)
    • Line 179: warning: exported method LimitOrderCreateOperation.Type should have comment or be unexported (golint)
    • Line 181: warning: comment on exported type LimitOrderCancelOperation should be of the form "LimitOrderCancelOperation ..." (with optional leading article) (golint)
    • Line 189: warning: exported method LimitOrderCancelOperation.MarshalTransaction should have comment or be unexported (golint)
    • Line 202: warning: exported method LimitOrderCancelOperation.Type should have comment or be unexported (golint)
    • Line 204: warning: comment on exported type FillOrderOperation should be of the form "FillOrderOperation ..." (with optional leading article) (golint)
    • Line 215: warning: exported method FillOrderOperation.Type should have comment or be unexported (golint)
    • bitshares-go/apis/networkbroadcast/api.go
    • Line 8: warning: exported type API should have comment or be unexported (golint)
    • Line 13: warning: exported function NewAPI should have comment or be unexported (golint)
    • Line 26: warning: exported method API.BroadcastTransactionSynchronous should have comment or be unexported (golint)
    • bitshares-go/apis/history/data.go
    • Line 8: warning: exported type Bucket should have comment or be unexported (golint)
    • Line 23: warning: exported type BucketKey should have comment or be unexported (golint)
    • Line 30: warning: exported type OrderHistory should have comment or be unexported (golint)
    • Line 37: warning: exported type OrderKey should have comment or be unexported (golint)
    • Line 43: warning: exported type OrderOperation should have comment or be unexported (golint)
    • Line 53: warning: exported type OperationHistory should have comment or be unexported (golint)
    • bitshares-go/sign/sign.go
    • Line 16: warning: exported function SignBufferSha256 should have comment or be unexported (golint)
    • Line 17: warning: don't use underscores in Go names; var buf_sha256_clone should be bufSha256Clone (golint)
    • Line 42: warning: don't use underscores in Go names; var max_counter should be maxCounter (golint)
    • bitshares-go/encoding/transaction/encoder_rolling.go
    • Line 3: warning: exported type RollingEncoder should have comment or be unexported (golint)
    • Line 8: warning: exported function NewRollingEncoder should have comment or be unexported (golint)
    • Line 12: warning: exported method RollingEncoder.EncodeVarint should have comment or be unexported (golint)
    • Line 18: warning: exported method RollingEncoder.EncodeUVarint should have comment or be unexported (golint)
    • Line 24: warning: exported method RollingEncoder.EncodeNumber should have comment or be unexported (golint)
    • Line 30: warning: exported method RollingEncoder.EncodeBool should have comment or be unexported (golint)
    • Line 36: warning: exported method RollingEncoder.Encode should have comment or be unexported (golint)
    • Line 42: warning: exported method RollingEncoder.EncodeMoney should have comment or be unexported (golint)
    • Line 48: warning: exported method RollingEncoder.EncodeLittleEndianUInt64 should have comment or be unexported (golint)
    • Line 54: warning: exported method RollingEncoder.EncodeLittleEndianUInt32 should have comment or be unexported (golint)
    • Line 60: warning: exported method RollingEncoder.Err should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!