Preparing report...

Report for github.com/regel/cardano-p2p

A+    Excellent!    Found 5 issues across 10 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!


gocyclo90%

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.

    • cardano-p2p/pkg/p2p.go
    • Line 221: warning: cyclomatic complexity 19 of function Serve() is high (> 15) (gocyclo)
    • Line 114: warning: cyclomatic complexity 17 of function push() is high (> 15) (gocyclo)

golint50%

Golint is a linter for Go source code.

    • cardano-p2p/server/config.go
    • Line 1: warning: package comment should be of the form "Package server ..." (golint)
    • Line 32: warning: var defaultPeriodSeconds is of type time.Duration; don't use unit-specific suffix "Seconds" (golint)
    • Line 39: warning: exported type EndpointConfig should have comment or be unexported (golint)
    • Line 49: warning: exported type Config should have comment or be unexported (golint)
    • Line 92: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • cardano-p2p/cmd/root.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 55: warning: exported function NewRootCmd should have comment or be unexported (golint)
    • cardano-p2p/pkg/p2p.go
    • Line 1: warning: package comment should be of the form "Package pkg ..." (golint)
    • Line 36: warning: exported type PushPayload should have comment or be unexported (golint)
    • Line 44: warning: exported type PullPayload should have comment or be unexported (golint)
    • Line 53: warning: exported type Producer should have comment or be unexported (golint)
    • Line 59: warning: exported type FetchRequest should have comment or be unexported (golint)
    • Line 65: warning: exported type PoolMetadata should have comment or be unexported (golint)
    • Line 71: warning: exported type ExtendedPoolMetadata should have comment or be unexported (golint)
    • Line 76: warning: exported type PoolRelay should have comment or be unexported (golint)
    • Line 81: warning: exported type SingleHostAddress should have comment or be unexported (golint)
    • Line 87: warning: exported type SingleHostName should have comment or be unexported (golint)
    • Line 92: warning: exported type Pool should have comment or be unexported (golint)
    • Line 104: warning: exported function Push should have comment or be unexported (golint)
    • Line 221: warning: exported function Serve should have comment or be unexported (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!