Preparing report...

Report for github.com/ksrichard/easyraft

(v0.0.0-20211201070756-114f2fd3b64f)

A    Great!    Found 14 issues across 15 files

Tweet

gofmt93%

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!


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!


golint6%

Golint is a linter for Go source code.

    • discovery/mdns.go
    • Line 16: warning: exported type MDNSDiscovery should have comment or be unexported (golint)
    • Line 25: warning: exported function NewMDNSDiscovery should have comment or be unexported (golint)
    • Line 35: warning: exported method MDNSDiscovery.Start should have comment or be unexported (golint)
    • Line 88: warning: exported method MDNSDiscovery.SupportsNodeAutoRemoval should have comment or be unexported (golint)
    • Line 92: warning: exported method MDNSDiscovery.Stop should have comment or be unexported (golint)
    • node.go
    • Line 28: warning: exported type Node should have comment or be unexported (golint)
    • Line 47: warning: exported function NewNode should have comment or be unexported (golint)
    • Line 130: warning: exported method Node.Start should have comment or be unexported (golint)
    • Line 203: warning: exported method Node.Stop should have comment or be unexported (golint)
    • Line 260: warning: exported method Node.NotifyJoin should have comment or be unexported (golint)
    • Line 272: warning: exported method Node.NotifyLeave should have comment or be unexported (golint)
    • Line 284: warning: exported method Node.NotifyUpdate should have comment or be unexported (golint)
    • Line 287: warning: exported method Node.RaftApply should have comment or be unexported (golint)
    • discovery/static.go
    • Line 3: warning: exported type StaticDiscovery should have comment or be unexported (golint)
    • Line 9: warning: exported function NewStaticDiscovery should have comment or be unexported (golint)
    • Line 17: warning: exported method StaticDiscovery.SupportsNodeAutoRemoval should have comment or be unexported (golint)
    • Line 21: warning: exported method StaticDiscovery.Start should have comment or be unexported (golint)
    • Line 30: warning: exported method StaticDiscovery.Stop should have comment or be unexported (golint)
    • serializer/msgpack.go
    • Line 7: warning: exported function NewMsgPackSerializer should have comment or be unexported (golint)
    • Line 11: warning: exported type ConverterService should have comment or be unexported (golint)
    • Line 14: warning: exported method ConverterService.Serialize should have comment or be unexported (golint)
    • Line 18: warning: exported method ConverterService.Deserialize should have comment or be unexported (golint)
    • fsm/base.go
    • Line 14: warning: exported type RoutingFSM should have comment or be unexported (golint)
    • Line 21: warning: exported function NewRoutingFSM should have comment or be unexported (golint)
    • Line 33: warning: exported method RoutingFSM.Init should have comment or be unexported (golint)
    • Line 43: warning: exported method RoutingFSM.Apply should have comment or be unexported (golint)
    • Line 55: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • Line 73: warning: exported method RoutingFSM.Snapshot should have comment or be unexported (golint)
    • Line 77: warning: exported method RoutingFSM.Restore should have comment or be unexported (golint)
    • fsm/base_snapshot.go
    • Line 8: warning: exported type BaseFSMSnapshot should have comment or be unexported (golint)
    • Line 13: warning: exported function NewBaseFSMSnapshot should have comment or be unexported (golint)
    • Line 17: warning: exported method BaseFSMSnapshot.Persist should have comment or be unexported (golint)
    • Line 27: warning: exported method BaseFSMSnapshot.Release should have comment or be unexported (golint)
    • client.go
    • Line 9: warning: exported function ApplyOnLeader should have comment or be unexported (golint)
    • Line 31: warning: exported function GetPeerDetails should have comment or be unexported (golint)
    • client_services.go
    • Line 8: warning: exported function NewClientGrpcService should have comment or be unexported (golint)
    • Line 14: warning: exported type ClientGrpcServices should have comment or be unexported (golint)
    • Line 19: warning: exported method ClientGrpcServices.ApplyLog should have comment or be unexported (golint)
    • Line 31: warning: exported method ClientGrpcServices.GetDetails should have comment or be unexported (golint)
    • fsm/fsm.go
    • Line 8: warning: exported type FSM should have comment or be unexported (golint)
    • Line 13: warning: exported type FSMService should have comment or be unexported (golint)
    • fsm/in_memory_map.go
    • Line 9: warning: exported type MapPutRequest should have comment or be unexported (golint)
    • Line 15: warning: exported type MapGetRequest should have comment or be unexported (golint)
    • Line 20: warning: exported type MapRemoveRequest should have comment or be unexported (golint)
    • Line 25: warning: exported type Map should have comment or be unexported (golint)
    • Line 30: warning: exported type InMemoryMapService should have comment or be unexported (golint)
    • Line 35: warning: exported function NewInMemoryMapService should have comment or be unexported (golint)
    • Line 39: warning: exported method InMemoryMapService.Name should have comment or be unexported (golint)
    • Line 43: warning: exported method InMemoryMapService.ApplySnapshot should have comment or be unexported (golint)
    • Line 53: warning: exported method InMemoryMapService.NewLog should have comment or be unexported (golint)
    • Line 83: warning: exported method InMemoryMapService.GetReqDataTypes should have comment or be unexported (golint)
    • Line 87: warning: exported method InMemoryMapService.Put should have comment or be unexported (golint)
    • Line 100: warning: exported method InMemoryMapService.Get should have comment or be unexported (golint)
    • Line 113: warning: exported method InMemoryMapService.Remove 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!