Preparing report...

Report for github.com/vulcanize/ipld-eth-server

A+    Excellent!    Found 26 issues across 54 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!


gocyclo90%

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.

    • ipld-eth-server/pkg/eth/cid_retriever.go
    • Line 69: warning: cyclomatic complexity 22 of function (*CIDRetriever).Retrieve() is high (> 15) (gocyclo)
    • Line 295: warning: cyclomatic complexity 20 of function (*CIDRetriever).RetrieveRctCIDs() is high (> 15) (gocyclo)
    • Line 215: warning: cyclomatic complexity 18 of function (*CIDRetriever).RetrieveRctCIDsByHeaderID() is high (> 15) (gocyclo)
    • ipld-eth-server/pkg/eth/backend.go
    • Line 235: warning: cyclomatic complexity 23 of function (*Backend).BlockByNumber() is high (> 15) (gocyclo)
    • Line 346: warning: cyclomatic complexity 16 of function (*Backend).BlockByHash() is high (> 15) (gocyclo)

golint61%

Golint is a linter for Go source code.

    • ipld-eth-server/pkg/graphql/graphql.go
    • Line 53: warning: exported method Account.Address should have comment or be unexported (golint)
    • Line 57: warning: exported method Account.Balance should have comment or be unexported (golint)
    • Line 65: warning: exported method Account.TransactionCount should have comment or be unexported (golint)
    • Line 73: warning: exported method Account.Code should have comment or be unexported (golint)
    • Line 81: warning: exported method Account.Storage should have comment or be unexported (golint)
    • Line 96: warning: exported method Log.Transaction should have comment or be unexported (golint)
    • Line 100: warning: exported method Log.Account should have comment or be unexported (golint)
    • Line 108: warning: exported method Log.Index should have comment or be unexported (golint)
    • Line 112: warning: exported method Log.Topics should have comment or be unexported (golint)
    • Line 116: warning: exported method Log.Data should have comment or be unexported (golint)
    • Line 147: warning: exported method Transaction.Hash should have comment or be unexported (golint)
    • Line 151: warning: exported method Transaction.InputData should have comment or be unexported (golint)
    • Line 159: warning: exported method Transaction.Gas should have comment or be unexported (golint)
    • Line 167: warning: exported method Transaction.GasPrice should have comment or be unexported (golint)
    • Line 175: warning: exported method Transaction.Value should have comment or be unexported (golint)
    • Line 183: warning: exported method Transaction.Nonce should have comment or be unexported (golint)
    • Line 191: warning: exported method Transaction.To should have comment or be unexported (golint)
    • Line 207: warning: exported method Transaction.From should have comment or be unexported (golint)
    • Line 225: warning: exported method Transaction.Block should have comment or be unexported (golint)
    • Line 232: warning: exported method Transaction.Index should have comment or be unexported (golint)
    • Line 258: warning: exported method Transaction.Status should have comment or be unexported (golint)
    • Line 267: warning: exported method Transaction.GasUsed should have comment or be unexported (golint)
    • Line 276: warning: exported method Transaction.CumulativeGasUsed should have comment or be unexported (golint)
    • Line 285: warning: exported method Transaction.CreatedContract should have comment or be unexported (golint)
    • Line 297: warning: exported method Transaction.Logs should have comment or be unexported (golint)
    • Line 313: warning: exported method Transaction.R should have comment or be unexported (golint)
    • Line 322: warning: exported method Transaction.S should have comment or be unexported (golint)
    • Line 331: warning: exported method Transaction.V should have comment or be unexported (golint)
    • Line 340: warning: exported type BlockType should have comment or be unexported (golint)
    • Line 414: warning: exported method Block.Number should have comment or be unexported (golint)
    • Line 423: warning: exported method Block.Hash should have comment or be unexported (golint)
    • Line 434: warning: exported method Block.GasLimit should have comment or be unexported (golint)
    • Line 442: warning: exported method Block.GasUsed should have comment or be unexported (golint)
    • Line 450: warning: exported method Block.Parent should have comment or be unexported (golint)
    • Line 468: warning: exported method Block.Difficulty should have comment or be unexported (golint)
    • Line 476: warning: exported method Block.Timestamp should have comment or be unexported (golint)
    • Line 484: warning: exported method Block.Nonce should have comment or be unexported (golint)
    • Line 492: warning: exported method Block.MixHash should have comment or be unexported (golint)
    • Line 500: warning: exported method Block.TransactionsRoot should have comment or be unexported (golint)
    • Line 508: warning: exported method Block.StateRoot should have comment or be unexported (golint)
    • Line 516: warning: exported method Block.ReceiptsRoot should have comment or be unexported (golint)
    • Line 524: warning: exported method Block.OmmerHash should have comment or be unexported (golint)
    • Line 532: warning: exported method Block.OmmerCount should have comment or be unexported (golint)
    • Line 541: warning: exported method Block.Ommers should have comment or be unexported (golint)
    • Line 558: warning: exported method Block.ExtraData should have comment or be unexported (golint)
    • Line 566: warning: exported method Block.LogsBloom should have comment or be unexported (golint)
    • Line 574: warning: exported method Block.TotalDifficulty should have comment or be unexported (golint)
    • Line 614: warning: exported method Block.Miner should have comment or be unexported (golint)
    • Line 626: warning: exported method Block.TransactionCount should have comment or be unexported (golint)
    • Line 635: warning: exported method Block.Transactions should have comment or be unexported (golint)
    • Line 653: warning: exported method Block.TransactionAt should have comment or be unexported (golint)
    • Line 672: warning: exported method Block.OmmerAt should have comment or be unexported (golint)
    • Line 727: warning: exported method Block.Logs should have comment or be unexported (golint)
    • Line 751: warning: exported method Block.Account should have comment or be unexported (golint)
    • Line 785: warning: exported method CallResult.Data should have comment or be unexported (golint)
    • Line 789: warning: exported method CallResult.GasUsed should have comment or be unexported (golint)
    • Line 793: warning: exported method CallResult.Status should have comment or be unexported (golint)
    • Line 797: warning: exported method Block.Call should have comment or be unexported (golint)
    • Line 823: warning: exported method Resolver.Block should have comment or be unexported (golint)
    • Line 860: warning: exported method Resolver.Blocks should have comment or be unexported (golint)
    • Line 886: warning: exported method Resolver.Transaction should have comment or be unexported (golint)
    • Line 921: warning: exported method Resolver.Logs should have comment or be unexported (golint)
    • ipld-eth-server/pkg/eth/ipld_retriever.go
    • Line 31: warning: exported const RetrieveHeadersByHashesPgStr should have comment (or a comment on this block) or be unexported (golint)
    • Line 167: warning: exported type IPLDRetriever should have comment or be unexported (golint)
    • Line 171: warning: exported function NewIPLDRetriever should have comment or be unexported (golint)
    • ipld-eth-server/pkg/serve/subscription.go
    • Line 25: warning: exported type Flag should have comment or be unexported (golint)
    • Line 28: warning: exported const EmptyFlag should have comment (or a comment on this block) or be unexported (golint)
    • Line 55: warning: exported method SubscriptionPayload.BackFillComplete should have comment or be unexported (golint)
    • ipld-eth-server/pkg/eth/backend.go
    • Line 57: warning: exported const RetrieveCanonicalBlockHashByNumber should have comment (or a comment on this block) or be unexported (golint)
    • Line 82: warning: exported type Backend should have comment or be unexported (golint)
    • Line 98: warning: exported type Config should have comment or be unexported (golint)
    • Line 105: warning: exported function NewEthBackend should have comment or be unexported (golint)
    • Line 679: warning: exported method Backend.SubscribeNewTxsEvent should have comment or be unexported (golint)
    • Line 683: warning: exported method Backend.SubscribeChainEvent should have comment or be unexported (golint)
    • Line 687: warning: exported method Backend.SubscribeRemovedLogsEvent should have comment or be unexported (golint)
    • Line 691: warning: exported method Backend.SubscribeLogsEvent should have comment or be unexported (golint)
    • Line 695: warning: exported method Backend.SubscribePendingLogsEvent should have comment or be unexported (golint)
    • Line 699: warning: exported method Backend.BloomStatus should have comment or be unexported (golint)
    • Line 703: warning: exported method Backend.ServiceFilter should have comment or be unexported (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!


misspell92%

Misspell Finds commonly misspelled English words