Preparing report...

Report for github.com/ailidani/paxi

A+    Excellent!    Found 40 issues across 92 files

Tweet

gofmt98%

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!


gocyclo97%

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.


golint60%

Golint is a linter for Go source code.

    • paxi/chain/replica.go
    • Line 16: warning: exported type Replica should have comment or be unexported (golint)
    • Line 30: warning: exported function NewReplica should have comment or be unexported (golint)
    • paxi/lib/queue.go
    • Line 3: warning: exported type Queue should have comment or be unexported (golint)
    • Line 10: warning: exported function NewQueue should have comment or be unexported (golint)
    • Line 19: warning: exported method Queue.Size should have comment or be unexported (golint)
    • Line 23: warning: exported method Queue.Push should have comment or be unexported (golint)
    • Line 37: warning: exported method Queue.Pop should have comment or be unexported (golint)
    • paxi/lib/graph.go
    • Line 5: warning: exported type Graph should have comment or be unexported (golint)
    • Line 11: warning: exported function NewGraph should have comment or be unexported (golint)
    • Line 19: warning: exported method Graph.Size should have comment or be unexported (golint)
    • Line 23: warning: exported method Graph.Has should have comment or be unexported (golint)
    • Line 27: warning: exported method Graph.Add should have comment or be unexported (golint)
    • Line 35: warning: exported method Graph.Remove should have comment or be unexported (golint)
    • Line 49: warning: exported method Graph.AddEdge should have comment or be unexported (golint)
    • Line 63: warning: exported method Graph.RemoveEdge should have comment or be unexported (golint)
    • Line 71: warning: exported method Graph.Vertices should have comment or be unexported (golint)
    • Line 135: warning: exported method Graph.BFSReverse should have comment or be unexported (golint)
    • paxi/ballot.go
    • Line 19: warning: exported function NewBallotFromString should have comment or be unexported (golint)
    • paxi/client.go
    • Line 82: warning: exported method HTTPClient.GetURL should have comment or be unexported (golint)
    • Line 227: warning: exported method HTTPClient.LocalQuorumGet should have comment or be unexported (golint)
    • paxi/m2paxos/kpaxos.go
    • Line 15: warning: exported function Q1 should have comment or be unexported (golint)
    • Line 19: warning: exported function Q2 should have comment or be unexported (golint)
    • paxi/chain/client.go
    • Line 9: warning: exported type Client should have comment or be unexported (golint)
    • Line 15: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 31: warning: exported method Client.Get should have comment or be unexported (golint)
    • Line 36: warning: exported method Client.Put should have comment or be unexported (golint)
    • paxi/chain/msg.go
    • Line 15: warning: exported type Accept should have comment or be unexported (golint)
    • Line 26: warning: exported type Ack should have comment or be unexported (golint)
    • paxi/vpaxos/msg.go
    • Line 25: warning: exported type P1a should have comment or be unexported (golint)
    • Line 34: warning: exported type P1b should have comment or be unexported (golint)
    • paxi/paxos/client.go
    • Line 16: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 41: warning: exported method Client.Put should have comment or be unexported (golint)
    • paxi/sdpaxos/replica.go
    • Line 21: warning: exported type Replica should have comment or be unexported (golint)
    • Line 33: warning: exported function NewReplica should have comment or be unexported (golint)
    • paxi/lib/set.go
    • Line 3: warning: exported type Set should have comment or be unexported (golint)
    • Line 5: warning: exported function NewSet should have comment or be unexported (golint)
    • Line 9: warning: exported method Set.Add should have comment or be unexported (golint)
    • Line 13: warning: exported method Set.Has should have comment or be unexported (golint)
    • Line 18: warning: exported method Set.Remove should have comment or be unexported (golint)
    • Line 22: warning: exported method Set.Slice should have comment or be unexported (golint)
    • Line 30: warning: exported method Set.Clear should have comment or be unexported (golint)
    • Line 36: warning: exported method Set.Clone should have comment or be unexported (golint)
    • paxi/log/log.go
    • Line 18: warning: exported const DEBUG should have comment (or a comment on this block) or be unexported (golint)
    • Line 128: warning: exported function Debug should have comment or be unexported (golint)
    • Line 134: warning: exported function Debugf should have comment or be unexported (golint)
    • Line 140: warning: exported function Info should have comment or be unexported (golint)
    • Line 146: warning: exported function Infof should have comment or be unexported (golint)
    • Line 152: warning: exported function Warning should have comment or be unexported (golint)
    • Line 158: warning: exported function Warningf should have comment or be unexported (golint)
    • Line 164: warning: exported function Error should have comment or be unexported (golint)
    • Line 168: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 172: warning: exported function Fatal should have comment or be unexported (golint)
    • Line 177: warning: exported function Fatalf should have comment or be unexported (golint)
    • paxi/paxos/replica.go
    • Line 16: warning: exported const HTTPHeaderSlot should have comment (or a comment on this block) or be unexported (golint)
    • paxi/paxos_group/replica.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 13: warning: exported type Replica should have comment or be unexported (golint)
    • Line 20: warning: exported function NewReplica should have comment or be unexported (golint)
    • paxi/dynamo/replica.go
    • Line 11: warning: exported type Replica should have comment or be unexported (golint)
    • Line 18: warning: exported function NewReplica should have comment or be unexported (golint)
    • Line 98: warning: exported method Replica.HandleReplicate should have comment or be unexported (golint)
    • paxi/epaxos/msg.go
    • Line 18: warning: exported type PreAccept should have comment or be unexported (golint)
    • Line 31: warning: exported type PreAcceptReply should have comment or be unexported (golint)
    • Line 44: warning: exported type Accept should have comment or be unexported (golint)
    • Line 52: warning: exported type AcceptReply should have comment or be unexported (golint)
    • Line 58: warning: exported type Commit should have comment or be unexported (golint)
    • paxi/hpaxos/paxos.go
    • Line 54: warning: exported method Paxos.IsLeader should have comment or be unexported (golint)
    • Line 58: warning: exported method Paxos.Leader should have comment or be unexported (golint)
    • Line 62: warning: exported method Paxos.HandleRequest should have comment or be unexported (golint)
    • Line 66: warning: exported method Paxos.P1a should have comment or be unexported (golint)
    • Line 83: warning: exported method Paxos.P2a should have comment or be unexported (golint)
    • Line 98: warning: exported method Paxos.HandleP1a should have comment or be unexported (golint)
    • Line 148: warning: exported method Paxos.HandleP1b should have comment or be unexported (golint)
    • Line 176: warning: exported method Paxos.HandleP2a should have comment or be unexported (golint)
    • Line 210: warning: exported method Paxos.HandleP2b should have comment or be unexported (golint)
    • Line 247: warning: exported method Paxos.HandleP3 should have comment or be unexported (golint)
    • paxi/sdpaxos/msg.go
    • Line 19: warning: exported type CAccept should have comment or be unexported (golint)
    • Line 30: warning: exported type CAck should have comment or be unexported (golint)
    • Line 40: warning: exported type CCommit should have comment or be unexported (golint)
    • Line 51: warning: exported type OAccept should have comment or be unexported (golint)
    • Line 63: warning: exported type OAck should have comment or be unexported (golint)
    • Line 75: warning: exported type OCommit should have comment or be unexported (golint)
    • paxi/lib/cmap.go
    • Line 18: warning: exported method CMap.Get should have comment or be unexported (golint)
    • Line 24: warning: exported method CMap.Put should have comment or be unexported (golint)
    • Line 30: warning: exported method CMap.Contains should have comment or be unexported (golint)
    • Line 37: warning: exported method CMap.Size should have comment or be unexported (golint)
    • Line 43: warning: exported method CMap.Keys should have comment or be unexported (golint)
    • paxi/db.go
    • Line 25: warning: exported method Command.Empty should have comment or be unexported (golint)
    • Line 32: warning: exported method Command.IsRead should have comment or be unexported (golint)
    • Line 36: warning: exported method Command.IsWrite should have comment or be unexported (golint)
    • Line 40: warning: exported method Command.Equal should have comment or be unexported (golint)
    • paxi/quorum.go
    • Line 55: warning: exported method Quorum.All should have comment or be unexported (golint)
    • paxi/paxos_group/msg.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 17: warning: exported type Prepare should have comment or be unexported (golint)
    • Line 22: warning: exported type Promise should have comment or be unexported (golint)
    • Line 27: warning: exported type Accept should have comment or be unexported (golint)
    • Line 32: warning: exported type Accepted should have comment or be unexported (golint)
    • Line 37: warning: exported type Commit should have comment or be unexported (golint)
    • paxi/vpaxos/replica.go
    • Line 13: warning: exported type Replica should have comment or be unexported (golint)
    • Line 24: warning: exported function NewReplica should have comment or be unexported (golint)
    • paxi/lib/cset.go
    • Line 11: warning: exported function NewCSet should have comment or be unexported (golint)
    • Line 17: warning: exported method CSet.Put should have comment or be unexported (golint)
    • Line 33: warning: exported method CSet.Contains should have comment or be unexported (golint)
    • Line 40: warning: exported method CSet.Remove should have comment or be unexported (golint)
    • Line 46: warning: exported method CSet.Size should have comment or be unexported (golint)
    • Line 52: warning: exported method CSet.Array should have comment or be unexported (golint)
    • paxi/wpaxos/kpaxos.go
    • Line 15: warning: exported function Q1 should have comment or be unexported (golint)
    • Line 22: warning: exported function Q2 should have comment or be unexported (golint)
    • paxi/lib/mmap.go
    • Line 5: warning: exported type MMap should have comment or be unexported (golint)
    • Line 10: warning: exported function NewMMap should have comment or be unexported (golint)
    • Line 16: warning: exported method MMap.Keys should have comment or be unexported (golint)
    • Line 28: warning: exported method MMap.SecondaryKeys should have comment or be unexported (golint)
    • Line 40: warning: exported method MMap.Get should have comment or be unexported (golint)
    • Line 46: warning: exported method MMap.Put should have comment or be unexported (golint)
    • paxi/id.go
    • Line 57: warning: exported type IDs should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words