Preparing report...

Report for github.com/BANKEX/plasma-research

A+    Excellent!    Found 26 issues across 35 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!


gocyclo97%

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.


golint25%

Golint is a linter for Go source code.

    • plasma-research/src/node/plasmautils/plasmacrypto/hash.go
    • Line 9: warning: exported const HashSize should have comment or be unexported (golint)
    • Line 11: warning: exported type Cipher should have comment or be unexported (golint)
    • Line 15: warning: exported method Cipher.SetBytes should have comment or be unexported (golint)
    • Line 24: warning: exported function Hash should have comment or be unexported (golint)
    • Line 32: warning: exported function Hash256 should have comment or be unexported (golint)
    • plasma-research/src/node/ethereum/events/events.go
    • Line 23: warning: exported type EventAssetDeposited should have comment or be unexported (golint)
    • Line 36: warning: exported function GetEvent should have comment or be unexported (golint)
    • Line 99: warning: exported function SetLastBlock should have comment or be unexported (golint)
    • Line 113: warning: exported function PutEventsToGroup should have comment or be unexported (golint)
    • Line 117: warning: exported function ShowGroup should have comment or be unexported (golint)
    • Line 124: warning: exported function EventListener should have comment or be unexported (golint)
    • Line 141: warning: exported function EventShow should have comment or be unexported (golint)
    • plasma-research/src/node/utils/utils.go
    • Line 53: warning: exported function EncodeToRLP should have comment or be unexported (golint)
    • Line 75: warning: comment on exported function Contains should be of the form "Contains ..." (golint)
    • Line 85: warning: exported function Keccak256 should have comment or be unexported (golint)
    • Line 89: warning: exported function Keccak160 should have comment or be unexported (golint)
    • Line 103: warning: exported function NewGinServer should have comment or be unexported (golint)
    • plasma-research/src/node/operator/blockPublicher/transactionManager.go
    • Line 1: warning: don't use MixedCaps in package name; blockPublicher should be blockpublicher (golint)
    • Line 15: warning: exported type TransactionManager should have comment or be unexported (golint)
    • Line 25: warning: exported function NewTransactionManager should have comment or be unexported (golint)
    • Line 57: warning: exported method TransactionManager.SubmitTransaction should have comment or be unexported (golint)
    • Line 102: warning: exported method TransactionManager.AssembleBlock should have comment or be unexported (golint)
    • Line 109: warning: exported method TransactionManager.AssembleDepositBlock should have comment or be unexported (golint)
    • Line 146: warning: exported method TransactionManager.GetUtxosForAddress should have comment or be unexported (golint)
    • Line 160: warning: exported method TransactionManager.GetLastBlockNumber should have comment or be unexported (golint)
    • Line 164: warning: exported method TransactionManager.GetUtxo should have comment or be unexported (golint)
    • plasma-research/src/node/blockchain/transaction.go
    • Line 16: warning: exported const MaxInputs should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported type UnsignedTransaction should have comment or be unexported (golint)
    • Line 27: warning: comment on exported type Transaction should be of the form "Transaction ..." (with optional leading article) (golint)
    • Line 35: warning: exported type Metadata should have comment or be unexported (golint)
    • Line 100: warning: comment on exported function PadHash should be of the form "PadHash ..." (golint)
    • Line 123: warning: comment on exported method Transaction.Sign should be of the form "Sign ..." (golint)
    • Line 160: warning: exported method Transaction.ValidateSlices should have comment or be unexported (golint)
    • plasma-research/src/node/types/alias.go
    • Line 3: warning: exported type Uint160 should have comment or be unexported (golint)
    • Line 4: warning: exported type Uint256 should have comment or be unexported (golint)
    • Line 6: warning: comment on exported type Uint2048 should be of the form "Uint2048 ..." (with optional leading article) (golint)
    • plasma-research/src/node/verifier/cli/options/options.go
    • Line 5: warning: exported var Initial should have comment or be unexported (golint)
    • Line 10: warning: exported var Eth should have comment or be unexported (golint)
    • Line 16: warning: exported var Plasma should have comment or be unexported (golint)
    • Line 24: warning: exported var InitialOptions should have comment or be unexported (golint)
    • Line 30: warning: exported var EthOptions should have comment or be unexported (golint)
    • Line 36: warning: exported var PlasmaOptions should have comment or be unexported (golint)
    • plasma-research/src/node/operator/blockPublicher/blockPublisher.go
    • Line 1: warning: don't use MixedCaps in package name; blockPublicher should be blockpublicher (golint)
    • Line 15: warning: exported var Blockchain should have comment or be unexported (golint)
    • Line 17: warning: exported type BlockPublisher should have comment or be unexported (golint)
    • Line 22: warning: exported function NewBlockPublisher should have comment or be unexported (golint)
    • Line 43: warning: exported method BlockPublisher.AssembleBlock should have comment or be unexported (golint)
    • Line 56: warning: exported method BlockPublisher.PublishBlock should have comment or be unexported (golint)
    • plasma-research/src/node/operator/operator.go
    • Line 24: warning: exported type Operator should have comment or be unexported (golint)
    • Line 34: warning: exported function NewOperator should have comment or be unexported (golint)
    • Line 67: warning: exported method Operator.Serve should have comment or be unexported (golint)
    • Line 92: warning: exported method Operator.PostTransaction should have comment or be unexported (golint)
    • Line 108: warning: comment on exported method Operator.GetUtxos should be of the form "GetUtxos ..." (golint)
    • Line 119: warning: comment on exported method Operator.GetStatus should be of the form "GetStatus ..." (golint)
    • Line 126: warning: comment on exported method Operator.GetConfig should be of the form "GetConfig ..." (golint)
    • Line 136: warning: comment on exported method Operator.FundAddress should be of the form "FundAddress ..." (golint)
    • Line 151: warning: exported method Operator.Transact should have comment or be unexported (golint)
    • plasma-research/src/node/blockchain/block.go
    • Line 22: warning: exported var WeiPerCoin should have comment or be unexported (golint)
    • Line 140: warning: exported method Block.SerializeHeader should have comment or be unexported (golint)
    • Line 159: warning: exported method Block.Serialize should have comment or be unexported (golint)
    • Line 164: warning: exported function Deserialize should have comment or be unexported (golint)
    • plasma-research/src/node/blockchain/sum-merkle-tree.go
    • Line 12: warning: exported type SumTreeRoot should have comment or be unexported (golint)
    • Line 18: warning: exported type SumTreeNode should have comment or be unexported (golint)
    • Line 31: warning: comment on exported type SumMerkleTreeProof should be of the form "SumMerkleTreeProof ..." (with optional leading article) (golint)
    • Line 42: warning: exported type ProofStep should have comment or be unexported (golint)
    • Line 47: warning: exported function HasIntersection should have comment or be unexported (golint)
    • Line 57: warning: comment on exported function PrepareLeaves should be of the form "PrepareLeaves ..." (golint)
    • Line 104: warning: exported type SumMerkleTree should have comment or be unexported (golint)
    • Line 124: warning: exported function NewSumMerkleTree should have comment or be unexported (golint)
    • Line 171: warning: exported method SumMerkleTree.GetProof should have comment or be unexported (golint)
    • Line 208: warning: exported method SumMerkleTree.GetRlpEncodedProof should have comment or be unexported (golint)
    • Line 233: warning: exported method SumMerkleTree.GetRoot should have comment or be unexported (golint)
    • Line 245: warning: comment on exported function FillGaps should be of the form "FillGaps ..." (golint)
    • plasma-research/src/node/plasmautils/plasmacrypto/rsa.go
    • Line 9: warning: exported var RsaN should have comment or be unexported (golint)
    • Line 11: warning: exported type Accumulator should have comment or be unexported (golint)
    • Line 15: warning: exported method Accumulator.Value should have comment or be unexported (golint)
    • Line 19: warning: exported method Accumulator.Clone should have comment or be unexported (golint)
    • Line 23: warning: exported method Accumulator.SetInt should have comment or be unexported (golint)
    • Line 28: warning: exported method Accumulator.Accumulate should have comment or be unexported (golint)
    • Line 33: warning: exported method Accumulator.BatchAccumulate should have comment or be unexported (golint)
    • Line 40: warning: exported type Proof should have comment or be unexported (golint)
    • plasma-research/src/node/ethereum/ethereum.go
    • Line 22: warning: exported type Ethereum should have comment or be unexported (golint)
    • Line 28: warning: exported function NewEthereum should have comment or be unexported (golint)
    • Line 46: warning: exported method Ethereum.GetBalance should have comment or be unexported (golint)
    • Line 50: warning: exported method Ethereum.PushHashBlock should have comment or be unexported (golint)
    • Line 75: warning: exported method Ethereum.GetLastBlockNumber should have comment or be unexported (golint)
    • Line 79: warning: exported method Ethereum.Exit should have comment or be unexported (golint)
    • Line 103: warning: exported method Ethereum.Deposit should have comment or be unexported (golint)
    • Line 115: warning: exported method Ethereum.DepositERC20 should have comment or be unexported (golint)
    • Line 125: warning: exported method Ethereum.SendTransactionInWei should have comment or be unexported (golint)
    • plasma-research/src/node/blockchain/merkle-tree.go
    • Line 8: warning: exported type Item should have comment or be unexported (golint)
    • Line 9: warning: exported type Layer should have comment or be unexported (golint)
    • Line 10: warning: exported type Tree should have comment or be unexported (golint)
    • Line 12: warning: comment on exported type HashFunction should be of the form "HashFunction ..." (with optional leading article) (golint)
    • Line 15: warning: exported type MerkleTree should have comment or be unexported (golint)
    • Line 19: warning: exported function NewMerkleTree should have comment or be unexported (golint)
    • Line 60: warning: exported method MerkleTree.GetRoot should have comment or be unexported (golint)
    • Line 64: warning: exported method MerkleTree.GetHexRoot should have comment or be unexported (golint)
    • Line 68: warning: exported method MerkleTree.GetProof should have comment or be unexported (golint)
    • Line 83: warning: exported function Reduce should have comment or be unexported (golint)
    • Line 134: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • plasma-research/src/node/verifier/verifier.go
    • Line 38: warning: exported type Verifier should have comment or be unexported (golint)
    • Line 45: warning: exported function NewVerifier should have comment or be unexported (golint)
    • Line 66: warning: exported method Verifier.Serve should have comment or be unexported (golint)
    • Line 72: warning: exported method Verifier.CLIToolStart should have comment or be unexported (golint)
    • Line 110: warning: exported method Verifier.CLIToolExecutor should have comment or be unexported (golint)
    • Line 308: warning: exported method Verifier.ServerStart should have comment or be unexported (golint)
    • Line 336: warning: exported method Verifier.EthereumBalance should have comment or be unexported (golint)
    • Line 348: warning: exported method Verifier.PlasmaBalance should have comment or be unexported (golint)
    • Line 363: warning: exported method Verifier.PlasmaContractAddress should have comment or be unexported (golint)
    • Line 369: warning: exported method Verifier.DepositHandler should have comment or be unexported (golint)
    • Line 390: warning: exported method Verifier.TransferHandler should have comment or be unexported (golint)
    • Line 446: warning: exported method Verifier.ExitHandler should have comment or be unexported (golint)
    • Line 452: warning: exported method Verifier.LatestBlockHandler should have comment or be unexported (golint)
    • Line 467: warning: exported method Verifier.VerifiersAmountHandler should have comment or be unexported (golint)
    • Line 473: warning: exported method Verifier.TotalBalanceHandler should have comment or be unexported (golint)
    • Line 479: warning: exported method Verifier.HistoryAllHandler should have comment or be unexported (golint)
    • Line 485: warning: exported method Verifier.HistoryTxHandler should have comment or be unexported (golint)
    • Line 580: warning: exported function GetETHAccountBalance 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.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!