Preparing report...

Report for github.com/canonical/go-dqlite

A+    Excellent!    Found 14 issues across 53 files

Tweet

gofmt96%

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!


gocyclo94%

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.

    • go-dqlite/app/app.go
    • Line 47: warning: cyclomatic complexity 37 of function New() is high (> 15) (gocyclo)
    • Line 254: warning: cyclomatic complexity 18 of function (*App).Handover() is high (> 15) (gocyclo)

golint86%

Golint is a linter for Go source code.

    • go-dqlite/internal/bindings/server.go
    • Line 85: warning: exported type Node should have comment or be unexported (golint)
    • Line 93: warning: exported function ConfigSingleThread should have comment or be unexported (golint)
    • Line 100: warning: exported function ConfigMultiThread should have comment or be unexported (golint)
    • Line 126: warning: exported method Node.SetDialFunc should have comment or be unexported (golint)
    • Line 138: warning: exported method Node.SetBindAddress should have comment or be unexported (golint)
    • Line 148: warning: exported method Node.SetNetworkLatency should have comment or be unexported (golint)
    • Line 157: warning: exported method Node.SetFailureDomain should have comment or be unexported (golint)
    • Line 166: warning: exported method Node.GetBindAddress should have comment or be unexported (golint)
    • Line 171: warning: exported method Node.Start should have comment or be unexported (golint)
    • Line 180: warning: exported method Node.Stop should have comment or be unexported (golint)
    • Line 194: warning: exported method Node.Recover should have comment or be unexported (golint)
    • go-dqlite/client/store.go
    • Line 77: warning: comment on exported type NodeStoreOption should be of the form "NodeStoreOption ..." (with optional leading article) (golint)
    • Line 178: warning: comment on exported type YamlNodeStore should be of the form "YamlNodeStore ..." (with optional leading article) (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


misspell94%

Misspell Finds commonly misspelled English words