Preparing report...

Report for github.com/decred/vspd

A+    Excellent!    Found 12 issues across 43 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!


gocyclo76%

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.

    • vspd/config.go
    • Line 165: warning: cyclomatic complexity 42 of function loadConfig() is high (> 15) (gocyclo)
    • vspd/background/background.go
    • Line 63: warning: cyclomatic complexity 39 of function blockConnected() is high (> 15) (gocyclo)
    • Line 393: warning: cyclomatic complexity 28 of function checkWalletConsistency() is high (> 15) (gocyclo)
    • vspd/webapi/errors.go
    • Line 33: warning: cyclomatic complexity 20 of function (apiError).httpStatus() is high (> 15) (gocyclo)
    • Line 77: warning: cyclomatic complexity 20 of function (apiError).defaultMessage() is high (> 15) (gocyclo)

golint88%

Golint is a linter for Go source code.

    • vspd/rpc/dcrwallet.go
    • Line 28: warning: exported type WalletConnect should have comment or be unexported (golint)
    • Line 30: warning: exported function SetupWallet should have comment or be unexported (golint)
    • Line 40: warning: exported method WalletConnect.Close should have comment or be unexported (golint)
    • vspd/database/ticket.go
    • Line 60: warning: exported type Ticket should have comment or be unexported (golint)
    • Line 91: warning: exported method Ticket.FeeExpired should have comment or be unexported (golint)
    • Line 224: warning: exported method VspDatabase.DeleteTicket should have comment or be unexported (golint)
    • Line 240: warning: exported method VspDatabase.UpdateTicket should have comment or be unexported (golint)
    • Line 257: warning: exported method VspDatabase.GetTicketByHash should have comment or be unexported (golint)
    • vspd/webapi/webapi.go
    • Line 27: warning: exported type Config should have comment or be unexported (golint)
    • Line 55: warning: exported function Start should have comment or be unexported (golint)
    • vspd/background/background.go
    • Line 29: warning: exported type NotificationHandler should have comment or be unexported (golint)
    • Line 296: warning: exported method NotificationHandler.Close should have comment or be unexported (golint)
    • Line 331: warning: exported function Start should have comment or be unexported (golint)
    • vspd/rpc/dcrd.go
    • Line 41: warning: exported type DcrdConnect should have comment or be unexported (golint)
    • Line 45: warning: exported function SetupDcrd 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!