Preparing report...

Report for github.com/celestiaorg/quantum-gravity-bridge

(v1.0.3)

A+    Excellent!    Found 30 issues across 48 files

Tweet

gofmt97%

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!


gocyclo95%

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.

    • cmd/peggo/keys.go
    • Line 169: warning: cyclomatic complexity 30 of function initEthereumAccountsManager() is high (> 15) (gocyclo)
    • Line 40: warning: cyclomatic complexity 21 of function initCosmosKeyring() is high (> 15) (gocyclo)

golint41%

Golint is a linter for Go source code.

    • orchestrator/orchestrator.go
    • Line 19: warning: exported type PeggyOrchestrator should have comment or be unexported (golint)
    • Line 48: warning: exported function NewPeggyOrchestrator should have comment or be unexported (golint)
    • orchestrator/metrics/metrics.go
    • Line 12: warning: exported function ReportFuncError should have comment or be unexported (golint)
    • Line 17: warning: exported function ReportClosureFuncError should have comment or be unexported (golint)
    • Line 21: warning: exported function ReportFuncStatus should have comment or be unexported (golint)
    • Line 26: warning: exported function ReportClosureFuncStatus should have comment or be unexported (golint)
    • Line 30: warning: exported function ReportFuncCall should have comment or be unexported (golint)
    • Line 35: warning: exported function ReportClosureFuncCall should have comment or be unexported (golint)
    • Line 50: warning: exported type StopTimerFunc should have comment or be unexported (golint)
    • Line 52: warning: exported function ReportFuncTiming should have comment or be unexported (golint)
    • Line 88: warning: exported function ReportClosureFuncTiming should have comment or be unexported (golint)
    • Line 131: warning: exported type Tags should have comment or be unexported (golint)
    • Line 133: warning: exported method Tags.With should have comment or be unexported (golint)
    • orchestrator/ethereum/peggy/peggy_contract.go
    • Line 22: warning: exported type PeggyContract should have comment or be unexported (golint)
    • Line 72: warning: exported function NewPeggyContract should have comment or be unexported (golint)
    • Line 144: warning: exported var ErrInsufficientVotingPowerToPass should have comment or be unexported (golint)
    • orchestrator/ethereum/keystore/keystore.go
    • Line 21: warning: exported type PersonalSignFn should have comment or be unexported (golint)
    • Line 23: warning: exported type SignerFn should have comment or be unexported (golint)
    • Line 25: warning: exported type EthKeyStore should have comment or be unexported (golint)
    • Line 36: warning: exported function New should have comment or be unexported (golint)
    • Line 163: warning: exported type WalletSpec should have comment or be unexported (golint)
    • Line 170: warning: exported method WalletSpec.AddressFromHex should have comment or be unexported (golint)
    • Line 174: warning: exported function PrivateKeyPersonalSignFn should have comment or be unexported (golint)
    • test/peggo/peggy_contract_test.go
    • Line 183: warning: don't use underscores in Go names; var state_powerThreshold should be statePowerThreshold (golint)
    • Line 196: warning: don't use underscores in Go names; var state_peggyId should be statePeggyID (golint)
    • Line 209: warning: don't use underscores in Go names; var state_lastValsetCheckpoint should be stateLastValsetCheckpoint (golint)
    • Line 262: warning: don't use underscores in Go names; var state_lastValsetNonce should be stateLastValsetNonce (golint)
    • Line 357: warning: don't use underscores in Go names; var state_lastValsetCheckpoint should be stateLastValsetCheckpoint (golint)
    • Line 454: warning: don't use underscores in Go names; var state_lastValsetCheckpoint should be stateLastValsetCheckpoint (golint)
    • Line 495: warning: don't use underscores in Go names; var state_lastValsetNonce should be stateLastValsetNonce (golint)
    • Line 496: warning: don't use underscores in Go names; var state_lastEventNonce should be stateLastEventNonce (golint)
    • orchestrator/metrics/client.go
    • Line 16: warning: exported type StatterConfig should have comment or be unexported (golint)
    • Line 23: warning: exported method StatterConfig.BaseTags should have comment or be unexported (golint)
    • Line 36: warning: exported type Statter should have comment or be unexported (golint)
    • Line 46: warning: exported function Close should have comment or be unexported (golint)
    • Line 55: warning: exported function Disable should have comment or be unexported (golint)
    • Line 62: warning: exported function Init should have comment or be unexported (golint)
    • orchestrator/ethereum/provider/provider.go
    • Line 19: warning: exported type EVMProvider should have comment or be unexported (golint)
    • Line 33: warning: exported type EVMProviderWithRet should have comment or be unexported (golint)
    • Line 45: warning: exported function NewEVMProvider should have comment or be unexported (golint)
    • Line 65: warning: exported type TransactFunc should have comment or be unexported (golint)
    • Line 67: warning: exported function TransactFn should have comment or be unexported (golint)
    • orchestrator/relayer/find_latest_valset.go
    • Line 70: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 113: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • Line 115: warning: exported type PeggyValsetUpdatedEvents should have comment or be unexported (golint)
    • Line 173: warning: exported type BridgeValidators should have comment or be unexported (golint)
    • orchestrator/cosmos/query.go
    • Line 14: warning: exported type PeggyQueryClient should have comment or be unexported (golint)
    • Line 30: warning: exported function NewPeggyQueryClient should have comment or be unexported (golint)
    • Line 46: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • orchestrator/ethereum/util/peggy.go
    • Line 22: warning: exported const ETHContractAddressLen should have comment (or a comment on this block) or be unexported (golint)
    • Line 50: warning: exported type ERC20Token should have comment or be unexported (golint)
    • test/peggo/constants.go
    • Line 104: warning: comment on exported var EthAccounts should be of the form "EthAccounts ..." (golint)
    • Line 120: warning: exported var CosmosAccounts should have comment or be unexported (golint)
    • Line 164: warning: exported type Account should have comment or be unexported (golint)
    • Line 176: warning: exported method Account.Parse should have comment or be unexported (golint)
    • orchestrator/ethereum/committer/committer.go
    • Line 27: warning: exported type EVMCommitterOption should have comment or be unexported (golint)
    • Line 55: warning: exported function OptionGasPriceFromString should have comment or be unexported (golint)
    • Line 68: warning: exported function OptionGasPriceFromDecimal should have comment or be unexported (golint)
    • Line 75: warning: exported function OptionGasPriceFromBigInt should have comment or be unexported (golint)
    • Line 82: warning: exported function OptionGasLimit should have comment or be unexported (golint)
    • Line 89: warning: exported function TxBroadcastTimeout should have comment or be unexported (golint)
    • orchestrator/cosmos/broadcast.go
    • Line 23: warning: exported type PeggyBroadcastClient should have comment or be unexported (golint)
    • Line 75: warning: exported function NewPeggyBroadcastClient should have comment or be unexported (golint)
    • Line 267: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 302: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 348: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • orchestrator/ethereum/util/contract.go
    • Line 15: warning: exported type Contract should have comment or be unexported (golint)
    • Line 25: warning: exported type TransactFunc should have comment or be unexported (golint)
    • Line 27: warning: exported type BoundContract should have comment or be unexported (golint)
    • Line 37: warning: exported function BindContract should have comment or be unexported (golint)
    • Line 58: warning: exported method BoundContract.SetTransact should have comment or be unexported (golint)
    • Line 62: warning: exported method BoundContract.SetClient should have comment or be unexported (golint)
    • Line 68: warning: exported method BoundContract.Client should have comment or be unexported (golint)
    • Line 72: warning: exported method BoundContract.Address should have comment or be unexported (golint)
    • Line 76: warning: exported method BoundContract.SetAddress should have comment or be unexported (golint)
    • Line 82: warning: exported method BoundContract.Source should have comment or be unexported (golint)
    • Line 86: warning: exported method BoundContract.ABI should have comment or be unexported (golint)
    • Line 90: warning: exported method BoundContract.DeployContract should have comment or be unexported (golint)
    • Line 90: warning: receiver name c should be consistent with previous receiver name contract for BoundContract (golint)
    • Line 94: warning: exported method BoundContract.Transact should have comment or be unexported (golint)
    • Line 94: warning: receiver name c should be consistent with previous receiver name contract for BoundContract (golint)
    • Line 105: warning: exported method BoundContract.Transfer should have comment or be unexported (golint)
    • Line 105: warning: receiver name c should be consistent with previous receiver name contract for BoundContract (golint)
    • orchestrator/coingecko/coingecko.go
    • Line 30: warning: exported type CoingeckoPriceFeed should have comment or be unexported (golint)
    • Line 40: warning: exported type Config should have comment or be unexported (golint)
    • Line 54: warning: exported method CoingeckoPriceFeed.QueryUSDPrice should have comment or be unexported (golint)
    • Line 134: warning: exported method CoingeckoPriceFeed.CheckFeeThreshod should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell89%

Misspell Finds commonly misspelled English words