Preparing report...

Report for github.com/mysteriumnetwork/payments

(v1.0.0)

A+    Excellent!    Found 25 issues across 64 files

Tweet

gofmt95%

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.


golint68%

Golint is a linter for Go source code.

    • transfer/gas/matic.go
    • Line 44: warning: exported method MaticStation.GetAverageGasPrice should have comment or be unexported (golint)
    • Line 52: warning: exported method MaticStation.GetLowGasPrice should have comment or be unexported (golint)
    • Line 60: warning: exported method MaticStation.GetFastGasPrice should have comment or be unexported (golint)
    • client/bc.go
    • Line 31: warning: exported type BC should have comment or be unexported (golint)
    • Line 209: warning: exported type DefaultEthClientGetter should have comment or be unexported (golint)
    • Line 214: warning: exported function NewDefaultEthClientGetter should have comment or be unexported (golint)
    • Line 220: warning: exported method DefaultEthClientGetter.Client should have comment or be unexported (golint)
    • Line 224: warning: exported type DefaultAddressableEthClientGetter should have comment or be unexported (golint)
    • Line 229: warning: exported function NewDefaultAddressableEthClientGetter should have comment or be unexported (golint)
    • Line 238: warning: exported method DefaultAddressableEthClientGetter.Address should have comment or be unexported (golint)
    • merkle/tree.go
    • Line 267: warning: receiver name t should be consistent with previous receiver name tree for Tree (golint)
    • crypto/beneficiary.go
    • Line 42: warning: exported function CreateBeneficiaryRequest should have comment or be unexported (golint)
    • Line 77: warning: exported function NewBeneficiaryRequest should have comment or be unexported (golint)
    • crypto/payandsettle.go
    • Line 13: warning: exported type PayAndSettleBeneficiaryPayload should have comment or be unexported (golint)
    • Line 22: warning: exported function NewPayAndSettleBeneficiaryPayload should have comment or be unexported (golint)
    • Line 48: warning: exported method PayAndSettleBeneficiaryPayload.Sign should have comment or be unexported (golint)
    • transfer/gas/eth.go
    • Line 55: warning: exported method EthStation.GetAverageGasPrice should have comment or be unexported (golint)
    • Line 63: warning: exported method EthStation.GetLowGasPrice should have comment or be unexported (golint)
    • Line 71: warning: exported method EthStation.GetFastGasPrice should have comment or be unexported (golint)
    • client/client.go
    • Line 206: warning: comment on exported method Blockchain.GetProvidersWithdrawalChannel should be of the form "GetProvidersWithdrawalChannel ..." (golint)
    • Line 232: warning: exported method Blockchain.TransactionByHash should have comment or be unexported (golint)
    • Line 238: warning: exported method Blockchain.TransactionReceipt should have comment or be unexported (golint)
    • Line 612: warning: exported method Blockchain.GetBeneficiary should have comment or be unexported (golint)
    • Line 747: warning: exported function ToBytes32 should have comment or be unexported (golint)
    • Line 988: warning: exported method Blockchain.IsChannelOpened should have comment or be unexported (golint)
    • Line 1104: warning: exported method Blockchain.SuggestGasPrice should have comment or be unexported (golint)
    • Line 1244: warning: exported type RewarderUpdateRoot should have comment or be unexported (golint)
    • Line 1252: warning: exported method Blockchain.RewarderUpdateRoot should have comment or be unexported (golint)
    • Line 1280: warning: exported type RewarderAirDrop should have comment or be unexported (golint)
    • Line 1287: warning: exported method Blockchain.RewarderAirDrop should have comment or be unexported (golint)
    • Line 1314: warning: exported method Blockchain.RewarderTotalPayoutsFor should have comment or be unexported (golint)
    • Line 1343: warning: exported type CustodyTokensTransfer should have comment or be unexported (golint)
    • Line 1350: warning: exported method Blockchain.CustodyTransferTokens should have comment or be unexported (golint)
    • client/with_dry_runs.go
    • Line 32: warning: exported type Estimatable should have comment or be unexported (golint)
    • Line 75: warning: exported method WithDryRuns.GetHermessAvailableBalance should have comment or be unexported (golint)
    • Line 79: warning: exported method WithDryRuns.TransferEth should have comment or be unexported (golint)
    • Line 84: warning: exported method WithDryRuns.Estimate should have comment or be unexported (golint)
    • Line 279: warning: exported method WithDryRuns.PayAndSettle should have comment or be unexported (golint)
    • Line 287: warning: exported method WithDryRuns.GetBeneficiary should have comment or be unexported (golint)
    • Line 291: warning: exported method WithDryRuns.SuggestGasPrice should have comment or be unexported (golint)
    • Line 313: warning: exported method WithDryRuns.GetLastRegistryNonce should have comment or be unexported (golint)
    • Line 317: warning: exported method WithDryRuns.TransactionReceipt should have comment or be unexported (golint)
    • Line 321: warning: exported method WithDryRuns.FilterLogs should have comment or be unexported (golint)
    • Line 325: warning: exported method WithDryRuns.HeaderByNumber should have comment or be unexported (golint)
    • Line 329: warning: exported method WithDryRuns.SendTransaction should have comment or be unexported (golint)
    • Line 333: warning: exported method WithDryRuns.IsHermesActive should have comment or be unexported (golint)
    • Line 337: warning: exported method WithDryRuns.GetHermes should have comment or be unexported (golint)
    • Line 341: warning: exported method WithDryRuns.GetChannelImplementationByVersion should have comment or be unexported (golint)
    • Line 345: warning: exported method WithDryRuns.IsChannelOpened should have comment or be unexported (golint)
    • Line 349: warning: exported method WithDryRuns.TransactionByHash should have comment or be unexported (golint)
    • Line 353: warning: exported method WithDryRuns.RewarderTotalPayoutsFor should have comment or be unexported (golint)
    • Line 357: warning: exported method WithDryRuns.RewarderAirDrop should have comment or be unexported (golint)
    • Line 361: warning: exported method WithDryRuns.RewarderUpdateRoot should have comment or be unexported (golint)
    • Line 370: warning: exported method WithDryRuns.CustodyTransferTokens should have comment or be unexported (golint)
    • Line 374: warning: exported method WithDryRuns.GetProvidersWithdrawalChannel should have comment or be unexported (golint)
    • Line 378: warning: exported method WithDryRuns.SubscribeToWithdrawalPromiseSettledEvent should have comment or be unexported (golint)
    • crypto/signed_identity.go
    • Line 27: warning: exported type SignedIdentityRequest should have comment or be unexported (golint)
    • Line 32: warning: exported function CreateSignedIdentityRequest should have comment or be unexported (golint)
    • Line 50: warning: exported method SignedIdentityRequest.RecoverSigner should have comment or be unexported (golint)
    • transfer/gas/multichain_station.go
    • Line 12: warning: exported method MultichainStation.GetAveragePrice should have comment or be unexported (golint)
    • Line 21: warning: exported method MultichainStation.GetFastPrice should have comment or be unexported (golint)
    • Line 30: warning: exported method MultichainStation.GetLowPrice should have comment or be unexported (golint)
    • transfer/gas/static.go
    • Line 10: warning: exported function NewStaticStation should have comment or be unexported (golint)
    • Line 14: warning: exported method StaticStation.GetAverageGasPrice should have comment or be unexported (golint)
    • Line 18: warning: exported method StaticStation.GetFastGasPrice should have comment or be unexported (golint)
    • Line 22: warning: exported method StaticStation.GetLowGasPrice should have comment or be unexported (golint)
    • crypto/crypto.go
    • Line 84: warning: exported type ProviderChannelType should have comment or be unexported (golint)
    • Line 87: warning: exported const ProviderChannelTypeDefault should have comment (or a comment on this block) or be unexported (golint)
    • crypto/message.go
    • Line 47: warning: exported function CreateExchangeMessageWithPromise should have comment or be unexported (golint)
    • crypto/referral.go
    • Line 29: warning: exported type ReferralTokenRequest should have comment or be unexported (golint)
    • Line 34: warning: comment on exported function CreateReferralTokenRequest should be of the form "CreateReferralTokenRequest ..." (golint)
    • Line 52: warning: exported method ReferralTokenRequest.IsValid should have comment or be unexported (golint)
    • crypto/exit.go
    • Line 30: warning: exported const ExitPrefix should have comment or be unexported (golint)
    • Line 32: warning: exported type ExitRequest should have comment or be unexported (golint)
    • Line 39: warning: exported function NewExitRequest should have comment or be unexported (golint)
    • Line 48: warning: exported method ExitRequest.GetMessage should have comment or be unexported (golint)
    • Line 57: warning: exported method ExitRequest.RecoverSigner should have comment or be unexported (golint)
    • Line 69: warning: exported method ExitRequest.CreateSignature should have comment or be unexported (golint)
    • Line 78: warning: exported method ExitRequest.Sign should have comment or be unexported (golint)
    • client/multichain_client.go
    • Line 30: warning: exported type MultichainBlockchainClient should have comment or be unexported (golint)
    • Line 34: warning: exported function NewMultichainBlockchainClient should have comment or be unexported (golint)
    • Line 40: warning: exported var ErrUnknownChain should have comment or be unexported (golint)
    • Line 49: warning: exported method MultichainBlockchainClient.GetHermesFee should have comment or be unexported (golint)
    • Line 58: warning: exported method MultichainBlockchainClient.CalculateHermesFee should have comment or be unexported (golint)
    • Line 67: warning: exported method MultichainBlockchainClient.IsRegisteredAsProvider should have comment or be unexported (golint)
    • Line 76: warning: exported method MultichainBlockchainClient.GetProviderChannel should have comment or be unexported (golint)
    • Line 85: warning: exported method MultichainBlockchainClient.IsRegistered should have comment or be unexported (golint)
    • Line 94: warning: exported method MultichainBlockchainClient.SubscribeToPromiseSettledEvent should have comment or be unexported (golint)
    • Line 103: warning: exported method MultichainBlockchainClient.GetMystBalance should have comment or be unexported (golint)
    • Line 112: warning: exported method MultichainBlockchainClient.SubscribeToConsumerBalanceEvent should have comment or be unexported (golint)
    • Line 121: warning: exported method MultichainBlockchainClient.SubscribeToIdentityRegistrationEvents should have comment or be unexported (golint)
    • Line 130: warning: exported method MultichainBlockchainClient.SuggestGasPrice should have comment or be unexported (golint)
    • Line 138: warning: exported method MultichainBlockchainClient.FilterPromiseSettledEventByChannelID should have comment or be unexported (golint)
    • Line 147: warning: exported method MultichainBlockchainClient.SubscribeToConsumerChannelBalanceUpdate should have comment or be unexported (golint)
    • Line 155: warning: exported method MultichainBlockchainClient.SubscribeToPromiseSettledEventByChannelID should have comment or be unexported (golint)
    • Line 164: warning: exported method MultichainBlockchainClient.SubscribeToMystTokenTransfers should have comment or be unexported (golint)
    • Line 173: warning: exported method MultichainBlockchainClient.RegisterIdentity should have comment or be unexported (golint)
    • Line 182: warning: exported method MultichainBlockchainClient.TransferMyst should have comment or be unexported (golint)
    • Line 191: warning: exported method MultichainBlockchainClient.IsHermesRegistered should have comment or be unexported (golint)
    • Line 200: warning: exported method MultichainBlockchainClient.GetHermesOperator should have comment or be unexported (golint)
    • Line 209: warning: exported method MultichainBlockchainClient.SettleAndRebalance should have comment or be unexported (golint)
    • Line 218: warning: exported method MultichainBlockchainClient.GetLastRegistryNonce should have comment or be unexported (golint)
    • Line 226: warning: exported method MultichainBlockchainClient.GetBeneficiary should have comment or be unexported (golint)
    • Line 235: warning: exported method MultichainBlockchainClient.SettleWithBeneficiary should have comment or be unexported (golint)
    • Line 244: warning: exported method MultichainBlockchainClient.GetConsumerChannelsHermes should have comment or be unexported (golint)
    • Line 253: warning: exported method MultichainBlockchainClient.GetConsumerChannelOperator should have comment or be unexported (golint)
    • Line 262: warning: exported method MultichainBlockchainClient.GetProviderChannelByID should have comment or be unexported (golint)
    • Line 271: warning: exported method MultichainBlockchainClient.SettlePromise should have comment or be unexported (golint)
    • Line 290: warning: exported method MultichainBlockchainClient.GetConsumerChannel should have comment or be unexported (golint)
    • Line 299: warning: exported method MultichainBlockchainClient.GetEthBalance should have comment or be unexported (golint)
    • Line 308: warning: exported method MultichainBlockchainClient.TransactionReceipt should have comment or be unexported (golint)
    • Line 316: warning: exported method MultichainBlockchainClient.TransferEth should have comment or be unexported (golint)
    • Line 325: warning: exported method MultichainBlockchainClient.GetHermessAvailableBalance should have comment or be unexported (golint)
    • Line 334: warning: exported method MultichainBlockchainClient.DecreaseProviderStake should have comment or be unexported (golint)
    • Line 343: warning: exported method MultichainBlockchainClient.SettleIntoStake should have comment or be unexported (golint)
    • Line 352: warning: exported method MultichainBlockchainClient.IncreaseProviderStake should have comment or be unexported (golint)
    • Line 361: warning: exported method MultichainBlockchainClient.GetHermesURL should have comment or be unexported (golint)
    • Line 380: warning: exported method MultichainBlockchainClient.GetHermes should have comment or be unexported (golint)
    • Line 389: warning: exported method MultichainBlockchainClient.GetChannelImplementationByVersion should have comment or be unexported (golint)
    • Line 398: warning: exported method MultichainBlockchainClient.IsChannelOpened should have comment or be unexported (golint)
    • Line 426: warning: exported method MultichainBlockchainClient.SendTransaction should have comment or be unexported (golint)
    • Line 434: warning: exported method MultichainBlockchainClient.IsHermesActive should have comment or be unexported (golint)
    • Line 442: warning: exported method MultichainBlockchainClient.PayAndSettle should have comment or be unexported (golint)
    • Line 450: warning: exported method MultichainBlockchainClient.TransactionByHash should have comment or be unexported (golint)
    • Line 458: warning: exported method MultichainBlockchainClient.RewarderTotalPayoutsFor should have comment or be unexported (golint)
    • Line 466: warning: exported method MultichainBlockchainClient.RewarderAirDrop should have comment or be unexported (golint)
    • Line 474: warning: exported method MultichainBlockchainClient.RewarderUpdateRoot should have comment or be unexported (golint)
    • Line 491: warning: exported method MultichainBlockchainClient.CustodyTransferTokens should have comment or be unexported (golint)
    • Line 499: warning: exported method MultichainBlockchainClient.GetProvidersWithdrawalChannel should have comment or be unexported (golint)
    • Line 507: warning: exported method MultichainBlockchainClient.SubscribeToWithdrawalPromiseSettledEvent should have comment or be unexported (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!