Preparing report...

Report for github.com/EXCCoin/exccdata

A+    Excellent!    Found 46 issues across 107 files

Tweet

gofmt99%

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


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!


gocyclo73%

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.

    • exccdata/db/exccpg/upgrades.go
    • Line 277: warning: cyclomatic complexity 49 of function (*ChainDB).handleUpgrades() is high (> 15) (gocyclo)
    • Line 83: warning: cyclomatic complexity 39 of function (*ChainDB).CheckForAuxDBUpgrade() is high (> 15) (gocyclo)
    • Line 577: warning: cyclomatic complexity 16 of function (*ChainDB).handleTxTypeHistogramUpgrade() is high (> 15) (gocyclo)
    • exccdata/explorer/mempool.go
    • Line 21: warning: cyclomatic complexity 21 of function (*explorerUI).mempoolMonitor() is high (> 15) (gocyclo)
    • Line 188: warning: cyclomatic complexity 16 of function (*explorerUI).storeMempoolInfo() is high (> 15) (gocyclo)
    • exccdata/api/insight/apiroutes.go
    • Line 843: warning: cyclomatic complexity 31 of function (*insightApiContext).getAddressInfo() is high (> 15) (gocyclo)
    • Line 387: warning: cyclomatic complexity 24 of function (*insightApiContext).getTransactions() is high (> 15) (gocyclo)
    • Line 516: warning: cyclomatic complexity 23 of function (*insightApiContext).getAddressesTxn() is high (> 15) (gocyclo)
    • Line 294: warning: cyclomatic complexity 19 of function (*insightApiContext).getAddressesTxnOutput() is high (> 15) (gocyclo)
    • exccdata/db/exccpg/pgblockchain.go
    • Line 1566: warning: cyclomatic complexity 44 of function (*ChainDB).storeTxns() is high (> 15) (gocyclo)
    • Line 992: warning: cyclomatic complexity 21 of function (*ChainDB).DeindexAll() is high (> 15) (gocyclo)
    • Line 1379: warning: cyclomatic complexity 20 of function (*ChainDB).StoreBlock() is high (> 15) (gocyclo)
    • Line 1078: warning: cyclomatic complexity 17 of function (*ChainDB).IndexAll() is high (> 15) (gocyclo)

golint77%

Golint is a linter for Go source code.

    • exccdata/db/exccpg/internal/blockstmts.go
    • Line 42: warning: exported const UpdateLastBlockValid should have comment (or a comment on this block) or be unexported (golint)
    • Line 109: warning: comment on exported const CreateBlockPrevNextTable should be of the form "CreateBlockPrevNextTable ..." (golint)
    • Line 117: warning: comment on exported const InsertBlockPrevNext should be of the form "InsertBlockPrevNext ..." (golint)
    • Line 129: warning: exported function MakeBlockInsertStatement should have comment or be unexported (golint)
    • exccdata/db/exccpg/internal/stakestmts.go
    • Line 6: warning: exported const CreateTicketsTable should have comment (or a comment on this block) or be unexported (golint)
    • Line 68: warning: comment on exported const SetTicketSpendingInfoForHash should be of the form "SetTicketSpendingInfoForHash ..." (golint)
    • Line 93: warning: comment on exported const IndexTicketsTableOnHashes should be of the form "IndexTicketsTableOnHashes ..." (golint)
    • Line 171: warning: comment on exported const IndexVotesTableOnHashes should be of the form "IndexVotesTableOnHashes ..." (golint)
    • Line 228: warning: comment on exported const IndexMissesTableOnHashes should be of the form "IndexMissesTableOnHashes ..." (golint)
    • Line 242: warning: comment on exported const CreateAgendasTable should be of the form "CreateAgendasTable ..." (golint)
    • Line 297: warning: exported function MakeTicketInsertStatement should have comment or be unexported (golint)
    • Line 304: warning: exported function MakeVoteInsertStatement should have comment or be unexported (golint)
    • Line 311: warning: exported function MakeMissInsertStatement should have comment or be unexported (golint)
    • Line 318: warning: exported function MakeAgendaInsertStatement should have comment or be unexported (golint)
    • exccdata/db/exccpg/queries.go
    • Line 38: warning: exported function ExistsIndex should have comment or be unexported (golint)
    • Line 46: warning: exported function IsUniqueIndex should have comment or be unexported (golint)
    • Line 51: warning: exported function RetrievePkScriptByID should have comment or be unexported (golint)
    • Line 56: warning: exported function RetrieveVoutIDByOutpoint should have comment or be unexported (golint)
    • Line 61: warning: exported function RetrieveMissedVotesInBlock should have comment or be unexported (golint)
    • Line 81: warning: exported function RetrieveAllRevokesDbIDHashHeight should have comment or be unexported (golint)
    • Line 107: warning: exported function RetrieveAllVotesDbIDsHeightsTicketDbIDs should have comment or be unexported (golint)
    • Line 130: warning: exported function RetrieveUnspentTickets should have comment or be unexported (golint)
    • Line 152: warning: exported function RetrieveTicketIDHeightByHash should have comment or be unexported (golint)
    • Line 157: warning: exported function RetrieveTicketIDByHash should have comment or be unexported (golint)
    • Line 162: warning: exported function RetrieveTicketStatusByHash should have comment or be unexported (golint)
    • Line 162: warning: don't use underscores in Go names; func result spend_status should be spendStatus (golint)
    • Line 163: warning: don't use underscores in Go names; func result pool_status should be poolStatus (golint)
    • Line 168: warning: exported function RetrieveTicketIDsByHashes should have comment or be unexported (golint)
    • Line 202: warning: exported function SetPoolStatusForTickets should have comment or be unexported (golint)
    • Line 241: warning: exported function SetPoolStatusForTicketsByHash should have comment or be unexported (golint)
    • Line 281: warning: exported function SetSpendingForTickets should have comment or be unexported (golint)
    • Line 409: warning: exported function SetSpendingForVinDbID should have comment or be unexported (golint)
    • Line 698: warning: exported function RetrieveAddressRecvCount should have comment or be unexported (golint)
    • Line 703: warning: exported function RetrieveAddressUnspent should have comment or be unexported (golint)
    • Line 709: warning: exported function RetrieveAddressSpent should have comment or be unexported (golint)
    • Line 715: warning: exported function RetrieveAddressSpentUnspent should have comment or be unexported (golint)
    • Line 768: warning: exported function RetrieveAllAddressTxns should have comment or be unexported (golint)
    • Line 779: warning: exported function RetrieveAddressTxns should have comment or be unexported (golint)
    • Line 784: warning: exported function RetrieveAddressTxnsAlt should have comment or be unexported (golint)
    • Line 789: warning: exported function RetrieveAddressDebitTxns should have comment or be unexported (golint)
    • Line 794: warning: exported function RetrieveAddressCreditTxns should have comment or be unexported (golint)
    • Line 799: warning: exported function RetrieveAddressMergedDebitTxns should have comment or be unexported (golint)
    • Line 896: warning: exported function RetrieveAllVinDbIDs should have comment or be unexported (golint)
    • Line 917: warning: exported function RetrieveSpendingTxByVinID should have comment or be unexported (golint)
    • Line 923: warning: exported function RetrieveFundingOutpointByTxIn should have comment or be unexported (golint)
    • Line 930: warning: exported function RetrieveFundingOutpointByVinID should have comment or be unexported (golint)
    • Line 936: warning: exported function RetrieveVinByID should have comment or be unexported (golint)
    • Line 947: warning: exported function RetrieveFundingTxByTxIn should have comment or be unexported (golint)
    • Line 953: warning: exported function RetrieveFundingTxByVinDbID should have comment or be unexported (golint)
    • Line 958: warning: exported function RetrieveFundingTxsByTx should have comment or be unexported (golint)
    • Line 983: warning: exported function RetrieveSpendingTxByTxOut should have comment or be unexported (golint)
    • Line 990: warning: exported function RetrieveSpendingTxsByFundingTx should have comment or be unexported (golint)
    • Line 1074: warning: exported function RetrieveDbTxByHash should have comment or be unexported (golint)
    • Line 1087: warning: exported function RetrieveFullTxByHash should have comment or be unexported (golint)
    • Line 1160: warning: exported function RetrieveTxByHash should have comment or be unexported (golint)
    • Line 1166: warning: exported function RetrieveTxBlockTimeByHash should have comment or be unexported (golint)
    • Line 1171: warning: exported function RetrieveTxIDHeightByHash should have comment or be unexported (golint)
    • Line 1176: warning: exported function RetrieveRegularTxByHash should have comment or be unexported (golint)
    • Line 1181: warning: exported function RetrieveStakeTxByHash should have comment or be unexported (golint)
    • Line 1186: warning: exported function RetrieveTxsByBlockHash should have comment or be unexported (golint)
    • Line 1267: warning: exported function RetrieveAddressTxnOutputWithTransaction should have comment or be unexported (golint)
    • Line 1309: warning: don't use underscores in Go names; var tx_hash should be txHash (golint)
    • Line 1370: warning: exported function RetrieveBlockSummaryByTimeRange should have comment or be unexported (golint)
    • Line 1411: warning: exported function InsertBlock should have comment or be unexported (golint)
    • Line 1594: warning: exported function RetrieveBestBlockHeight should have comment or be unexported (golint)
    • Line 1599: warning: exported function RetrieveBestBlockHeightAny should have comment or be unexported (golint)
    • Line 1604: warning: exported function RetrieveVoutValue should have comment or be unexported (golint)
    • Line 1757: warning: exported function RetrievePreviousHashByBlockHash should have comment or be unexported (golint)
    • Line 1757: warning: don't use underscores in Go names; func result previous_hash should be previousHash (golint)
    • Line 1762: warning: exported function SetMainchainByBlockHash should have comment or be unexported (golint)
    • Line 1762: warning: don't use underscores in Go names; func result previous_hash should be previousHash (golint)
    • Line 1909: warning: exported function RetrieveVoutValues should have comment or be unexported (golint)
    • Line 1935: warning: exported function InsertBlockPrevNext should have comment or be unexported (golint)
    • Line 1944: warning: exported function UpdateBlockNext should have comment or be unexported (golint)
    • Line 1959: warning: exported function UpdateBlockNextByHash should have comment or be unexported (golint)
    • Line 1974: warning: exported function InsertVin should have comment or be unexported (golint)
    • Line 1983: warning: exported function InsertVins should have comment or be unexported (golint)
    • Line 2020: warning: exported function InsertVout should have comment or be unexported (golint)
    • Line 2032: warning: exported function InsertVouts should have comment or be unexported (golint)
    • Line 2415: warning: exported function InsertTx should have comment or be unexported (golint)
    • Line 2428: warning: exported function InsertTxns should have comment or be unexported (golint)
    • exccdata/api/types/insightapitypes.go
    • Line 55: warning: exported type InsightMultiAddrsTxOutput should have comment or be unexported (golint)
    • Line 99: warning: exported type InsightTx should have comment or be unexported (golint)
    • Line 117: warning: exported type InsightVin should have comment or be unexported (golint)
    • Line 129: warning: exported type InsightScriptSig should have comment or be unexported (golint)
    • Line 134: warning: exported type InsightVout should have comment or be unexported (golint)
    • Line 143: warning: exported type InsightScriptPubKey should have comment or be unexported (golint)
    • exccdata/db/exccsqlite/sqlite.go
    • Line 623: warning: exported method DB.RetrieveBlockSummaryByTimeRange should have comment or be unexported (golint)
    • Line 913: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • exccdata/db/exccpg/tables.go
    • Line 103: warning: exported function TableExists should have comment or be unexported (golint)
    • Line 117: warning: exported function DropTables should have comment or be unexported (golint)
    • Line 136: warning: exported function CreateTypes should have comment or be unexported (golint)
    • Line 163: warning: exported function TypeExists should have comment or be unexported (golint)
    • Line 177: warning: exported function CreateTables should have comment or be unexported (golint)
    • Line 245: warning: exported function TableUpgradesRequired should have comment or be unexported (golint)
    • Line 278: warning: exported function TableVersions should have comment or be unexported (golint)
    • Line 318: warning: exported function IndexVinTableOnVins should have comment or be unexported (golint)
    • Line 323: warning: exported function IndexVinTableOnPrevOuts should have comment or be unexported (golint)
    • Line 328: warning: exported function DeindexVinTableOnVins should have comment or be unexported (golint)
    • Line 333: warning: exported function DeindexVinTableOnPrevOuts should have comment or be unexported (golint)
    • Line 340: warning: exported function IndexTransactionTableOnHashes should have comment or be unexported (golint)
    • Line 345: warning: exported function DeindexTransactionTableOnHashes should have comment or be unexported (golint)
    • Line 350: warning: exported function IndexTransactionTableOnBlockIn should have comment or be unexported (golint)
    • Line 355: warning: exported function DeindexTransactionTableOnBlockIn should have comment or be unexported (golint)
    • Line 362: warning: exported function IndexBlockTableOnHash should have comment or be unexported (golint)
    • Line 367: warning: exported function IndexBlockTableOnHeight should have comment or be unexported (golint)
    • Line 372: warning: exported function DeindexBlockTableOnHash should have comment or be unexported (golint)
    • Line 377: warning: exported function DeindexBlockTableOnHeight should have comment or be unexported (golint)
    • Line 384: warning: exported function IndexVoutTableOnTxHashIdx should have comment or be unexported (golint)
    • Line 389: warning: exported function DeindexVoutTableOnTxHashIdx should have comment or be unexported (golint)
    • Line 394: warning: comment on exported function IndexBlockTimeOnTableAddress should be of the form "IndexBlockTimeOnTableAddress ..." (golint)
    • Line 400: warning: exported function DeindexBlockTimeOnTableAddress should have comment or be unexported (golint)
    • Line 405: warning: exported function IndexMatchingTxHashOnTableAddress should have comment or be unexported (golint)
    • Line 410: warning: exported function DeindexMatchingTxHashOnTableAddress should have comment or be unexported (golint)
    • Line 415: warning: exported function IndexAddressTableOnAddress should have comment or be unexported (golint)
    • Line 420: warning: exported function DeindexAddressTableOnAddress should have comment or be unexported (golint)
    • Line 425: warning: exported function IndexAddressTableOnVoutID should have comment or be unexported (golint)
    • Line 430: warning: exported function DeindexAddressTableOnVoutID should have comment or be unexported (golint)
    • Line 435: warning: exported function IndexAddressTableOnTxHash should have comment or be unexported (golint)
    • Line 440: warning: exported function DeindexAddressTableOnTxHash should have comment or be unexported (golint)
    • Line 447: warning: exported function IndexVotesTableOnHashes should have comment or be unexported (golint)
    • Line 452: warning: exported function DeindexVotesTableOnHash should have comment or be unexported (golint)
    • Line 457: warning: exported function IndexVotesTableOnBlockHash should have comment or be unexported (golint)
    • Line 462: warning: exported function DeindexVotesTableOnBlockHash should have comment or be unexported (golint)
    • Line 467: warning: exported function IndexVotesTableOnCandidate should have comment or be unexported (golint)
    • Line 472: warning: exported function DeindexVotesTableOnCandidate should have comment or be unexported (golint)
    • Line 477: warning: exported function IndexVotesTableOnVoteVersion should have comment or be unexported (golint)
    • Line 482: warning: exported function DeindexVotesTableOnVoteVersion should have comment or be unexported (golint)
    • Line 489: warning: exported function IndexTicketsTableOnHashes should have comment or be unexported (golint)
    • Line 494: warning: exported function DeindexTicketsTableOnHash should have comment or be unexported (golint)
    • Line 499: warning: exported function IndexTicketsTableOnTxDbID should have comment or be unexported (golint)
    • Line 504: warning: exported function DeindexTicketsTableOnTxDbID should have comment or be unexported (golint)
    • Line 511: warning: exported function IndexMissesTableOnHashes should have comment or be unexported (golint)
    • Line 516: warning: exported function DeindexMissesTableOnHash should have comment or be unexported (golint)
    • Line 523: warning: exported function IndexAgendasTableOnBlockTime should have comment or be unexported (golint)
    • Line 528: warning: exported function DeindexAgendasTableOnBlockTime should have comment or be unexported (golint)
    • Line 533: warning: exported function IndexAgendasTableOnAgendaID should have comment or be unexported (golint)
    • Line 538: warning: exported function DeindexAgendasTableOnAgendaID should have comment or be unexported (golint)
    • exccdata/db/exccpg/pgblockchain.go
    • Line 752: warning: comment on exported method ChainDB.AddressTransactionRawDetails should be of the form "AddressTransactionRawDetails ..." (golint)
    • Line 882: warning: exported method ChainDB.DeleteDuplicates should have comment or be unexported (golint)
    • Line 914: warning: exported method ChainDB.DeleteDuplicatesRecovery should have comment or be unexported (golint)
    • Line 967: warning: exported method ChainDB.DeleteDuplicateVins should have comment or be unexported (golint)
    • Line 971: warning: exported method ChainDB.DeleteDuplicateVouts should have comment or be unexported (golint)
    • Line 975: warning: exported method ChainDB.DeleteDuplicateTxns should have comment or be unexported (golint)
    • Line 979: warning: exported method ChainDB.DeleteDuplicateTickets should have comment or be unexported (golint)
    • Line 983: warning: exported method ChainDB.DeleteDuplicateVotes should have comment or be unexported (golint)
    • Line 987: warning: exported method ChainDB.DeleteDuplicateMisses should have comment or be unexported (golint)
    • Line 1228: warning: exported method ChainDB.ExistsIndexVinOnVins should have comment or be unexported (golint)
    • Line 1232: warning: exported method ChainDB.ExistsIndexVoutOnTxHashIdx should have comment or be unexported (golint)
    • Line 1236: warning: exported method ChainDB.ExistsIndexAddressesVoutIDAddress should have comment or be unexported (golint)
    • Line 1240: warning: exported method ChainDB.SetVinsMainchainByBlock should have comment or be unexported (golint)
    • Line 1290: warning: exported method ChainDB.TipToSideChain should have comment or be unexported (golint)
    • exccdata/explorer/explorertypes.go
    • Line 25: warning: exported const ErrorStatusType should have comment (or a comment on this block) or be unexported (golint)
    • Line 120: warning: exported method TxInfo.IsTicket should have comment or be unexported (golint)
    • Line 124: warning: exported method TxInfo.IsVote should have comment or be unexported (golint)
    • exccdata/db/exccpg/internal/addrstmts.go
    • Line 8: warning: exported const InsertAddressRow should have comment (or a comment on this block) or be unexported (golint)
    • Line 128: warning: comment on exported const SelectAddressTxTypesByAddress should be of the form "SelectAddressTxTypesByAddress ..." (golint)
    • Line 230: warning: exported function MakeAddressRowInsertStatement should have comment or be unexported (golint)
    • exccdata/db/exccpg/internal/txstmts.go
    • Line 39: warning: exported const CreateTransactionTable should have comment (or a comment on this block) or be unexported (golint)
    • Line 171: warning: exported var SelectAllRevokes should have comment or be unexported (golint)
    • Line 201: warning: exported function MakeTxInsertStatement should have comment or be unexported (golint)
    • exccdata/db/exccpg/internal/vinoutstmts.go
    • Line 14: warning: exported const CreateVinTable should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: comment on exported const UpsertVinRow should be of the form "UpsertVinRow ..." (golint)
    • Line 178: warning: exported function MakeVinInsertStatement should have comment or be unexported (golint)
    • Line 193: warning: exported function MakeVoutCopyInStatement should have comment or be unexported (golint)
    • Line 197: warning: exported function MakeVinCopyInStatement should have comment or be unexported (golint)
    • Line 201: warning: exported function MakeVoutInsertStatement should have comment or be unexported (golint)
    • exccdata/middleware/apimiddleware.go
    • Line 30: warning: exported const CtxAddress should have comment (or a comment on this block) or be unexported (golint)
    • Line 52: warning: exported type DataSource should have comment or be unexported (golint)
    • Line 58: warning: exported type StakeVersionsLatest should have comment or be unexported (golint)
    • Line 71: warning: comment on exported function GetBlockIndex0Ctx should be of the form "GetBlockIndex0Ctx ..." (golint)
    • Line 246: warning: comment on exported function GetOffsetCtx should be of the form "GetOffsetCtx ..." (golint)
    • exccdata/db/dbtypes/types.go
    • Line 18: warning: exported type TicketSpendType should have comment or be unexported (golint)
    • Line 21: warning: exported const TicketUnspent should have comment (or a comment on this block) or be unexported (golint)
    • Line 44: warning: exported const AddrTxnAll should have comment (or a comment on this block) or be unexported (golint)
    • Line 86: warning: exported const AllChartGrouping should have comment (or a comment on this block) or be unexported (golint)
    • Line 130: warning: exported const TxsType should have comment (or a comment on this block) or be unexported (golint)
    • Line 136: warning: exported type TicketPoolStatus should have comment or be unexported (golint)
    • Line 139: warning: exported const PoolStatusLive should have comment (or a comment on this block) or be unexported (golint)
    • Line 150: warning: exported const Yes should have comment (or a comment on this block) or be unexported (golint)
    • Line 519: warning: exported type BlockDataBasic should have comment or be unexported (golint)
    • exccdata/testutil/tempfiles.go
    • Line 1: warning: package comment should be of the form "Package testutil ..." (golint)
    • Line 10: warning: exported const DefaultDataDirname should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: comment on exported function ResetTempFolder should be of the form "ResetTempFolder ..." (golint)
    • exccdata/testutil/testutil.go
    • Line 18: warning: package comment is detached; there should be no blank lines between it and the package statement (golint)
    • Line 28: warning: exported function CurrentTestSetup should have comment or be unexported (golint)
    • Line 37: warning: comment on exported var UseSpewToPrettyPrintArrays should be of the form "UseSpewToPrettyPrintArrays ..." (golint)
    • Line 41: warning: comment on exported var PanicOnTestSetupFailure should be of the form "PanicOnTestSetupFailure ..." (golint)
    • Line 44: warning: comment on exported var PanicOnTestFailure should be of the form "PanicOnTestFailure ..." (golint)
    • exccdata/explorer/explorer.go
    • Line 6: warning: package comment should be of the form "Package explorer ..." (golint)
    • Line 37: warning: exported const MaxAddressRows should have comment (or a comment on this block) 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!


misspell96%

Misspell Finds commonly misspelled English words