Preparing report...

Report for github.com/OffchainLabs/prysm

(v1.4.4)

A+    Excellent!    Found 179 issues across 1298 files

Tweet

gofmt92%

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!


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.

    • beacon-chain/node/node.go
    • Line 250: warning: cyclomatic complexity 23 of function (*BeaconNode).startDB() is high (> 15) (gocyclo)
    • Line 83: warning: cyclomatic complexity 16 of function New() is high (> 15) (gocyclo)
    • beacon-chain/rpc/prysm/v1alpha1/beacon/blocks.go
    • Line 30: warning: cyclomatic complexity 30 of function (*Server).ListBlocks() is high (> 15) (gocyclo)
    • Line 307: warning: cyclomatic complexity 23 of function (*Server).chainHeadRetrieval() is high (> 15) (gocyclo)
    • Line 210: warning: cyclomatic complexity 20 of function (*Server).StreamBlocks() is high (> 15) (gocyclo)
    • beacon-chain/blockchain/service.go
    • Line 104: warning: cyclomatic complexity 27 of function (*Service).Start() is high (> 15) (gocyclo)
    • Line 378: warning: cyclomatic complexity 20 of function (*Service).initializeChainInfo() is high (> 15) (gocyclo)
    • slasher/detection/attestations/spanner.go
    • Line 233: warning: cyclomatic complexity 18 of function (*SpanDetector).updateMinSpan() is high (> 15) (gocyclo)
    • Line 64: warning: cyclomatic complexity 17 of function (*SpanDetector).DetectSlashingsForAttestation() is high (> 15) (gocyclo)
    • shared/testutil/deposits_test.go
    • Line 165: warning: cyclomatic complexity 17 of function TestSetupInitialDeposits_1024Entries_PartialDeposits() is high (> 15) (gocyclo)
    • Line 14: warning: cyclomatic complexity 17 of function TestSetupInitialDeposits_1024Entries() is high (> 15) (gocyclo)
    • shared/sszutil/deep_equal.go
    • Line 122: warning: cyclomatic complexity 34 of function deepValueEqualExportedOnly() is high (> 15) (gocyclo)
    • Line 32: warning: cyclomatic complexity 32 of function deepValueEqual() is high (> 15) (gocyclo)
    • beacon-chain/rpc/prysm/v1alpha1/beacon/validators.go
    • Line 188: warning: cyclomatic complexity 27 of function (*Server).ListValidators() is high (> 15) (gocyclo)
    • Line 31: warning: cyclomatic complexity 22 of function (*Server).ListValidatorBalances() is high (> 15) (gocyclo)
    • Line 644: warning: cyclomatic complexity 18 of function (*Server).GetValidatorPerformance() is high (> 15) (gocyclo)
    • Line 553: warning: cyclomatic complexity 18 of function (*Server).GetValidatorQueue() is high (> 15) (gocyclo)
    • validator/node/node.go
    • Line 172: warning: cyclomatic complexity 24 of function (*ValidatorClient).initializeFromCLI() is high (> 15) (gocyclo)
    • Line 269: warning: cyclomatic complexity 21 of function (*ValidatorClient).initializeForWeb() 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!