Preparing report...

Report for github.com/santhosh-tekuri/raft

A+    Excellent!    Found 13 issues across 52 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!


golint100%

Golint is a linter for Go source code.

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.

    • raft/leader.go
    • Line 206: warning: cyclomatic complexity 24 of function (*leader).checkReplUpdates() is high (> 15) (gocyclo)
    • Line 116: warning: cyclomatic complexity 16 of function (*leader).storeEntry() is high (> 15) (gocyclo)
    • Line 277: warning: cyclomatic complexity 16 of function (*leader).checkQuorum() is high (> 15) (gocyclo)
    • raft/server.go
    • Line 80: warning: cyclomatic complexity 24 of function (*server).handleConn() is high (> 15) (gocyclo)
    • raft/storage.go
    • Line 84: warning: cyclomatic complexity 19 of function openStorage() is high (> 15) (gocyclo)
    • raft/client.go
    • Line 209: warning: cyclomatic complexity 18 of function decodeTaskResp() is high (> 15) (gocyclo)
    • raft/changeconfig.go
    • Line 148: warning: cyclomatic complexity 24 of function (*leader).checkConfigAction() is high (> 15) (gocyclo)
    • Line 22: warning: cyclomatic complexity 17 of function (*leader).onChangeConfig() is high (> 15) (gocyclo)
    • raft/raft.go
    • Line 240: warning: cyclomatic complexity 35 of function (*Raft).stateLoop() is high (> 15) (gocyclo)
    • raft/rpc.go
    • Line 143: warning: cyclomatic complexity 26 of function (*Raft).onAppendEntriesRequest() is high (> 15) (gocyclo)
    • raft/task.go
    • Line 311: warning: cyclomatic complexity 21 of function (*Info).decode() is high (> 15) (gocyclo)
    • Line 382: warning: cyclomatic complexity 18 of function (Info).encode() is high (> 15) (gocyclo)
    • raft/replication.go
    • Line 118: warning: cyclomatic complexity 49 of function (*replication).replicate() is high (> 15) (gocyclo)
    • Line 54: warning: cyclomatic complexity 19 of function (*replication).runLoop() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words