Preparing report...

Report for github.com/bitmark-inc/bitmarkd

A+    Excellent!    Found 86 issues across 385 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!


gocyclo91%

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.

    • bitmarkd/avl/avl_test.go
    • Line 257: warning: cyclomatic complexity 19 of function doGet() is high (> 15) (gocyclo)
    • Line 362: warning: cyclomatic complexity 16 of function randomTree() is high (> 15) (gocyclo)
    • bitmarkd/zmqutil/client.go
    • Line 154: warning: cyclomatic complexity 31 of function (*clientData).openSocket() is high (> 15) (gocyclo)
    • Line 434: warning: cyclomatic complexity 25 of function (*clientData).Send() is high (> 15) (gocyclo)

golint85%

Golint is a linter for Go source code.

    • bitmarkd/rpc/fixtures/fixtures.go
    • Line 18: warning: exported const TestingDirName should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported var IssuerPublicKey should have comment or be unexported (golint)
    • Line 64: warning: exported function SetupTestLogger should have comment or be unexported (golint)
    • Line 83: warning: exported function TeardownTestLogger should have comment or be unexported (golint)
    • Line 91: warning: exported function Certificate should have comment or be unexported (golint)
    • Line 100: warning: exported function Key should have comment or be unexported (golint)
    • bitmarkd/storage/setup.go
    • Line 63: warning: exported var PaymentStorage should have comment or be unexported (golint)
    • Line 312: warning: exported function NewDBTransaction should have comment or be unexported (golint)
    • bitmarkd/proof/submission.go
    • Line 225: warning: exported function MinedBlocks should have comment or be unexported (golint)
    • Line 229: warning: exported function FailMinedBlocks should have comment or be unexported (golint)
    • bitmarkd/storage/transaction.go
    • Line 31: warning: exported type TransactionData should have comment or be unexported (golint)
    • Line 42: warning: exported method TransactionData.InUse should have comment or be unexported (golint)
    • Line 51: warning: exported method TransactionData.Begin should have comment or be unexported (golint)
    • Line 63: warning: exported method TransactionData.Put should have comment or be unexported (golint)
    • Line 72: warning: exported method TransactionData.PutN should have comment or be unexported (golint)
    • Line 76: warning: exported method TransactionData.Delete should have comment or be unexported (golint)
    • Line 80: warning: exported method TransactionData.Commit should have comment or be unexported (golint)
    • Line 91: warning: exported method TransactionData.Get should have comment or be unexported (golint)
    • Line 95: warning: exported method TransactionData.GetN should have comment or be unexported (golint)
    • Line 100: warning: exported method TransactionData.GetNB should have comment or be unexported (golint)
    • Line 105: warning: exported method TransactionData.Abort should have comment or be unexported (golint)
    • Line 111: warning: exported method TransactionData.Has should have comment or be unexported (golint)
    • bitmarkd/transactionrecord/transfers.go
    • Line 16: warning: exported method BitmarkTransferUnratified.GetLink should have comment or be unexported (golint)
    • Line 20: warning: exported method BitmarkTransferUnratified.GetPayment should have comment or be unexported (golint)
    • Line 24: warning: exported method BitmarkTransferUnratified.GetOwner should have comment or be unexported (golint)
    • Line 28: warning: exported method BitmarkTransferUnratified.GetCurrencies should have comment or be unexported (golint)
    • Line 32: warning: exported method BitmarkTransferUnratified.GetSignature should have comment or be unexported (golint)
    • Line 36: warning: exported method BitmarkTransferUnratified.GetCountersignature should have comment or be unexported (golint)
    • Line 42: warning: exported method BitmarkTransferCountersigned.GetLink should have comment or be unexported (golint)
    • Line 46: warning: exported method BitmarkTransferCountersigned.GetPayment should have comment or be unexported (golint)
    • Line 50: warning: exported method BitmarkTransferCountersigned.GetOwner should have comment or be unexported (golint)
    • Line 54: warning: exported method BitmarkTransferCountersigned.GetCurrencies should have comment or be unexported (golint)
    • Line 58: warning: exported method BitmarkTransferCountersigned.GetSignature should have comment or be unexported (golint)
    • Line 62: warning: exported method BitmarkTransferCountersigned.GetCountersignature should have comment or be unexported (golint)
    • Line 68: warning: exported method BlockOwnerTransfer.GetLink should have comment or be unexported (golint)
    • Line 72: warning: exported method BlockOwnerTransfer.GetPayment should have comment or be unexported (golint)
    • Line 76: warning: exported method BlockOwnerTransfer.GetOwner should have comment or be unexported (golint)
    • Line 80: warning: exported method BlockOwnerTransfer.GetCurrencies should have comment or be unexported (golint)
    • Line 84: warning: exported method BlockOwnerTransfer.GetSignature should have comment or be unexported (golint)
    • Line 88: warning: exported method BlockOwnerTransfer.GetCountersignature should have comment or be unexported (golint)
    • Line 94: warning: exported method BitmarkShare.GetLink should have comment or be unexported (golint)
    • Line 98: warning: exported method BitmarkShare.GetPayment should have comment or be unexported (golint)
    • Line 102: warning: exported method BitmarkShare.GetOwner should have comment or be unexported (golint)
    • Line 106: warning: exported method BitmarkShare.GetCurrencies should have comment or be unexported (golint)
    • Line 110: warning: exported method BitmarkShare.GetSignature should have comment or be unexported (golint)
    • Line 114: warning: exported method BitmarkShare.GetCountersignature should have comment or be unexported (golint)
    • bitmarkd/storage/handle.go
    • Line 86: warning: exported method PoolHandle.Remove should have comment or be unexported (golint)
    • Line 195: warning: exported method PoolHandle.Begin should have comment or be unexported (golint)
    • Line 199: warning: exported method PoolHandle.Commit should have comment or be unexported (golint)
    • bitmarkd/command/recorderd/config_reader.go
    • Line 33: warning: exported const ReaderLoggerPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 62: warning: exported method ConfigReaderData.SetWatcher should have comment or be unexported (golint)
    • Line 66: warning: exported method ConfigReaderData.SetCalendar should have comment or be unexported (golint)
    • Line 70: warning: exported method ConfigReaderData.SetProofer should have comment or be unexported (golint)
    • Line 74: warning: exported method ConfigReaderData.FirstTimeRun should have comment or be unexported (golint)
    • Line 82: warning: exported method ConfigReaderData.Start should have comment or be unexported (golint)
    • Line 104: warning: exported method ConfigReaderData.FirstRefresh should have comment or be unexported (golint)
    • Line 113: warning: exported method ConfigReaderData.Refresh should have comment or be unexported (golint)
    • Line 135: warning: exported method ConfigReaderData.GetConfig should have comment or be unexported (golint)
    • Line 142: warning: exported method ConfigReaderData.SetLog should have comment or be unexported (golint)
    • Line 168: warning: exported method ConfigReaderData.OptimalThreadCount should have comment or be unexported (golint)
    • bitmarkd/storage/payment.go
    • Line 19: warning: exported var CheckpointKey should have comment or be unexported (golint)
    • Line 21: warning: exported type P2PStorage should have comment or be unexported (golint)
    • Line 32: warning: exported type PaymentTable should have comment or be unexported (golint)
    • Line 45: warning: comment on exported method PaymentTable.Put should be of the form "Put ..." (golint)
    • Line 53: warning: comment on exported method PaymentTable.Delete should be of the form "Delete ..." (golint)
    • Line 61: warning: comment on exported method PaymentTable.Get should be of the form "Get ..." (golint)
    • Line 75: warning: comment on exported method PaymentTable.Has should be of the form "Has ..." (golint)
    • Line 84: warning: exported type LevelDBPaymentStore should have comment or be unexported (golint)
    • Line 91: warning: exported function NewLevelDBPaymentStore should have comment or be unexported (golint)
    • Line 106: warning: exported method LevelDBPaymentStore.DB should have comment or be unexported (golint)
    • Line 110: warning: exported method LevelDBPaymentStore.Table should have comment or be unexported (golint)
    • Line 199: warning: exported method LevelDBPaymentStore.Close should have comment or be unexported (golint)
    • bitmarkd/storage/access.go
    • Line 17: warning: comment on exported type Access should be of the form "Access ..." (with optional leading article) (golint)
    • Line 31: warning: exported type AccessData should have comment or be unexported (golint)
    • Line 48: warning: exported method AccessData.Begin should have comment or be unexported (golint)
    • Line 60: warning: exported method AccessData.Put should have comment or be unexported (golint)
    • Line 65: warning: exported method AccessData.Delete should have comment or be unexported (golint)
    • Line 70: warning: exported method AccessData.Commit should have comment or be unexported (golint)
    • Line 74: warning: exported method AccessData.DumpTx should have comment or be unexported (golint)
    • Line 78: warning: exported method AccessData.Get should have comment or be unexported (golint)
    • Line 94: warning: exported method AccessData.Iterator should have comment or be unexported (golint)
    • Line 98: warning: exported method AccessData.Has should have comment or be unexported (golint)
    • Line 106: warning: exported method AccessData.InUse should have comment or be unexported (golint)
    • Line 110: warning: exported method AccessData.Abort should have comment or be unexported (golint)
    • bitmarkd/command/recorderd/file_watcher.go
    • Line 29: warning: exported const FileWatcherLoggerPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported type FileWatcherData should have comment or be unexported (golint)
    • Line 39: warning: exported type WatcherChannel should have comment or be unexported (golint)
    • Line 68: warning: exported method FileWatcherData.Start should have comment or be unexported (golint)
    • Line 116: warning: exported method FileWatcherData.FileName should have comment or be unexported (golint)
    • Line 120: warning: exported method FileWatcherData.FilePath should have comment or be unexported (golint)
    • Line 124: warning: exported method FileWatcherData.ChangeChannel should have comment or be unexported (golint)
    • Line 128: warning: exported method FileWatcherData.RemoveChannel should have comment or be unexported (golint)
    • bitmarkd/command/recorderd/job_calendar.go
    • Line 34: warning: exported type JobCalendar should have comment or be unexported (golint)
    • Line 46: warning: exported type NumberRange should have comment or be unexported (golint)
    • Line 51: warning: comment on exported type FlattenEvents should be of the form "FlattenEvents ..." (with optional leading article) (golint)
    • Line 57: warning: exported type SingleEvent should have comment or be unexported (golint)
    • Line 62: warning: exported type JobCalendarData should have comment or be unexported (golint)
    • Line 70: warning: exported type TimeData should have comment or be unexported (golint)
    • Line 113: warning: exported method JobCalendarData.SetLog should have comment or be unexported (golint)
    • Line 117: warning: exported method JobCalendarData.RunForever should have comment or be unexported (golint)
    • Line 121: warning: exported method JobCalendarData.Refresh should have comment or be unexported (golint)
    • Line 231: warning: exported method JobCalendarData.PickInitialiseStartEvent should have comment or be unexported (golint)
    • Line 239: warning: exported method JobCalendarData.PickInitialiseStopEvent should have comment or be unexported (golint)
    • Line 247: warning: exported method JobCalendarData.PickNextStartEvent should have comment or be unexported (golint)
    • Line 259: warning: exported method JobCalendarData.PickNextStopEvent should have comment or be unexported (golint)
    • Line 271: warning: exported method JobCalendarData.RescheduleStartEventsPrior should have comment or be unexported (golint)
    • Line 291: warning: exported method JobCalendarData.RescheduleStopEventsPrior should have comment or be unexported (golint)
    • bitmarkd/command/recorderd/job_manager.go
    • Line 15: warning: exported type JobManager should have comment or be unexported (golint)
    • Line 20: warning: exported const JobManagerPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported type JobManagerChannel should have comment or be unexported (golint)
    • Line 29: warning: exported type JobManagerData should have comment or be unexported (golint)
    • Line 139: warning: exported method JobManagerData.Start should have comment or be unexported (golint)
    • bitmarkd/rpc/owner/owner.go
    • Line 39: warning: exported const MaximumBitmarksCount should have comment (or a comment on this block) or be unexported (golint)
    • Line 72: warning: exported function New should have comment or be unexported (golint)
    • bitmarkd/ownership/data.go
    • Line 168: warning: comment on exported method AssetOwnerData.IssueTxId should be of the form "IssueTxId ..." (golint)
    • Line 172: warning: exported method AssetOwnerData.TransferBlockNumber should have comment or be unexported (golint)
    • Line 175: warning: exported method AssetOwnerData.IssueBlockNumber should have comment or be unexported (golint)
    • Line 199: warning: comment on exported method BlockOwnerData.IssueTxId should be of the form "IssueTxId ..." (golint)
    • Line 203: warning: exported method BlockOwnerData.TransferBlockNumber should have comment or be unexported (golint)
    • Line 206: warning: exported method BlockOwnerData.IssueBlockNumber should have comment or be unexported (golint)
    • Line 231: warning: comment on exported method ShareOwnerData.IssueTxId should be of the form "IssueTxId ..." (golint)
    • Line 235: warning: exported method ShareOwnerData.TransferBlockNumber should have comment or be unexported (golint)
    • Line 238: warning: exported method ShareOwnerData.IssueBlockNumber should have comment or be unexported (golint)
    • bitmarkd/rpc/handler/handler.go
    • Line 54: warning: exported method InternalConnection.Close should have comment or be unexported (golint)
    • Line 58: warning: comment on exported type Handler should be of the form "Handler ..." (with optional leading article) (golint)
    • Line 77: warning: exported function New should have comment or be unexported (golint)
    • bitmarkd/storage/split.go
    • Line 37: warning: exported method PoolNB.PutN should have comment or be unexported (golint)
    • Line 74: warning: exported method PoolNB.Begin should have comment or be unexported (golint)
    • Line 78: warning: exported method PoolNB.Commit should have comment or be unexported (golint)
    • bitmarkd/rpc/ratelimit/limit.go
    • Line 16: warning: comment on exported function Limit should be of the form "Limit ..." (golint)
    • Line 26: warning: comment on exported function LimitN should be of the form "LimitN ..." (golint)
    • bitmarkd/command/recorderd/subscriber.go
    • Line 18: warning: comment on exported type PublishedItem should be of the form "PublishedItem ..." (with optional leading article) (golint)
    • Line 25: warning: comment on exported function Subscribe should be of the form "Subscribe ..." (golint)
    • bitmarkd/command/recorderd/proofer.go
    • Line 37: warning: exported type Proofer should have comment or be unexported (golint)
    • Line 44: warning: exported type ProoferData should have comment or be unexported (golint)
    • Line 68: warning: exported method ProoferData.StartHashing should have comment or be unexported (golint)
    • Line 77: warning: exported method ProoferData.StopHashing should have comment or be unexported (golint)
    • Line 94: warning: exported method ProoferData.IsWorking should have comment or be unexported (golint)
    • Line 102: warning: exported method ProoferData.Refresh should have comment or be unexported (golint)
    • Line 157: warning: exported function ProofQueueIncrement should have comment or be unexported (golint)
    • Line 161: warning: exported function ProofQueueDecrement should have comment or be unexported (golint)
    • Line 165: warning: comment on exported function ProofProxy should be of the form "ProofProxy ..." (golint)
    • Line 260: warning: exported method ProoferData.ProofThread should have comment or be unexported (golint)
    • bitmarkd/announce/fixtures/fixtures.go
    • Line 20: warning: exported const LogCategory should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: exported var Listener1 should have comment or be unexported (golint)
    • Line 50: warning: exported function SetupTestLogger should have comment or be unexported (golint)
    • Line 69: warning: exported function TeardownTestLogger should have comment or be unexported (golint)
    • bitmarkd/payment/p2p.go
    • Line 36: warning: exported const MaximumOutboundPeers should have comment or be unexported (golint)
    • Line 37: warning: exported const PaymentExpiry should have comment or be unexported (golint)
    • Line 38: warning: exported const HeaderSyncTimeout should have comment or be unexported (golint)
    • bitmarkd/rpc/assets/assets.go
    • Line 47: warning: exported function New should have comment or be unexported (golint)
    • Line 57: warning: comment on exported function Register should be of the form "Register ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!