Preparing report...

Report for github.com/otoolep/eraftd

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


gocyclo100%

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.

No problems detected. Good job!


golint60%

Golint is a linter for Go source code.

    • eraftd/node/node.go
    • Line 29: warning: exported type Node should have comment or be unexported (golint)
    • Line 62: warning: exported function New should have comment or be unexported (golint)
    • Line 79: warning: exported method Node.Open should have comment or be unexported (golint)
    • Line 84: warning: exported method Node.Close should have comment or be unexported (golint)
    • Line 288: warning: exported method Node.Process should have comment or be unexported (golint)
    • Line 291: warning: exported method Node.IsIDRemoved should have comment or be unexported (golint)
    • Line 292: warning: exported method Node.ReportUnreachable should have comment or be unexported (golint)
    • Line 293: warning: exported method Node.ReportSnapshot should have comment or be unexported (golint)
    • eraftd/store/store.go
    • Line 3: warning: exported type Store should have comment or be unexported (golint)
    • Line 6: warning: exported function New should have comment or be unexported (golint)
    • Line 10: warning: exported method Store.Open should have comment or be unexported (golint)
    • Line 14: warning: exported method Store.Close should have comment or be unexported (golint)
    • Line 18: warning: exported method Store.Get should have comment or be unexported (golint)
    • Line 22: warning: exported method Store.Set should have comment or be unexported (golint)
    • Line 26: warning: exported method Store.Delete should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign60%

IneffAssign detects ineffectual assignments in Go code.

    • eraftd/main.go
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: could not import github.com/otoolep/eraftd/http (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/otoolep/eraftd/store (invalid package name: "") (ineffassign)
    • Line 46: warning: undeclared name: httpd (ineffassign)
    • Line 10: warning: "github.com/otoolep/eraftd/http" imported but not used (ineffassign)
    • eraftd/node/node.go
    • Line 18: warning: cannot find package "." in: (ineffassign)
    • Line 16: warning: cannot find package "." in: (ineffassign)
    • Line 19: warning: cannot find package "." in: (ineffassign)
    • Line 20: warning: cannot find package "." in: (ineffassign)
    • Line 21: warning: cannot find package "." in: (ineffassign)
    • Line 22: warning: cannot find package "." in: (ineffassign)
    • Line 23: warning: cannot find package "." in: (ineffassign)
    • Line 24: warning: cannot find package "." in: (ineffassign)
    • Line 16: warning: could not import go.etcd.io/etcd/etcdserver/api/snap (invalid package name: "") (ineffassign)
    • Line 18: warning: could not import go.etcd.io/etcd/etcdserver/api/rafthttp (invalid package name: "") (ineffassign)
    • Line 19: warning: could not import go.etcd.io/etcd/etcdserver/api/v2stats (invalid package name: "") (ineffassign)
    • Line 20: warning: could not import go.etcd.io/etcd/pkg/types (invalid package name: "") (ineffassign)
    • Line 21: warning: could not import go.etcd.io/etcd/raft (invalid package name: "") (ineffassign)
    • Line 22: warning: could not import go.etcd.io/etcd/raft/raftpb (invalid package name: "") (ineffassign)
    • Line 23: warning: could not import go.etcd.io/etcd/wal (invalid package name: "") (ineffassign)
    • Line 24: warning: could not import go.etcd.io/etcd/wal/walpb (invalid package name: "") (ineffassign)
    • Line 264: warning: n.saveSnap undefined (type *Node has no field or method saveSnap) (ineffassign)
    • Line 266: warning: n.publishSnapshot undefined (type *Node has no field or method publishSnapshot) (ineffassign)
    • Line 270: warning: n.publishEntries undefined (type *Node has no field or method publishEntries) (ineffassign)
    • Line 270: warning: n.entriesToApply undefined (type *Node has no field or method entriesToApply) (ineffassign)
    • Line 271: warning: n.stop undefined (type *Node has no field or method stop) (ineffassign)
    • Line 274: warning: n.maybeTriggerSnapshot undefined (type *Node has no field or method maybeTriggerSnapshot) (ineffassign)
    • Line 278: warning: n.writeError undefined (type *Node has no field or method writeError) (ineffassign)
    • Line 282: warning: n.stop undefined (type *Node has no field or method stop) (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!