Preparing report...

Report for github.com/Sperax/bdls

A+    Excellent!    Found 15 issues across 48 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!


gocyclo89%

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.

    • bdls/consensus.go
    • Line 1237: warning: cyclomatic complexity 49 of function (*Consensus).receiveMessage() is high (> 15) (gocyclo)
    • Line 656: warning: cyclomatic complexity 25 of function (*Consensus).verifySelectMessage() is high (> 15) (gocyclo)
    • Line 1528: warning: cyclomatic complexity 19 of function (*Consensus).Update() is high (> 15) (gocyclo)
    • Line 857: warning: cyclomatic complexity 17 of function (*Consensus).verifyDecideMessage() is high (> 15) (gocyclo)
    • Line 548: warning: cyclomatic complexity 17 of function (*Consensus).verifyLockMessage() is high (> 15) (gocyclo)

golint83%

Golint is a linter for Go source code.

    • bdls/agent-tcp/tcp_peer.go
    • Line 54: warning: comment on exported const MessageLength should be of the form "MessageLength ..." (golint)
    • Line 58: warning: comment on exported const MaxMessageLength should be of the form "MaxMessageLength ..." (golint)
    • Line 274: warning: comment on exported method TCPPeer.GetPublicKey should be of the form "GetPublicKey ..." (golint)
    • Line 356: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 475: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 519: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 533: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • bdls/errors.go
    • Line 36: warning: comment on exported var ErrConfigEpoch should be of the form "ErrConfigEpoch ..." (golint)
    • Line 38: warning: exported var ErrConfigStateNil should have comment or be unexported (golint)
    • Line 45: warning: comment on exported var ErrMessageVersion should be of the form "ErrMessageVersion ..." (golint)
    • Line 53: warning: comment on exported var ErrRoundChangeHeightMismatch should be of the form "ErrRoundChangeHeightMismatch ..." (golint)
    • Line 58: warning: comment on exported var ErrLockEmptyState should be of the form "ErrLockEmptyState ..." (golint)
    • Line 71: warning: comment on exported var ErrSelectStateValidation should be of the form "ErrSelectStateValidation ..." (golint)
    • Line 86: warning: comment on exported var ErrDecideHeightLower should be of the form "ErrDecideHeightLower ..." (golint)
    • Line 98: warning: comment on exported var ErrLockReleaseStatus should be of the form "ErrLockReleaseStatus ..." (golint)
    • Line 101: warning: comment on exported var ErrCommitEmptyState should be of the form "ErrCommitEmptyState ..." (golint)
    • Line 109: warning: comment on exported var ErrMismatchedTargetState should be of the form "ErrMismatchedTargetState ..." (golint)
    • bdls/message.go
    • Line 50: warning: comment on exported var S256Curve should be of the form "S256Curve ..." (golint)
    • Line 95: warning: comment on exported method PubKeyAxis.MarshalText should be of the form "MarshalText ..." (golint)
    • Line 103: warning: comment on exported function DefaultPubKeyToIdentity should be of the form "DefaultPubKeyToIdentity ..." (golint)
    • bdls/cmd/emucon/main.go
    • Line 54: warning: comment on exported type Quorum should be of the form "Quorum ..." (with optional leading article) (golint)
    • bdls/crypto/blake2b/blake2b.go
    • Line 26: warning: comment on exported const BlockSize should be of the form "BlockSize ..." (golint)
    • Line 28: warning: comment on exported const Size should be of the form "Size ..." (golint)
    • Line 30: warning: comment on exported const Size384 should be of the form "Size384 ..." (golint)
    • Line 32: warning: comment on exported const Size256 should be of the form "Size256 ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words