Preparing report...

Report for github.com/hermeznetwork/hermez-node

A+    Excellent!    Found 23 issues across 156 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!


gocyclo85%

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.

    • hermez-node/node/node.go
    • Line 95: warning: cyclomatic complexity 46 of function NewNode() is high (> 15) (gocyclo)
    • Line 829: warning: cyclomatic complexity 17 of function (*Node).StartNodeAPI() is high (> 15) (gocyclo)
    • hermez-node/txselector/txselector.go
    • Line 332: warning: cyclomatic complexity 29 of function (*TxSelector).processL2Txs() is high (> 15) (gocyclo)
    • Line 161: warning: cyclomatic complexity 20 of function (*TxSelector).getL1L2TxSelection() is high (> 15) (gocyclo)
    • Line 552: warning: cyclomatic complexity 16 of function (*TxSelector).processTxToEthAddrBJJ() is high (> 15) (gocyclo)
    • hermez-node/synchronizer/synchronizer.go
    • Line 834: warning: cyclomatic complexity 47 of function (*Synchronizer).rollupSync() is high (> 15) (gocyclo)
    • Line 517: warning: cyclomatic complexity 33 of function (*Synchronizer).Sync() is high (> 15) (gocyclo)
    • Line 765: warning: cyclomatic complexity 17 of function (*Synchronizer).resetState() is high (> 15) (gocyclo)
    • Line 1188: warning: cyclomatic complexity 17 of function (*Synchronizer).auctionSync() is high (> 15) (gocyclo)
    • hermez-node/db/historydb/apiqueries.go
    • Line 509: warning: cyclomatic complexity 39 of function (*HistoryDB).GetTxsAPI() is high (> 15) (gocyclo)
    • Line 730: warning: cyclomatic complexity 21 of function (*HistoryDB).GetExitsAPI() is high (> 15) (gocyclo)
    • Line 78: warning: cyclomatic complexity 17 of function (*HistoryDB).GetBatchesAPI() is high (> 15) (gocyclo)
    • hermez-node/test/til/lang.go
    • Line 276: warning: cyclomatic complexity 54 of function (*parser).parseLine() is high (> 15) (gocyclo)
    • Line 516: warning: cyclomatic complexity 17 of function (*parser).parse() is high (> 15) (gocyclo)
    • hermez-node/test/til/txs.go
    • Line 853: warning: cyclomatic complexity 37 of function (*Context).FillBlocksExtra() is high (> 15) (gocyclo)
    • Line 197: warning: cyclomatic complexity 35 of function (*Context).generateBlocks() is high (> 15) (gocyclo)
    • hermez-node/txprocessor/txprocessor.go
    • Line 187: warning: cyclomatic complexity 76 of function (*TxProcessor).ProcessTxs() is high (> 15) (gocyclo)
    • Line 1203: warning: cyclomatic complexity 28 of function (*TxProcessor).applyExit() is high (> 15) (gocyclo)
    • Line 593: warning: cyclomatic complexity 28 of function (*TxProcessor).ProcessL1Tx() is high (> 15) (gocyclo)
    • Line 994: warning: cyclomatic complexity 21 of function (*TxProcessor).applyTransfer() is high (> 15) (gocyclo)
    • Line 728: warning: cyclomatic complexity 20 of function (*TxProcessor).ProcessL2Tx() is high (> 15) (gocyclo)
    • Line 1378: warning: cyclomatic complexity 18 of function (*TxProcessor).computeEffectiveAmounts() is high (> 15) (gocyclo)
    • hermez-node/eth/rollup.go
    • Line 774: warning: cyclomatic complexity 32 of function (*RollupClient).RollupEventsByBlock() is high (> 15) (gocyclo)
    • Line 947: warning: cyclomatic complexity 19 of function (*RollupClient).RollupForgeBatchArgs() is high (> 15) (gocyclo)
    • Line 320: warning: cyclomatic complexity 16 of function (*RollupClient).RollupForgeBatch() is high (> 15) (gocyclo)

golint99%

Golint is a linter for Go source code.

    • hermez-node/test/til/lang.go
    • Line 19: warning: error var commentLine should have name of the form errFoo (golint)
    • Line 20: warning: error var newEventLine should have name of the form errFoo (golint)
    • Line 21: warning: error var setTypeLine should have name of the form errFoo (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!