Preparing report...

Report for github.com/Fantom-foundation/go-lachesis

(v1.0.0-rc.0)

A+    Excellent!    Found 121 issues across 329 files

Tweet

gofmt96%

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!


golint70%

Golint is a linter for Go source code.

    • cmd/acc-gen/acc.go
    • Line 11: warning: exported function NewAccs should have comment or be unexported (golint)
    • Line 31: warning: exported function MakeAcc should have comment or be unexported (golint)
    • app/store_migration.go
    • Line 27: warning: don't use underscores in Go names; type legacySfcConstants_06 should be legacySfcConstants06 (golint)
    • Line 33: warning: don't use underscores in Go names; type legacySfcConstants_07rc1 should be legacySfcConstants07rc1 (golint)
    • Line 40: warning: exported method Store.MigrateMultiDelegations should have comment or be unexported (golint)
    • Line 128: warning: exported method Store.MigrateEraseGenesisField should have comment or be unexported (golint)
    • Line 135: warning: exported method Store.MigrateAdjustableOfflinePeriod should have comment or be unexported (golint)
    • Line 179: warning: exported method Store.MigrateAdjustableMinGasPrice should have comment or be unexported (golint)
    • lachesis/genesis/sfc/sfccall/sfccalls.go
    • Line 12: warning: exported const ContractABI should have comment or be unexported (golint)
    • Line 20: warning: exported function CalcValidatorRewards should have comment or be unexported (golint)
    • Line 25: warning: exported function CalcDelegationRewards should have comment or be unexported (golint)
    • topicsdb/key.go
    • Line 24: warning: exported function NewID should have comment or be unexported (golint)
    • Line 31: warning: exported method ID.Bytes should have comment or be unexported (golint)
    • Line 35: warning: exported method ID.BlockNumber should have comment or be unexported (golint)
    • Line 39: warning: exported method ID.TxHash should have comment or be unexported (golint)
    • Line 44: warning: exported method ID.Index should have comment or be unexported (golint)
    • gossip/filters/filter_system.go
    • Line 56: warning: comment on exported const LastIndexSubscription should be of the form "LastIndexSubscription ..." (golint)
    • Line 72: warning: exported var ErrInvalidSubscriptionID should have comment or be unexported (golint)
    • kvdb/flushable/synced_pool.go
    • Line 16: warning: exported type SyncedPool should have comment or be unexported (golint)
    • Line 27: warning: exported function NewSyncedPool should have comment or be unexported (golint)
    • Line 72: warning: exported method SyncedPool.GetDb should have comment or be unexported (golint)
    • Line 93: warning: exported method SyncedPool.Flush should have comment or be unexported (golint)
    • lachesis/genesis/account.go
    • Line 18: warning: comment on exported type VAccounts should be of the form "VAccounts ..." (with optional leading article) (golint)
    • Line 121: warning: exported method Accounts.UnmarshalJSON should have comment or be unexported (golint)
    • Line 133: warning: exported method Accounts.Add should have comment or be unexported (golint)
    • inter/ascii_scheme.go
    • Line 12: warning: exported type ForEachEvent should have comment or be unexported (golint)
    • Line 17: warning: comment on exported function ASCIIschemeForEach should be of the form "ASCIIschemeForEach ..." (golint)
    • Line 207: warning: exported function ASCIIschemeToDAG should have comment or be unexported (golint)
    • inter/event.go
    • Line 152: warning: exported method Event.RecoverPubkey should have comment or be unexported (golint)
    • gossip/ordering/event_buffer.go
    • Line 29: warning: exported type EventBuffer should have comment or be unexported (golint)
    • Line 35: warning: exported function New should have comment or be unexported (golint)
    • Line 44: warning: exported method EventBuffer.PushEvent should have comment or be unexported (golint)
    • Line 122: warning: exported method EventBuffer.IsBuffered should have comment or be unexported (golint)
    • Line 126: warning: exported method EventBuffer.Clear should have comment or be unexported (golint)
    • inter/ancestor/parents.go
    • Line 125: warning: exported function NewRandomStrategy should have comment or be unexported (golint)
    • Line 134: warning: exported method RandomStrategy.Init should have comment or be unexported (golint)
    • gossip/txs_list.go
    • Line 13: warning: exported type Txs should have comment or be unexported (golint)
    • Line 18: warning: exported function NewTxs should have comment or be unexported (golint)
    • Line 24: warning: exported method Txs.Start should have comment or be unexported (golint)
    • Line 30: warning: exported method Txs.Finish should have comment or be unexported (golint)
    • lachesis/genesis/sfc/sfcpos/positions.go
    • Line 67: warning: exported function Owner should have comment or be unexported (golint)
    • Line 75: warning: exported function CurrentSealedEpoch should have comment or be unexported (golint)
    • Line 79: warning: exported function StakersLastID should have comment or be unexported (golint)
    • Line 83: warning: exported function StakersNum should have comment or be unexported (golint)
    • Line 87: warning: exported function StakeTotalAmount should have comment or be unexported (golint)
    • Line 91: warning: exported function FirstLockedUpEpoch should have comment or be unexported (golint)
    • Line 97: warning: exported type StakePos should have comment or be unexported (golint)
    • Line 101: warning: exported function Staker should have comment or be unexported (golint)
    • Line 107: warning: exported method StakePos.Status should have comment or be unexported (golint)
    • Line 111: warning: exported method StakePos.CreatedEpoch should have comment or be unexported (golint)
    • Line 115: warning: exported method StakePos.CreatedTime should have comment or be unexported (golint)
    • Line 119: warning: exported method StakePos.DeactivatedEpoch should have comment or be unexported (golint)
    • Line 123: warning: exported method StakePos.DeactivatedTime should have comment or be unexported (golint)
    • Line 127: warning: exported method StakePos.StakeAmount should have comment or be unexported (golint)
    • Line 131: warning: exported method StakePos.Address should have comment or be unexported (golint)
    • Line 137: warning: exported function StakerID should have comment or be unexported (golint)
    • Line 143: warning: exported type EpochSnapshotPos should have comment or be unexported (golint)
    • Line 147: warning: exported function EpochSnapshot should have comment or be unexported (golint)
    • Line 153: warning: exported method EpochSnapshotPos.EndTime should have comment or be unexported (golint)
    • Line 157: warning: exported method EpochSnapshotPos.Duration should have comment or be unexported (golint)
    • Line 161: warning: exported method EpochSnapshotPos.EpochFee should have comment or be unexported (golint)
    • Line 165: warning: exported method EpochSnapshotPos.TotalBaseRewardWeight should have comment or be unexported (golint)
    • Line 169: warning: exported method EpochSnapshotPos.TotalTxRewardWeight should have comment or be unexported (golint)
    • Line 173: warning: exported method EpochSnapshotPos.BaseRewardPerSecond should have comment or be unexported (golint)
    • Line 177: warning: exported method EpochSnapshotPos.StakeTotalAmount should have comment or be unexported (golint)
    • Line 181: warning: exported method EpochSnapshotPos.DelegationsTotalAmount should have comment or be unexported (golint)
    • Line 185: warning: exported method EpochSnapshotPos.TotalSupply should have comment or be unexported (golint)
    • Line 191: warning: exported type ValidatorMeritPos should have comment or be unexported (golint)
    • Line 195: warning: exported method EpochSnapshotPos.ValidatorMerit should have comment or be unexported (golint)
    • Line 203: warning: exported method ValidatorMeritPos.StakeAmount should have comment or be unexported (golint)
    • Line 207: warning: exported method ValidatorMeritPos.DelegatedMe should have comment or be unexported (golint)
    • Line 211: warning: exported method ValidatorMeritPos.BaseRewardWeight should have comment or be unexported (golint)
    • Line 215: warning: exported method ValidatorMeritPos.TxRewardWeight should have comment or be unexported (golint)
    • utils/delayer/delayer.go
    • Line 9: warning: exported type Delayer should have comment or be unexported (golint)
    • Line 18: warning: exported function New should have comment or be unexported (golint)
    • Line 28: warning: exported method Delayer.Start should have comment or be unexported (golint)
    • Line 51: warning: exported method Delayer.Stop should have comment or be unexported (golint)
    • inter/time.go
    • Line 24: warning: exported function FromUnix should have comment or be unexported (golint)
    • Line 35: warning: exported method Timestamp.Time should have comment or be unexported (golint)
    • ethapi/api.go
    • Line 831: warning: exported function DoCall should have comment or be unexported (golint)
    • poset/epoch.go
    • Line 15: warning: exported type EpochState should have comment or be unexported (golint)
    • eventcheck/ban.go
    • Line 10: warning: exported var ErrAlreadyConnectedEvent should have comment or be unexported (golint)
    • Line 14: warning: exported function IsBan should have comment or be unexported (golint)
    • kvdb/memorydb/memorydb.go
    • Line 40: warning: comment on exported function NewWithDrop should be of the form "NewWithDrop ..." (golint)
    • Line 67: warning: exported method Database.Drop should have comment or be unexported (golint)
    • version/version.go
    • Line 17: warning: exported function BigToString should have comment or be unexported (golint)
    • Line 24: warning: exported function U64ToString should have comment or be unexported (golint)
    • Line 28: warning: exported function AsString should have comment or be unexported (golint)
    • Line 32: warning: exported function AsU64 should have comment or be unexported (golint)
    • Line 36: warning: exported function AsBigInt should have comment or be unexported (golint)
    • evmcore/tx_pool.go
    • Line 120: warning: exported const TxStatusUnknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 780: warning: comment on exported method TxPool.AddRemotesSync should be of the form "AddRemotesSync ..." (golint)
    • gossip/emitter.go
    • Line 39: warning: exported const MimetypeEvent should have comment (or a comment on this block) or be unexported (golint)
    • Line 68: warning: exported type Emitter should have comment or be unexported (golint)
    • Line 740: warning: exported method Emitter.EmitEvent should have comment or be unexported (golint)
    • gossip/service.go
    • Line 46: warning: exported type ServiceFeed should have comment or be unexported (golint)
    • Line 57: warning: exported method ServiceFeed.SubscribeNewEpoch should have comment or be unexported (golint)
    • Line 61: warning: exported method ServiceFeed.SubscribeNewPack should have comment or be unexported (golint)
    • Line 65: warning: exported method ServiceFeed.SubscribeNewEmitted should have comment or be unexported (golint)
    • Line 69: warning: exported method ServiceFeed.SubscribeNewBlock should have comment or be unexported (golint)
    • Line 73: warning: exported method ServiceFeed.SubscribeNewTxs should have comment or be unexported (golint)
    • Line 77: warning: exported method ServiceFeed.SubscribeNewLogs should have comment or be unexported (golint)
    • Line 128: warning: exported function NewService should have comment or be unexported (golint)
    • Line 359: warning: exported method Service.IsMigration should have comment or be unexported (golint)
    • Line 363: warning: exported method Service.Emitter should have comment or be unexported (golint)
    • flags/helpers.go
    • Line 28: warning: exported var CommandHelpTemplate should have comment or be unexported (golint)
    • Line 110: warning: comment on exported type ByCategory should be of the form "ByCategory ..." (with optional leading article) (golint)
    • Line 132: warning: exported function FlagCategory should have comment or be unexported (golint)
    • debug/trace.go
    • Line 50: warning: comment on exported method HandlerT.StopGoTrace should be of the form "StopGoTrace ..." (golint)
    • lachesis/genesis/accounts.go
    • Line 16: warning: exported var ErrLocked should have comment or be unexported (golint)
    • Line 34: warning: exported function NewAccountsBackend should have comment or be unexported (golint)
    • topicsdb/topicsdb.go
    • Line 13: warning: exported const MaxCount should have comment or be unexported (golint)
    • Line 15: warning: exported var ErrTooManyTopics should have comment or be unexported (golint)
    • gossip/peer.go
    • Line 96: warning: exported method PeerProgress.Less should have comment or be unexported (golint)
    • eventcheck/heavycheck/heavy_check.go
    • Line 18: warning: exported var ErrWrongEventSig should have comment or be unexported (golint)
    • Line 38: warning: comment on exported type Checker should be of the form "Checker ..." (with optional leading article) (golint)
    • Line 51: warning: exported type TaskData should have comment or be unexported (golint)
    • Line 75: warning: exported method Checker.Start should have comment or be unexported (golint)
    • Line 82: warning: exported method Checker.Stop should have comment or be unexported (golint)
    • Line 87: warning: exported method Checker.Overloaded should have comment or be unexported (golint)
    • Line 91: warning: exported method Checker.Enqueue should have comment or be unexported (golint)
    • cmd/acc-gen/flags.go
    • Line 7: warning: exported var FromFlag should have comment or be unexported (golint)
    • Line 13: warning: exported var CountFlag should have comment or be unexported (golint)
    • gossip/packsdownloader/packs_downloader.go
    • Line 48: warning: exported type Peer should have comment or be unexported (golint)
    • Line 82: warning: exported method PacksDownloader.OnNewEpoch should have comment or be unexported (golint)
    • Line 104: warning: exported method PacksDownloader.Peer should have comment or be unexported (golint)
    • Line 111: warning: exported method PacksDownloader.PeersNum should have comment or be unexported (golint)
    • utils/toml/file.go
    • Line 12: warning: exported function ParseFile should have comment or be unexported (golint)
    • Line 26: warning: exported function WriteTo should have comment or be unexported (golint)
    • gossip/store_event.go
    • Line 84: warning: exported method Store.ForEachEpochEvent should have comment or be unexported (golint)
    • Line 90: warning: exported method Store.ForEachEvent should have comment or be unexported (golint)
    • Line 96: warning: exported method Store.ForEachEventRLP should have comment or be unexported (golint)
    • Line 106: warning: exported method Store.FindEventHashes should have comment or be unexported (golint)
    • Line 137: warning: exported method Store.GetHighestLamport should have comment or be unexported (golint)
    • Line 145: warning: exported method Store.SetHighestLamport should have comment or be unexported (golint)
    • debug/flags.go
    • Line 23: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 36: warning: exported var Memsize should have comment or be unexported (golint)
    • Line 122: warning: exported var DeprecatedFlags should have comment or be unexported (golint)
    • Line 205: warning: exported function StartPProf should have comment or be unexported (golint)
    • kvdb/table/table.go
    • Line 38: warning: exported function New should have comment or be unexported (golint)
    • Line 42: warning: exported method Table.NewTable should have comment or be unexported (golint)
    • Line 46: warning: exported method Table.Close should have comment or be unexported (golint)
    • Line 53: warning: exported method Table.Has should have comment or be unexported (golint)
    • Line 57: warning: exported method Table.Get should have comment or be unexported (golint)
    • Line 61: warning: exported method Table.Put should have comment or be unexported (golint)
    • Line 65: warning: exported method Table.Delete should have comment or be unexported (golint)
    • Line 69: warning: exported method Table.NewBatch should have comment or be unexported (golint)
    • Line 73: warning: exported method Table.Stat should have comment or be unexported (golint)
    • Line 77: warning: exported method Table.Compact should have comment or be unexported (golint)
    • Line 111: warning: exported method Table.NewIterator should have comment or be unexported (golint)
    • evmcore/dummy_block.go
    • Line 31: warning: exported type EvmHeader should have comment or be unexported (golint)
    • Line 44: warning: exported type EvmBlock should have comment or be unexported (golint)
    • Line 112: warning: exported method EvmBlock.NumberU64 should have comment or be unexported (golint)
    • Line 116: warning: exported method EvmBlock.EthBlock should have comment or be unexported (golint)
    • gossip/evm_state_reader.go
    • Line 19: warning: exported type EvmStateReader should have comment or be unexported (golint)
    • Line 29: warning: exported method Service.GetEvmStateReader should have comment or be unexported (golint)
    • Line 40: warning: exported method EvmStateReader.MinGasPrice should have comment or be unexported (golint)
    • Line 44: warning: exported method EvmStateReader.CurrentBlock should have comment or be unexported (golint)
    • Line 52: warning: exported method EvmStateReader.CurrentHeader should have comment or be unexported (golint)
    • Line 60: warning: exported method EvmStateReader.GetHeader should have comment or be unexported (golint)
    • Line 64: warning: exported method EvmStateReader.GetBlock should have comment or be unexported (golint)
    • Line 68: warning: exported method EvmStateReader.GetDagHeader should have comment or be unexported (golint)
    • Line 72: warning: exported method EvmStateReader.GetDagBlock should have comment or be unexported (golint)
    • Line 101: warning: exported method Store.GetBlockTransactions should have comment or be unexported (golint)
    • Line 128: warning: exported method EvmStateReader.StateAt should have comment or be unexported (golint)
    • poset/apply_genesis.go
    • Line 35: warning: exported method GenesisState.Hash should have comment or be unexported (golint)
    • Line 43: warning: exported method GenesisState.EpochName should have comment or be unexported (golint)
    • gossip/handler.go
    • Line 62: warning: exported type ProtocolManager should have comment or be unexported (golint)
    • Line 327: warning: exported method ProtocolManager.Start should have comment or be unexported (golint)
    • Line 360: warning: exported method ProtocolManager.Stop should have comment or be unexported (golint)
    • gossip/gasprice/gasprice.go
    • Line 36: warning: exported var DefaultMaxPrice should have comment or be unexported (golint)
    • Line 38: warning: exported type Config should have comment or be unexported (golint)
    • Line 44: warning: exported type Reader should have comment or be unexported (golint)
    • cmd/lachesis/metrics/metrics.go
    • Line 15: warning: exported var PrometheusEndpointFlag should have comment or be unexported (golint)
    • Line 21: warning: exported function SetupPrometheus should have comment or be unexported (golint)
    • Line 36: warning: exported function SetDataDir should have comment or be unexported (golint)
    • gossip/upgnotifier/non_supported_upgrade_notifier.go
    • Line 13: warning: exported type Reader should have comment or be unexported (golint)
    • Line 18: warning: exported type Logger should have comment or be unexported (golint)
    • Line 25: warning: exported function New should have comment or be unexported (golint)
    • Line 33: warning: exported method Logger.Start should have comment or be unexported (golint)
    • Line 56: warning: exported method Logger.Stop should have comment or be unexported (golint)
    • lachesis/config.go
    • Line 18: warning: exported const MainNetworkID should have comment (or a comment on this block) or be unexported (golint)
    • Line 100: warning: exported function MainNetConfig should have comment or be unexported (golint)
    • Line 113: warning: exported function TestNetConfig should have comment or be unexported (golint)
    • Line 126: warning: exported function FakeNetConfig should have comment or be unexported (golint)
    • Line 175: warning: exported function DefaultDagConfig should have comment or be unexported (golint)
    • Line 186: warning: exported function FakeNetDagConfig should have comment or be unexported (golint)
    • tracing/tx-tracing.go
    • Line 18: warning: exported function SetEnabled should have comment or be unexported (golint)
    • Line 22: warning: exported function StartTx should have comment or be unexported (golint)
    • Line 40: warning: exported function FinishTx should have comment or be unexported (golint)
    • Line 58: warning: exported function CheckTx should have comment or be unexported (golint)
    • cmd/lachesis/defaults.go
    • Line 18: warning: comment on exported const DefaultP2PPort should be of the form "DefaultP2PPort ..." (golint)
    • Line 22: warning: exported const DefaultHTTPPort should have comment (or a comment on this block) or be unexported (golint)
    • utils/avg_buff.go
    • Line 9: warning: exported type AvgBuff should have comment or be unexported (golint)
    • Line 16: warning: exported function NewAvgBuff should have comment or be unexported (golint)
    • Line 23: warning: exported method AvgBuff.Push should have comment or be unexported (golint)
    • Line 29: warning: exported method AvgBuff.Avg should have comment or be unexported (golint)
    • evmcore/notify.go
    • Line 38: warning: exported type ChainNotify should have comment or be unexported (golint)
    • Line 44: warning: exported type ChainSideNotify should have comment or be unexported (golint)
    • Line 48: warning: exported type ChainHeadNotify should have comment or be unexported (golint)
    • gossip/ethapi_backend.go
    • Line 40: warning: exported var ErrNotImplemented should have comment or be unexported (golint)
    • Line 55: warning: exported method EthAPIBackend.CurrentBlock should have comment or be unexported (golint)
    • Line 59: warning: exported method EthAPIBackend.HeaderByNumber should have comment or be unexported (golint)
    • Line 90: warning: exported method EthAPIBackend.StateAndHeaderByNumberOrHash should have comment or be unexported (golint)
    • Line 250: warning: exported method EthAPIBackend.GetValidators should have comment or be unexported (golint)
    • Line 254: warning: exported method EthAPIBackend.BlockByHash should have comment or be unexported (golint)
    • Line 303: warning: exported method EthAPIBackend.GetLogs should have comment or be unexported (golint)
    • Line 315: warning: exported method EthAPIBackend.GetTd should have comment or be unexported (golint)
    • Line 319: warning: exported method EthAPIBackend.GetEVM should have comment or be unexported (golint)
    • Line 328: warning: exported method EthAPIBackend.SendTx should have comment or be unexported (golint)
    • Line 344: warning: exported method EthAPIBackend.SubscribeLogsEvent should have comment or be unexported (golint)
    • Line 348: warning: exported method EthAPIBackend.SubscribeNewTxsEvent should have comment or be unexported (golint)
    • Line 352: warning: exported method EthAPIBackend.SubscribeNewBlockEvent should have comment or be unexported (golint)
    • Line 356: warning: exported method EthAPIBackend.GetPoolTransactions should have comment or be unexported (golint)
    • Line 368: warning: exported method EthAPIBackend.GetPoolTransaction should have comment or be unexported (golint)
    • Line 372: warning: exported method EthAPIBackend.GetTransaction should have comment or be unexported (golint)
    • Line 396: warning: exported method EthAPIBackend.GetPoolNonce should have comment or be unexported (golint)
    • Line 400: warning: exported method EthAPIBackend.Stats should have comment or be unexported (golint)
    • Line 404: warning: exported method EthAPIBackend.TxPoolContent should have comment or be unexported (golint)
    • Line 408: warning: exported method EthAPIBackend.SubscribeNewTxsNotify should have comment or be unexported (golint)
    • Line 430: warning: exported method EthAPIBackend.ProtocolVersion should have comment or be unexported (golint)
    • Line 434: warning: exported method EthAPIBackend.SuggestPrice should have comment or be unexported (golint)
    • Line 438: warning: exported method EthAPIBackend.MinGasPrice should have comment or be unexported (golint)
    • Line 442: warning: exported method EthAPIBackend.ChainDb should have comment or be unexported (golint)
    • Line 446: warning: exported method EthAPIBackend.AccountManager should have comment or be unexported (golint)
    • Line 450: warning: exported method EthAPIBackend.ExtRPCEnabled should have comment or be unexported (golint)
    • Line 454: warning: exported method EthAPIBackend.RPCGasCap should have comment or be unexported (golint)
    • Line 458: warning: exported method EthAPIBackend.RPCTxFeeCap should have comment or be unexported (golint)
    • Line 462: warning: exported method EthAPIBackend.EvmLogIndex should have comment or be unexported (golint)
    • Line 722: warning: exported method EthAPIBackend.CalcLogsBloom should have comment or be unexported (golint)
    • inter/sfctype/sfc_type.go
    • Line 92: warning: exported method DelegationID.Bytes should have comment or be unexported (golint)
    • Line 96: warning: exported function BytesToDelegationID should have comment or be unexported (golint)
    • evmcore/chain_makers.go
    • Line 50: warning: exported type TestChain should have comment or be unexported (golint)
    • Line 54: warning: exported method TestChain.GetHeader should have comment or be unexported (golint)
    • gossip/sfc_common_test.go
    • Line 124: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 128: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 132: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 141: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 151: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 155: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 211: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 225: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 239: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 244: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 250: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 262: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 266: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 271: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 285: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 296: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 312: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 349: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 355: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 362: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 371: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 381: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 392: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • Line 399: warning: receiver name env should be consistent with previous receiver name e for testEnv (golint)
    • gossip/store_heads.go
    • Line 8: warning: exported method Store.DelHead should have comment or be unexported (golint)
    • Line 21: warning: exported method Store.AddHead should have comment or be unexported (golint)
    • Line 34: warning: exported method Store.IsHead should have comment or be unexported (golint)
    • evmcore/state_transition.go
    • Line 28: warning: comment on exported type StateTransition should be of the form "StateTransition ..." (with optional leading article) (golint)
    • eventcheck/basiccheck/basic_check.go
    • Line 16: warning: exported var ErrSigMalformed should have comment or be unexported (golint)
    • Line 31: warning: exported type Checker should have comment or be unexported (golint)
    • Line 70: warning: exported function CalcGasPowerUsed should have comment or be unexported (golint)
    • app/store.go
    • Line 126: warning: comment on exported method Store.IndexLogs should be of the form "IndexLogs ..." (golint)
    • Line 134: warning: exported method Store.EvmTable should have comment or be unexported (golint)
    • Line 138: warning: exported method Store.EvmLogs should have comment or be unexported (golint)
    • cmd/cmdtest/test_cmd.go
    • Line 37: warning: exported function NewTestCmd should have comment or be unexported (golint)
    • Line 41: warning: exported type TestCmd should have comment or be unexported (golint)
    • Line 88: warning: exported method TestCmd.SetTemplateFunc should have comment or be unexported (golint)
    • Line 184: warning: exported method TestCmd.WaitExit should have comment or be unexported (golint)
    • Line 188: warning: exported method TestCmd.Interrupt should have comment or be unexported (golint)
    • Line 215: warning: exported method TestCmd.CloseStdin should have comment or be unexported (golint)
    • Line 219: warning: exported method TestCmd.Kill should have comment or be unexported (golint)
    • logger/instance.go
    • Line 7: warning: exported type Instance should have comment or be unexported (golint)
    • Line 11: warning: exported function MakeInstance should have comment or be unexported (golint)
    • Line 18: warning: exported method Instance.SetName should have comment or be unexported (golint)
    • poset/poset.go
    • Line 18: warning: exported var ErrWrongEpochHash should have comment or be unexported (golint)
    • gossip/pack.go
    • Line 9: warning: exported type PackInfo should have comment or be unexported (golint)
    • gossip/protocol.go
    • Line 70: warning: exported const ErrMsgTooLarge should have comment (or a comment on this block) or be unexported (golint)
    • gossip/store_pack.go
    • Line 22: warning: exported method Store.GetPackInfo should have comment or be unexported (golint)
    • Line 46: warning: comment on exported method Store.GetPackInfoOrDefault should be of the form "GetPackInfoOrDefault ..." (golint)
    • Line 57: warning: exported method Store.GetPackInfoRLP should have comment or be unexported (golint)
    • Line 66: warning: exported method Store.SetPackInfo should have comment or be unexported (golint)
    • Line 79: warning: exported method Store.AddToPack should have comment or be unexported (golint)
    • Line 91: warning: exported method Store.GetPack should have comment or be unexported (golint)
    • Line 116: warning: exported method Store.GetPacksNum should have comment or be unexported (golint)
    • Line 127: warning: exported method Store.GetPacksNumOrDefault should have comment or be unexported (golint)
    • Line 135: warning: exported method Store.SetPacksNum should have comment or be unexported (golint)

gocyclo92%

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.

    • gossip/handler.go
    • Line 461: warning: cyclomatic complexity 72 of function (*ProtocolManager).handleMsg() is high (> 15) (gocyclo)
    • inter/ascii_scheme.go
    • Line 23: warning: cyclomatic complexity 34 of function ASCIIschemeForEach() is high (> 15) (gocyclo)
    • Line 487: warning: cyclomatic complexity 28 of function (*rows).String() is high (> 15) (gocyclo)
    • Line 218: warning: cyclomatic complexity 22 of function DAGtoASCIIscheme() is high (> 15) (gocyclo)
    • Line 390: warning: cyclomatic complexity 21 of function (*rows).Optimize() is high (> 15) (gocyclo)
    • evmcore/tx_pool_test.go
    • Line 874: warning: cyclomatic complexity 29 of function testTransactionQueueTimeLimiting() is high (> 15) (gocyclo)
    • Line 571: warning: cyclomatic complexity 28 of function TestTransactionPostponing() is high (> 15) (gocyclo)
    • Line 1245: warning: cyclomatic complexity 24 of function TestTransactionPoolRepricing() is high (> 15) (gocyclo)
    • Line 1428: warning: cyclomatic complexity 20 of function TestTransactionPoolUnderpricing() is high (> 15) (gocyclo)
    • Line 1748: warning: cyclomatic complexity 19 of function testTransactionJournaling() is high (> 15) (gocyclo)
    • Line 476: warning: cyclomatic complexity 19 of function TestTransactionDropping() is high (> 15) (gocyclo)
    • Line 1665: warning: cyclomatic complexity 17 of function TestTransactionReplacement() is high (> 15) (gocyclo)
    • Line 1599: warning: cyclomatic complexity 17 of function TestTransactionDeduplication() is high (> 15) (gocyclo)
    • gossip/emitter.go
    • Line 347: warning: cyclomatic complexity 19 of function (*Emitter).createEvent() is high (> 15) (gocyclo)
    • Line 679: warning: cyclomatic complexity 16 of function (*Emitter).isAllowedToEmit() is high (> 15) (gocyclo)
    • ethapi/api.go
    • Line 962: warning: cyclomatic complexity 25 of function DoEstimateGas() is high (> 15) (gocyclo)
    • Line 1819: warning: cyclomatic complexity 18 of function (*PublicTransactionPoolAPI).Resend() is high (> 15) (gocyclo)
    • Line 831: warning: cyclomatic complexity 17 of function DoCall() is high (> 15) (gocyclo)
    • Line 1574: warning: cyclomatic complexity 16 of function (*SendTxArgs).setDefaults() is high (> 15) (gocyclo)
    • vector/index.go
    • Line 194: warning: cyclomatic complexity 23 of function (*Index).fillEventVectors() is high (> 15) (gocyclo)
    • evmcore/tx_pool.go
    • Line 1272: warning: cyclomatic complexity 21 of function (*TxPool).truncatePending() is high (> 15) (gocyclo)
    • Line 326: warning: cyclomatic complexity 17 of function (*TxPool).loop() is high (> 15) (gocyclo)
    • Line 592: warning: cyclomatic complexity 16 of function (*TxPool).add() is high (> 15) (gocyclo)
    • Line 1118: warning: cyclomatic complexity 16 of function (*TxPool).reset() is high (> 15) (gocyclo)
    • inter/common.go
    • Line 35: warning: cyclomatic complexity 20 of function ForEachRandFork() is high (> 15) (gocyclo)

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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!