Report for github.com/celestiaorg/celestia-core

(v0.35.9)

A+    Excellent!    Found 49 issues across 676 files

Tweet

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!


gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo92%

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.

    • internal/p2p/peermanager.go
    • Line 965: warning: cyclomatic complexity 23 of function (*PeerManager).Advertise() is high (> 15) (gocyclo)
    • Line 190: warning: cyclomatic complexity 18 of function (*PeerManagerOptions).Validate() is high (> 15) (gocyclo)
    • Line 556: warning: cyclomatic complexity 18 of function (*PeerManager).TryDialNext() is high (> 15) (gocyclo)
    • Line 667: warning: cyclomatic complexity 18 of function (*PeerManager).Dialed() is high (> 15) (gocyclo)
    • internal/consensus/replay.go
    • Line 285: warning: cyclomatic complexity 27 of function (*Handshaker).ReplayBlocks() is high (> 15) (gocyclo)
    • Line 39: warning: cyclomatic complexity 16 of function (*State).readReplayMessage() is high (> 15) (gocyclo)
    • test/e2e/runner/setup.go
    • Line 230: warning: cyclomatic complexity 25 of function MakeConfig() is high (> 15) (gocyclo)
    • Line 42: warning: cyclomatic complexity 17 of function Setup() is high (> 15) (gocyclo)
    • test/e2e/pkg/testnet.go
    • Line 110: warning: cyclomatic complexity 39 of function LoadTestnet() is high (> 15) (gocyclo)
    • Line 320: warning: cyclomatic complexity 34 of function (Node).Validate() is high (> 15) (gocyclo)
    • internal/consensus/replay_test.go
    • Line 1034: warning: cyclomatic complexity 24 of function makeBlockchainFromWAL() is high (> 15) (gocyclo)
    • Line 313: warning: cyclomatic complexity 20 of function setupSimulator() is high (> 15) (gocyclo)
    • Line 684: warning: cyclomatic complexity 16 of function testHandshakeReplay() is high (> 15) (gocyclo)
    • internal/blocksync/v2/reactor.go
    • Line 299: warning: cyclomatic complexity 45 of function (*BlockchainReactor).demux() is high (> 15) (gocyclo)
    • Line 489: warning: cyclomatic complexity 16 of function (*BlockchainReactor).Receive() is high (> 15) (gocyclo)
    • node/node.go
    • Line 126: warning: cyclomatic complexity 43 of function makeNode() is high (> 15) (gocyclo)
    • Line 657: warning: cyclomatic complexity 31 of function (*nodeImpl).OnStart() is high (> 15) (gocyclo)
    • Line 806: warning: cyclomatic complexity 27 of function (*nodeImpl).OnStop() is high (> 15) (gocyclo)
    • Line 909: warning: cyclomatic complexity 19 of function (*nodeImpl).startRPC() is high (> 15) (gocyclo)
    • internal/state/indexer/tx/kv/kv.go
    • Line 264: warning: cyclomatic complexity 25 of function (*TxIndex).match() is high (> 15) (gocyclo)
    • Line 394: warning: cyclomatic complexity 20 of function (*TxIndex).matchRange() is high (> 15) (gocyclo)
    • Line 140: warning: cyclomatic complexity 17 of function (*TxIndex).Search() is high (> 15) (gocyclo)
    • internal/consensus/state.go
    • Line 2048: warning: cyclomatic complexity 43 of function (*State).addVote() is high (> 15) (gocyclo)
    • Line 1393: warning: cyclomatic complexity 19 of function (*State).enterPrecommit() is high (> 15) (gocyclo)
    • Line 639: warning: cyclomatic complexity 17 of function (*State).updateToState() is high (> 15) (gocyclo)
    • node/setup.go
    • Line 467: warning: cyclomatic complexity 16 of function createPeerManager() is high (> 15) (gocyclo)
    • internal/state/indexer/block/kv/kv.go
    • Line 326: warning: cyclomatic complexity 27 of function (*BlockerIndexer).match() is high (> 15) (gocyclo)
    • Line 86: warning: cyclomatic complexity 23 of function (*BlockerIndexer).Search() is high (> 15) (gocyclo)
    • Line 218: warning: cyclomatic complexity 21 of function (*BlockerIndexer).matchRange() is high (> 15) (gocyclo)
    • internal/p2p/conn/connection.go
    • Line 569: warning: cyclomatic complexity 20 of function (*MConnection).recvRoutine() is high (> 15) (gocyclo)
    • Line 433: warning: cyclomatic complexity 17 of function (*MConnection).sendRoutine() is high (> 15) (gocyclo)
    • internal/consensus/reactor.go
    • Line 848: warning: cyclomatic complexity 24 of function (*Reactor).queryMaj23Routine() is high (> 15) (gocyclo)
    • Line 545: warning: cyclomatic complexity 24 of function (*Reactor).gossipDataRoutine() is high (> 15) (gocyclo)
    • Line 710: warning: cyclomatic complexity 23 of function (*Reactor).gossipVotesForHeight() is high (> 15) (gocyclo)
    • Line 768: warning: cyclomatic complexity 19 of function (*Reactor).gossipVotesRoutine() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!