Preparing report...

Report for github.com/digitalbitsorg/go

A+    Excellent!    Found 196 issues across 508 files

Tweet

gofmt83%

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!


gocyclo98%

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.

    • go/xdr/xdr_generated.go
    • Line 6720: warning: cyclomatic complexity 26 of function NewStellarMessage() is high (> 15) (gocyclo)
    • Line 4234: warning: cyclomatic complexity 23 of function NewOperationResultTr() is high (> 15) (gocyclo)
    • Line 1995: warning: cyclomatic complexity 22 of function NewOperationBody() is high (> 15) (gocyclo)
    • go/xdr/asset.go
    • Line 93: warning: cyclomatic complexity 17 of function (Asset).Extract() is high (> 15) (gocyclo)

golint77%

Golint is a linter for Go source code.

    • go/services/frontier/internal/ingest/batch_insert_builder.go
    • Line 19: warning: exported method BatchInsertBuilder.GetAddresses should have comment or be unexported (golint)
    • Line 30: warning: exported method BatchInsertBuilder.ReplaceAddressesWithIDs should have comment or be unexported (golint)
    • Line 40: warning: exported method BatchInsertBuilder.Values should have comment or be unexported (golint)
    • Line 45: warning: exported method BatchInsertBuilder.Exec should have comment or be unexported (golint)
    • go/tools/xdb-archivist/internal/http_archive.go
    • Line 16: warning: exported type HttpArchiveBackend should have comment or be unexported (golint)
    • Line 24: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 30: warning: exported method HttpArchiveBackend.GetFile should have comment or be unexported (golint)
    • Line 50: warning: exported method HttpArchiveBackend.Exists should have comment or be unexported (golint)
    • Line 60: warning: exported method HttpArchiveBackend.PutFile should have comment or be unexported (golint)
    • Line 65: warning: exported method HttpArchiveBackend.ListFiles should have comment or be unexported (golint)
    • Line 74: warning: exported method HttpArchiveBackend.CanListFiles should have comment or be unexported (golint)
    • Line 78: warning: exported function MakeHttpBackend should have comment or be unexported (golint)
    • go/services/bifrost/database/postgres.go
    • Line 91: warning: exported method PostgresDatabase.Open should have comment or be unexported (golint)
    • Line 112: warning: exported method PostgresDatabase.CreateAddressAssociation should have comment or be unexported (golint)
    • Line 127: warning: exported method PostgresDatabase.GetAssociationByChainAddress should have comment or be unexported (golint)
    • Line 144: warning: exported method PostgresDatabase.GetAssociationByStellarPublicKey should have comment or be unexported (golint)
    • Line 161: warning: exported method PostgresDatabase.AddProcessedTransaction should have comment or be unexported (golint)
    • Line 171: warning: exported method PostgresDatabase.IncrementAddressIndex should have comment or be unexported (golint)
    • Line 220: warning: exported method PostgresDatabase.ResetBlockCounters should have comment or be unexported (golint)
    • Line 236: warning: exported method PostgresDatabase.GetEthereumBlockToProcess should have comment or be unexported (golint)
    • Line 240: warning: exported method PostgresDatabase.SaveLastProcessedEthereumBlock should have comment or be unexported (golint)
    • Line 244: warning: exported method PostgresDatabase.GetBitcoinBlockToProcess should have comment or be unexported (golint)
    • Line 248: warning: exported method PostgresDatabase.SaveLastProcessedBitcoinBlock should have comment or be unexported (golint)
    • Line 434: warning: exported method PostgresDatabase.AddRecoveryTransaction should have comment or be unexported (golint)
    • go/services/frontier/internal/paths/dummy_finder.go
    • Line 7: warning: exported type DummyFinder should have comment or be unexported (golint)
    • Line 10: warning: exported method DummyFinder.Find should have comment or be unexported (golint)
    • Line 33: warning: exported type DummyPath should have comment or be unexported (golint)
    • Line 39: warning: exported method DummyPath.Source should have comment or be unexported (golint)
    • Line 40: warning: exported method DummyPath.Destination should have comment or be unexported (golint)
    • Line 41: warning: exported method DummyPath.Path should have comment or be unexported (golint)
    • Line 42: warning: exported method DummyPath.Cost should have comment or be unexported (golint)
    • go/xdr/xdr_generated.go
    • Line 90: warning: exported const CryptoKeyTypeKeyTypeEd25519 should have comment (or a comment on this block) or be unexported (golint)
    • Line 124: warning: exported const PublicKeyTypePublicKeyTypeEd25519 should have comment (or a comment on this block) or be unexported (golint)
    • Line 156: warning: exported const SignerKeyTypeSignerKeyTypeEd25519 should have comment (or a comment on this block) or be unexported (golint)
    • Line 596: warning: exported const AssetTypeAssetTypeNative should have comment (or a comment on this block) or be unexported (golint)
    • Line 796: warning: exported const ThresholdIndexesThresholdMasterWeight should have comment (or a comment on this block) or be unexported (golint)
    • Line 835: warning: exported const LedgerEntryTypeAccount should have comment (or a comment on this block) or be unexported (golint)
    • Line 893: warning: exported const AccountFlagsAuthRequiredFlag should have comment (or a comment on this block) or be unexported (golint)
    • Line 1008: warning: exported const TrustLineFlagsAuthorizedFlag should have comment (or a comment on this block) or be unexported (golint)
    • Line 1107: warning: exported const OfferEntryFlagsPassiveFlag should have comment (or a comment on this block) or be unexported (golint)
    • Line 1529: warning: exported const EnvelopeTypeEnvelopeTypeScp should have comment (or a comment on this block) or be unexported (golint)
    • Line 1586: warning: exported const OperationTypeCreateAccount should have comment (or a comment on this block) or be unexported (golint)
    • Line 2380: warning: exported const MemoTypeMemoNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 2831: warning: exported const CreateAccountResultCodeCreateAccountSuccess should have comment (or a comment on this block) or be unexported (golint)
    • Line 2924: warning: exported const PaymentResultCodePaymentSuccess should have comment (or a comment on this block) or be unexported (golint)
    • Line 3030: warning: exported const PathPaymentResultCodePathPaymentSuccess should have comment (or a comment on this block) or be unexported (golint)
    • Line 3245: warning: exported const ManageOfferResultCodeManageOfferSuccess should have comment (or a comment on this block) or be unexported (golint)
    • Line 3301: warning: exported const ManageOfferEffectManageOfferCreated should have comment (or a comment on this block) or be unexported (golint)
    • Line 3527: warning: exported const SetOptionsResultCodeSetOptionsSuccess should have comment (or a comment on this block) or be unexported (golint)
    • Line 3626: warning: exported const ChangeTrustResultCodeChangeTrustSuccess should have comment (or a comment on this block) or be unexported (golint)
    • Line 3717: warning: exported const AllowTrustResultCodeAllowTrustSuccess should have comment (or a comment on this block) or be unexported (golint)
    • Line 3806: warning: exported const AccountMergeResultCodeAccountMergeSuccess should have comment (or a comment on this block) or be unexported (golint)
    • Line 3921: warning: exported const InflationResultCodeInflationSuccess should have comment (or a comment on this block) or be unexported (golint)
    • Line 4046: warning: exported const ManageDataResultCodeManageDataSuccess should have comment (or a comment on this block) or be unexported (golint)
    • Line 4130: warning: exported const OperationResultCodeOpInner should have comment (or a comment on this block) or be unexported (golint)
    • Line 4716: warning: exported const TransactionResultCodeTxSuccess should have comment (or a comment on this block) or be unexported (golint)
    • Line 5098: warning: exported const LedgerUpgradeTypeLedgerUpgradeVersion should have comment (or a comment on this block) or be unexported (golint)
    • Line 5524: warning: exported const BucketEntryTypeLiveentry should have comment (or a comment on this block) or be unexported (golint)
    • Line 5978: warning: exported const LedgerEntryChangeTypeLedgerEntryCreated should have comment (or a comment on this block) or be unexported (golint)
    • Line 6284: warning: exported const ErrorCodeErrMisc should have comment (or a comment on this block) or be unexported (golint)
    • Line 6391: warning: exported const IpAddrTypeIPv4 should have comment (or a comment on this block) or be unexported (golint)
    • Line 6570: warning: exported const MessageTypeErrorMsg should have comment (or a comment on this block) or be unexported (golint)
    • Line 7234: warning: exported const ScpStatementTypeScpStPrepare should have comment (or a comment on this block) or be unexported (golint)
    • go/tools/xdb-archivist/internal/scan.go
    • Line 26: warning: exported method Archive.ScanCheckpoints should have comment or be unexported (golint)
    • Line 37: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 42: warning: exported method Archive.ScanCheckpointsSlow should have comment or be unexported (golint)
    • Line 98: warning: exported method Archive.ScanCheckpointsFast should have comment or be unexported (golint)
    • Line 156: warning: exported method Archive.Scan should have comment or be unexported (golint)
    • Line 168: warning: exported method Archive.ScanAllBuckets should have comment or be unexported (golint)
    • Line 189: warning: exported method Archive.ScanBuckets should have comment or be unexported (golint)
    • Line 283: warning: exported method Archive.ClearCachedInfo should have comment or be unexported (golint)
    • Line 293: warning: exported method Archive.ReportCheckpointStats should have comment or be unexported (golint)
    • Line 304: warning: exported method Archive.ReportBucketStats should have comment or be unexported (golint)
    • Line 311: warning: exported method Archive.NoteCheckpointFile should have comment or be unexported (golint)
    • Line 317: warning: exported method Archive.NoteExistingBucket should have comment or be unexported (golint)
    • Line 323: warning: exported method Archive.NoteReferencedBucket should have comment or be unexported (golint)
    • Line 334: warning: exported method Archive.CheckCheckpointFilesMissing should have comment or be unexported (golint)
    • Line 350: warning: exported method Archive.CheckBucketsMissing should have comment or be unexported (golint)
    • Line 354: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • Line 363: warning: exported method Archive.ReportMissing should have comment or be unexported (golint)
    • Line 386: warning: should omit 2nd value from range; this loop is equivalent to `for bucket := range ...` (golint)
    • go/services/bifrost/queue/main.go
    • Line 3: warning: exported type AssetCode should have comment or be unexported (golint)
    • Line 6: warning: exported const AssetCodeBTC should have comment (or a comment on this block) or be unexported (golint)
    • Line 10: warning: exported type Transaction should have comment or be unexported (golint)
    • Line 37: warning: exported type SQSFiFo should have comment or be unexported (golint)
    • go/services/bifrost/stress/bitcoin.go
    • Line 19: warning: exported method RandomBitcoinClient.Start should have comment or be unexported (golint)
    • Line 32: warning: receiver name g should be consistent with previous receiver name c for RandomBitcoinClient (golint)
    • Line 39: warning: receiver name g should be consistent with previous receiver name c for RandomBitcoinClient (golint)
    • Line 48: warning: exported method RandomBitcoinClient.GetBlockCount should have comment or be unexported (golint)
    • Line 52: warning: comment on exported method RandomBitcoinClient.GetBlockHash should be of the form "GetBlockHash ..." (golint)
    • Line 65: warning: exported method RandomBitcoinClient.GetBlock should have comment or be unexported (golint)
    • Line 120: warning: receiver name g should be consistent with previous receiver name c for RandomBitcoinClient (golint)
    • Line 145: warning: receiver name g should be consistent with previous receiver name c for RandomBitcoinClient (golint)
    • Line 149: warning: receiver name g should be consistent with previous receiver name c for RandomBitcoinClient (golint)
    • go/tools/xdb-archivist/internal/history_archive_state.go
    • Line 7: warning: exported const NumLevels should have comment or be unexported (golint)
    • Line 9: warning: exported type HistoryArchiveState should have comment or be unexported (golint)
    • Line 23: warning: exported method HistoryArchiveState.LevelSummary should have comment or be unexported (golint)
    • Line 44: warning: exported method HistoryArchiveState.Buckets should have comment or be unexported (golint)
    • Line 59: warning: exported method HistoryArchiveState.Range should have comment or be unexported (golint)
    • go/xdr/main.go
    • Line 60: warning: exported function MarshalBase64 should have comment or be unexported (golint)
    • go/services/bifrost/database/main.go
    • Line 10: warning: exported type Chain should have comment or be unexported (golint)
    • Line 23: warning: exported const ChainBitcoin should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported type Database should have comment or be unexported (golint)
    • Line 53: warning: exported type PostgresDatabase should have comment or be unexported (golint)
    • Line 57: warning: exported type AddressAssociation should have comment or be unexported (golint)
    • go/services/frontier/internal/actions_trade.go
    • Line 17: warning: exported type TradeIndexAction should have comment or be unexported (golint)
    • Line 103: warning: exported type TradeAggregateIndexAction should have comment or be unexported (golint)
    • Line 218: warning: comment on exported type TradeEffectIndexAction should be of the form "TradeEffectIndexAction ..." (with optional leading article) (golint)
    • go/services/frontier/internal/test/http.go
    • Line 12: warning: exported type RequestHelper should have comment or be unexported (golint)
    • Line 21: warning: exported function RequestHelperRemoteAddr should have comment or be unexported (golint)
    • Line 27: warning: exported function RequestHelperXFF should have comment or be unexported (golint)
    • Line 33: warning: exported function RequestHelperRaw should have comment or be unexported (golint)
    • Line 37: warning: exported function RequestHelperStreaming should have comment or be unexported (golint)
    • Line 41: warning: exported function NewRequestHelper should have comment or be unexported (golint)
    • go/services/frontier/internal/db2/history/trade.go
    • Line 64: warning: exported method TradesQ.OrderBy should have comment or be unexported (golint)
    • Line 121: warning: exported method TradesQ.JoinAccounts should have comment or be unexported (golint)
    • Line 128: warning: exported method TradesQ.JoinAssets should have comment or be unexported (golint)
    • Line 191: warning: comment on exported method Q.InsertTrade should be of the form "InsertTrade ..." (golint)
    • Line 264: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go/services/frontier/internal/resource/path.go
    • Line 9: warning: exported method Path.Populate should have comment or be unexported (golint)
    • Line 9: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 54: warning: comment on exported method Path.PagingToken should be of the form "PagingToken ..." (golint)
    • Line 55: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • go/support/log/loggly_hook.go
    • Line 26: warning: exported method LogglyHook.Fire should have comment or be unexported (golint)
    • Line 46: warning: exported method LogglyHook.Flush should have comment or be unexported (golint)
    • Line 50: warning: exported method LogglyHook.Levels should have comment or be unexported (golint)
    • go/services/bifrost/sse/server.go
    • Line 18: warning: exported method Server.BroadcastEvent should have comment or be unexported (golint)
    • Line 90: warning: exported method Server.CreateStream should have comment or be unexported (golint)
    • Line 95: warning: exported method Server.StreamExists should have comment or be unexported (golint)
    • Line 100: warning: exported method Server.HTTPHandler should have comment or be unexported (golint)
    • go/clients/frontier/responses.go
    • Line 9: warning: exported type Problem should have comment or be unexported (golint)
    • Line 18: warning: exported type Root should have comment or be unexported (golint)
    • Line 40: warning: exported type Account should have comment or be unexported (golint)
    • Line 62: warning: exported method Account.GetNativeBalance should have comment or be unexported (golint)
    • Line 72: warning: exported method Account.GetCreditBalance should have comment or be unexported (golint)
    • Line 85: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 95: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 99: warning: exported type AccountFlags should have comment or be unexported (golint)
    • Line 104: warning: exported type AccountThresholds should have comment or be unexported (golint)
    • Line 110: warning: exported type Asset should have comment or be unexported (golint)
    • Line 116: warning: exported type Balance should have comment or be unexported (golint)
    • Line 122: warning: exported type HistoryAccount should have comment or be unexported (golint)
    • Line 128: warning: exported type Ledger should have comment or be unexported (golint)
    • Line 152: warning: exported type Link should have comment or be unexported (golint)
    • Line 157: warning: exported type Offer should have comment or be unexported (golint)
    • Line 173: warning: exported type OrderBookSummary should have comment or be unexported (golint)
    • Line 180: warning: exported type TransactionSuccess should have comment or be unexported (golint)
    • Line 198: warning: exported type Signer should have comment or be unexported (golint)
    • Line 205: warning: exported type OffersPage should have comment or be unexported (golint)
    • Line 216: warning: exported type Payment should have comment or be unexported (golint)
    • Line 246: warning: exported type Price should have comment or be unexported (golint)
    • Line 251: warning: exported type PriceLevel should have comment or be unexported (golint)
    • Line 257: warning: exported type Transaction should have comment or be unexported (golint)
    • go/services/frontier/internal/db2/history/trade_aggregation.go
    • Line 9: warning: should not use dot imports (golint)
    • Line 14: warning: exported var AllowedResolutions should have comment or be unexported (golint)
    • Line 22: warning: comment on exported type TradeAggregation should be of the form "TradeAggregation ..." (with optional leading article) (golint)
    • Line 79: warning: comment on exported method TradeAggregationsQ.GetSql should be of the form "GetSql ..." (golint)
    • go/services/frontier/internal/resource/account.go
    • Line 15: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 79: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 89: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • go/tools/xdb-archivist/internal/dirprefix.go
    • Line 12: warning: exported type DirPrefix should have comment or be unexported (golint)
    • Line 14: warning: exported method DirPrefix.Path should have comment or be unexported (golint)
    • Line 18: warning: exported method DirPrefix.PathPrefix should have comment or be unexported (golint)
    • Line 29: warning: exported function CheckpointPrefix should have comment or be unexported (golint)
    • Line 37: warning: exported function HashPrefix should have comment or be unexported (golint)
    • Line 41: warning: comment on exported function RangePaths should be of the form "RangePaths ..." (golint)
    • go/tools/xdb-archivist/internal/verify.go
    • Line 33: warning: exported type ByHash should have comment or be unexported (golint)
    • Line 47: warning: exported function SortTxsForHash should have comment or be unexported (golint)
    • Line 63: warning: exported function HashTxSet should have comment or be unexported (golint)
    • Line 83: warning: exported function HashEmptyTxSet should have comment or be unexported (golint)
    • Line 87: warning: exported method Archive.VerifyLedgerHeaderHistoryEntry should have comment or be unexported (golint)
    • Line 107: warning: exported method Archive.VerifyTransactionHistoryEntry should have comment or be unexported (golint)
    • Line 118: warning: exported method Archive.VerifyTransactionHistoryResultEntry should have comment or be unexported (golint)
    • Line 129: warning: exported method Archive.VerifyCategoryCheckpoint should have comment or be unexported (golint)
    • Line 205: warning: exported method Archive.VerifyBucketHash should have comment or be unexported (golint)
    • Line 220: warning: exported method Archive.VerifyBucketEntries should have comment or be unexported (golint)
    • Line 271: warning: exported method Archive.ReportInvalid should have comment or be unexported (golint)
    • Line 280: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • go/services/bifrost/sse/mock.go
    • Line 14: warning: exported method MockServer.BroadcastEvent should have comment or be unexported (golint)
    • Line 18: warning: exported method MockServer.StartPublishing should have comment or be unexported (golint)
    • Line 23: warning: exported method MockServer.CreateStream should have comment or be unexported (golint)
    • Line 27: warning: exported method MockServer.StreamExists should have comment or be unexported (golint)
    • Line 32: warning: exported method MockServer.HTTPHandler should have comment or be unexported (golint)
    • go/tools/xdb-archivist/internal/xdrstream.go
    • Line 20: warning: exported type XdrStream should have comment or be unexported (golint)
    • Line 26: warning: exported function NewXdrStream should have comment or be unexported (golint)
    • Line 30: warning: exported function NewXdrGzStream should have comment or be unexported (golint)
    • Line 39: warning: exported method Archive.GetXdrStream should have comment or be unexported (golint)
    • Line 50: warning: exported function HashXdr should have comment or be unexported (golint)
    • Line 60: warning: exported method XdrStream.Close should have comment or be unexported (golint)
    • Line 69: warning: exported method XdrStream.ReadOne should have comment or be unexported (golint)
    • Line 76: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 105: warning: exported function WriteFramedXdr should have comment or be unexported (golint)
    • go/exp/crypto/derivation/main.go
    • Line 31: warning: exported var ErrInvalidPath should have comment or be unexported (golint)
    • Line 37: warning: exported type Key should have comment or be unexported (golint)
    • Line 87: warning: exported method Key.Derive should have comment or be unexported (golint)
    • go/services/bifrost/server/server.go
    • Line 27: warning: exported method Server.Start should have comment or be unexported (golint)
    • Line 132: warning: exported method Server.HandlerEvents should have comment or be unexported (golint)
    • Line 166: warning: exported method Server.HandlerGenerateBitcoinAddress should have comment or be unexported (golint)
    • Line 170: warning: exported method Server.HandlerGenerateEthereumAddress should have comment or be unexported (golint)
    • Line 243: warning: exported method Server.HandlerRecoveryTransaction should have comment or be unexported (golint)
    • go/services/frontier/internal/log/entry.go
    • Line 8: warning: exported type Entry should have comment or be unexported (golint)
    • Line 12: warning: exported method Entry.WithField should have comment or be unexported (golint)
    • Line 16: warning: exported method Entry.WithFields should have comment or be unexported (golint)
    • Line 20: warning: exported method Entry.WithStack should have comment or be unexported (golint)
    • go/keypair/from_address.go
    • Line 19: warning: exported method FromAddress.Address should have comment or be unexported (golint)
    • Line 23: warning: exported method FromAddress.Hint should have comment or be unexported (golint)
    • Line 28: warning: exported method FromAddress.Verify should have comment or be unexported (golint)
    • Line 42: warning: exported method FromAddress.Sign should have comment or be unexported (golint)
    • Line 46: warning: exported method FromAddress.SignDecorated should have comment or be unexported (golint)
    • go/tools/xdb-archivist/internal/mock_archive.go
    • Line 16: warning: exported type MockArchiveBackend should have comment or be unexported (golint)
    • Line 21: warning: exported method MockArchiveBackend.Exists should have comment or be unexported (golint)
    • Line 28: warning: exported method MockArchiveBackend.GetFile should have comment or be unexported (golint)
    • Line 39: warning: exported method MockArchiveBackend.PutFile should have comment or be unexported (golint)
    • Line 50: warning: exported method MockArchiveBackend.ListFiles should have comment or be unexported (golint)
    • Line 56: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • Line 71: warning: exported method MockArchiveBackend.CanListFiles should have comment or be unexported (golint)
    • Line 75: warning: exported function MakeMockBackend should have comment or be unexported (golint)
    • go/services/bifrost/stress/ethereum.go
    • Line 16: warning: exported method RandomEthereumClient.Start should have comment or be unexported (golint)
    • Line 29: warning: receiver name g should be consistent with previous receiver name c for RandomEthereumClient (golint)
    • Line 36: warning: receiver name g should be consistent with previous receiver name c for RandomEthereumClient (golint)
    • Line 45: warning: comment on exported method RandomEthereumClient.NetworkID should be of the form "NetworkID ..." (golint)
    • Line 51: warning: exported method RandomEthereumClient.BlockByNumber should have comment or be unexported (golint)
    • Line 63: warning: receiver name g should be consistent with previous receiver name c for RandomEthereumClient (golint)
    • Line 99: warning: receiver name g should be consistent with previous receiver name c for RandomEthereumClient (golint)
    • Line 114: warning: receiver name g should be consistent with previous receiver name c for RandomEthereumClient (golint)
    • go/services/bifrost/bitcoin/main.go
    • Line 39: warning: exported type Client should have comment or be unexported (golint)
    • Line 56: warning: exported type TransactionHandler should have comment or be unexported (golint)
    • Line 58: warning: exported type Transaction should have comment or be unexported (golint)
    • Line 66: warning: exported type AddressGenerator should have comment or be unexported (golint)
    • Line 71: warning: exported function BtcToSat should have comment or be unexported (golint)
    • go/tools/xdb-archivist/main.go
    • Line 35: warning: exported type Options should have comment or be unexported (golint)
    • Line 44: warning: exported method Options.SetRange should have comment or be unexported (golint)
    • Line 60: warning: exported method Options.MaybeProfile should have comment or be unexported (golint)
    • go/services/frontier/internal/resource/effects/base.go
    • Line 11: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 16: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 28: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • go/tools/xdb-archivist/internal/archive.go
    • Line 24: warning: exported type CommandOptions should have comment or be unexported (golint)
    • Line 33: warning: exported type ConnectOptions should have comment or be unexported (golint)
    • Line 38: warning: exported type ArchiveBackend should have comment or be unexported (golint)
    • Line 46: warning: exported type Archive should have comment or be unexported (golint)
    • Line 69: warning: exported method Archive.GetPathHAS should have comment or be unexported (golint)
    • Line 81: warning: exported method Archive.PutPathHAS should have comment or be unexported (golint)
    • Line 94: warning: exported method Archive.BucketExists should have comment or be unexported (golint)
    • Line 98: warning: exported method Archive.CategoryCheckpointExists should have comment or be unexported (golint)
    • Line 102: warning: exported method Archive.GetRootHAS should have comment or be unexported (golint)
    • Line 106: warning: exported method Archive.GetCheckpointHAS should have comment or be unexported (golint)
    • Line 110: warning: exported method Archive.PutCheckpointHAS should have comment or be unexported (golint)
    • Line 114: warning: exported method Archive.PutRootHAS should have comment or be unexported (golint)
    • Line 122: warning: exported method Archive.ListBucket should have comment or be unexported (golint)
    • Line 126: warning: exported method Archive.ListAllBuckets should have comment or be unexported (golint)
    • Line 130: warning: exported method Archive.ListAllBucketHashes should have comment or be unexported (golint)
    • Line 147: warning: exported method Archive.ListCategoryCheckpoints should have comment or be unexported (golint)
    • Line 172: warning: exported function Connect should have comment or be unexported (golint)
    • Line 211: warning: exported function MustConnect should have comment or be unexported (golint)
    • go/services/bifrost/common/main.go
    • Line 7: warning: exported const StellarAmountPrecision should have comment or be unexported (golint)
    • Line 9: warning: exported function CreateLogger should have comment or be unexported (golint)
    • go/tools/xdb-archivist/internal/hash.go
    • Line 14: warning: exported type Hash should have comment or be unexported (golint)
    • Line 16: warning: exported function DecodeHash should have comment or be unexported (golint)
    • Line 23: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 27: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 36: warning: exported function MustDecodeHash should have comment or be unexported (golint)
    • Line 44: warning: exported function EmptyXdrArrayHash should have comment or be unexported (golint)
    • Line 51: warning: exported method Hash.IsZero should have comment or be unexported (golint)
    • go/tools/xdb-archivist/internal/range.go
    • Line 13: warning: exported const CheckpointFreq should have comment or be unexported (golint)
    • Line 15: warning: exported type Range should have comment or be unexported (golint)
    • Line 20: warning: exported function PrevCheckpoint should have comment or be unexported (golint)
    • Line 28: warning: exported function NextCheckpoint should have comment or be unexported (golint)
    • Line 41: warning: exported function MakeRange should have comment or be unexported (golint)
    • Line 51: warning: exported method Range.Clamp should have comment or be unexported (golint)
    • Line 67: warning: exported method Range.Checkpoints should have comment or be unexported (golint)
    • Line 78: warning: exported method Range.Size should have comment or be unexported (golint)
    • Line 82: warning: exported method Range.CollapsedString should have comment or be unexported (golint)
    • Line 85: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 90: warning: exported type ByUint32 should have comment or be unexported (golint)
    • go/tools/xdb-archivist/internal/s3_archive.go
    • Line 17: warning: exported type S3ArchiveBackend should have comment or be unexported (golint)
    • Line 23: warning: exported method S3ArchiveBackend.GetFile should have comment or be unexported (golint)
    • Line 35: warning: exported method S3ArchiveBackend.Exists should have comment or be unexported (golint)
    • Line 44: warning: exported method S3ArchiveBackend.PutFile should have comment or be unexported (golint)
    • Line 62: warning: exported method S3ArchiveBackend.ListFiles should have comment or be unexported (golint)
    • Line 100: warning: exported method S3ArchiveBackend.CanListFiles should have comment or be unexported (golint)
    • Line 104: warning: exported function MakeS3Backend should have comment or be unexported (golint)
    • go/services/frontier/internal/resource/offer.go
    • Line 12: warning: exported method Offer.Populate should have comment or be unexported (golint)
    • Line 12: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 37: warning: exported method Offer.PagingToken should have comment or be unexported (golint)
    • Line 37: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • go/services/frontier/internal/log/main.go
    • Line 13: warning: exported var DefaultLogger should have comment or be unexported (golint)
    • Line 14: warning: exported var DefaultMetrics should have comment or be unexported (golint)
    • Line 17: warning: exported const PanicLevel should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: exported type F should have comment or be unexported (golint)
    • Line 46: warning: comment on exported function FromContext should be of the form "FromContext ..." (golint)
    • Line 51: warning: comment on exported function Ctx should be of the form "Ctx ..." (golint)
    • Line 72: warning: exported function WithField should have comment or be unexported (golint)
    • Line 77: warning: exported function WithFields should have comment or be unexported (golint)
    • Line 81: warning: exported function WithStack should have comment or be unexported (golint)
    • go/services/frontier/internal/resource/ledger.go
    • Line 14: warning: exported method Ledger.Populate should have comment or be unexported (golint)
    • Line 14: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 47: warning: exported method Ledger.PagingToken should have comment or be unexported (golint)
    • Line 47: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • go/tools/xdb-archivist/internal/util.go
    • Line 54: warning: exported function Categories 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 70: warning: exported function CategoryCheckpointPath should have comment or be unexported (golint)
    • Line 76: warning: exported function BucketPath should have comment or be unexported (golint)
    • go/tools/xdb-archivist/internal/fs_archive.go
    • Line 14: warning: exported type FsArchiveBackend should have comment or be unexported (golint)
    • Line 18: warning: exported method FsArchiveBackend.GetFile should have comment or be unexported (golint)
    • Line 22: warning: exported method FsArchiveBackend.Exists should have comment or be unexported (golint)
    • Line 31: warning: exported method FsArchiveBackend.PutFile should have comment or be unexported (golint)
    • Line 50: warning: exported method FsArchiveBackend.ListFiles should have comment or be unexported (golint)
    • Line 71: warning: exported method FsArchiveBackend.CanListFiles should have comment or be unexported (golint)
    • Line 75: warning: exported function MakeFsBackend should have comment or be unexported (golint)
    • go/keypair/full.go
    • Line 11: warning: exported type Full should have comment or be unexported (golint)
    • Line 15: warning: exported method Full.Address should have comment or be unexported (golint)
    • Line 19: warning: exported method Full.Hint should have comment or be unexported (golint)
    • Line 24: warning: exported method Full.Seed should have comment or be unexported (golint)
    • Line 28: warning: exported method Full.Verify should have comment or be unexported (golint)
    • Line 42: warning: exported method Full.Sign should have comment or be unexported (golint)
    • Line 47: warning: exported method Full.SignDecorated should have comment or be unexported (golint)
    • go/services/bifrost/ethereum/main.go
    • Line 38: warning: exported type Client should have comment or be unexported (golint)
    • Line 54: warning: exported type TransactionHandler should have comment or be unexported (golint)
    • Line 56: warning: exported type Transaction should have comment or be unexported (golint)
    • Line 63: warning: exported type AddressGenerator should have comment or be unexported (golint)
    • Line 67: warning: exported function EthToWei should have comment or be unexported (golint)
    • go/services/bifrost/sse/main.go
    • Line 15: warning: exported const TransactionReceivedAddressEvent should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type Server should have comment or be unexported (golint)
    • Line 29: warning: exported type ServerInterface should have comment or be unexported (golint)
    • Line 37: warning: exported type Event should have comment or be unexported (golint)
    • go/services/bifrost/database/mock.go
    • Line 12: warning: exported method MockDatabase.CreateAddressAssociation should have comment or be unexported (golint)
    • Line 17: warning: exported method MockDatabase.GetAssociationByChainAddress should have comment or be unexported (golint)
    • Line 25: warning: exported method MockDatabase.GetAssociationByStellarPublicKey should have comment or be unexported (golint)
    • Line 30: warning: exported method MockDatabase.AddProcessedTransaction should have comment or be unexported (golint)
    • Line 35: warning: exported method MockDatabase.IncrementAddressIndex should have comment or be unexported (golint)
    • Line 40: warning: exported method MockDatabase.ResetBlockCounters should have comment or be unexported (golint)
    • Line 45: warning: exported method MockDatabase.AddRecoveryTransaction should have comment or be unexported (golint)
    • go/protocols/federation/main.go
    • Line 28: warning: exported method Memo.MarshalJSON should have comment or be unexported (golint)
    • Line 37: warning: exported method Memo.UnmarshalJSON should have comment or be unexported (golint)
    • go/support/log/main.go
    • Line 19: warning: exported const PanicLevel should have comment (or a comment on this block) or be unexported (golint)
    • Line 101: warning: exported function SetLevel should have comment or be unexported (golint)
    • Line 105: warning: exported function WithField should have comment or be unexported (golint)
    • Line 110: warning: exported function WithFields should have comment or be unexported (golint)
    • Line 114: warning: exported function WithStack should have comment or be unexported (golint)
    • go/services/frontier/internal/resource/balance.go
    • Line 11: warning: exported method Balance.Populate should have comment or be unexported (golint)
    • Line 11: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 24: warning: exported method Balance.PopulateNative should have comment or be unexported (golint)
    • Line 24: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • go/services/frontier/internal/resource/order_book_summary.go
    • Line 9: warning: exported method OrderBookSummary.Populate should have comment or be unexported (golint)
    • Line 9: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 31: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • go/services/frontier/internal/txsub/errors.go
    • Line 12: warning: exported var ErrNoResults should have comment or be unexported (golint)
    • Line 35: warning: exported method FailedTransactionError.Result should have comment or be unexported (golint)
    • Line 35: warning: receiver name fte should be consistent with previous receiver name err for FailedTransactionError (golint)
    • Line 40: warning: exported method FailedTransactionError.TransactionResultCode should have comment or be unexported (golint)
    • Line 40: warning: receiver name fte should be consistent with previous receiver name err for FailedTransactionError (golint)
    • Line 50: warning: exported method FailedTransactionError.OperationResultCodes should have comment or be unexported (golint)
    • Line 50: warning: receiver name fte should be consistent with previous receiver name err for FailedTransactionError (golint)
    • go/services/bifrost/stress/main.go
    • Line 44: warning: exported type UserState should have comment or be unexported (golint)
    • Line 47: warning: exported const PendingUserState should have comment (or a comment on this block) or be unexported (golint)
    • Line 72: warning: exported type User should have comment or be unexported (golint)
    • go/clients/frontier/main.go
    • Line 45: warning: exported const OrderAsc should have comment (or a comment on this block) or be unexported (golint)
    • Line 72: warning: exported type ClientInterface should have comment or be unexported (golint)
    • go/services/frontier/internal/resource/signer.go
    • Line 10: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 19: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • go/services/frontier/internal/resource/operations/base.go
    • Line 13: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 18: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 39: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • go/services/frontier/internal/resource/effects/main.go
    • Line 10: warning: exported var TypeNames should have comment or be unexported (golint)
    • Line 139: warning: exported type AccountCreated should have comment or be unexported (golint)
    • Line 144: warning: exported type AccountCredited should have comment or be unexported (golint)
    • Line 150: warning: exported type AccountDebited should have comment or be unexported (golint)
    • Line 156: warning: exported type AccountThresholdsUpdated should have comment or be unexported (golint)
    • Line 163: warning: exported type AccountHomeDomainUpdated should have comment or be unexported (golint)
    • Line 168: warning: exported type AccountFlagsUpdated should have comment or be unexported (golint)
    • Line 174: warning: exported type SignerCreated should have comment or be unexported (golint)
    • Line 181: warning: exported type SignerRemoved should have comment or be unexported (golint)
    • Line 188: warning: exported type SignerUpdated should have comment or be unexported (golint)
    • Line 195: warning: exported type TrustlineCreated should have comment or be unexported (golint)
    • Line 201: warning: exported type TrustlineRemoved should have comment or be unexported (golint)
    • Line 207: warning: exported type TrustlineUpdated should have comment or be unexported (golint)
    • Line 213: warning: exported type TrustlineAuthorized should have comment or be unexported (golint)
    • Line 220: warning: exported type TrustlineDeauthorized should have comment or be unexported (golint)
    • Line 227: warning: exported type Trade should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell95%

Misspell Finds commonly misspelled English words

    • go/xdr/xdr_generated.go
    • Line 2907: warning: "successfuly" is a misspelling of "successfully" (misspell)
    • Line 3839: warning: "transfered" is a misspelling of "transferred" (misspell)
    • Line 4710: warning: "occured" is a misspelling of "occurred" (misspell)