Preparing report...

Report for github.com/heidi-ann/ios

A+    Excellent!    Found 29 issues across 67 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!


gocyclo88%

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.

    • ios/net/peers.go
    • Line 39: warning: cyclomatic complexity 20 of function (*peerHandler).handlePeer() is high (> 15) (gocyclo)
    • ios/msgs/marshal.go
    • Line 21: warning: cyclomatic complexity 63 of function (*ProtoMsgs).BytesToProtoMsg() is high (> 15) (gocyclo)
    • Line 225: warning: cyclomatic complexity 16 of function (*ProtoMsgs).ProtoMsgToBytes() is high (> 15) (gocyclo)
    • ios/msgs/msgs.go
    • Line 49: warning: cyclomatic complexity 32 of function broadcaster() is high (> 15) (gocyclo)
    • Line 191: warning: cyclomatic complexity 18 of function (*ProtoMsgs).Discard() is high (> 15) (gocyclo)
    • Line 136: warning: cyclomatic complexity 17 of function (*ProtoMsgs).Forward() is high (> 15) (gocyclo)

golint70%

Golint is a linter for Go source code.

    • ios/clientcli/cli/cli.go
    • Line 13: warning: exported type Interative should have comment or be unexported (golint)
    • Line 15: warning: exported function CreateInteractiveTerminal should have comment or be unexported (golint)
    • Line 22: warning: exported method Interative.FetchTerminalInput should have comment or be unexported (golint)
    • Line 36: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 42: warning: exported method Interative.ReturnToTerminal should have comment or be unexported (golint)
    • Line 42: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • ios/client/client.go
    • Line 172: warning: exported method Client.SubmitRequest should have comment or be unexported (golint)
    • Line 300: warning: exported method Client.StopClient should have comment or be unexported (golint)
    • ios/msgs/failures.go
    • Line 9: warning: exported type FailureNotifier should have comment or be unexported (golint)
    • Line 16: warning: exported function NewFailureNotifier should have comment or be unexported (golint)
    • Line 24: warning: exported method FailureNotifier.NotifyOnFailure should have comment or be unexported (golint)
    • Line 33: warning: exported method FailureNotifier.IsConnected should have comment or be unexported (golint)
    • Line 40: warning: comment on exported method FailureNotifier.NextConnected should be of the form "NextConnected ..." (golint)
    • Line 57: warning: exported method FailureNotifier.NowConnected should have comment or be unexported (golint)
    • Line 68: warning: exported method FailureNotifier.NowDisconnected should have comment or be unexported (golint)
    • ios/msgs/msgs.go
    • Line 10: warning: exported type Requests should have comment or be unexported (golint)
    • Line 21: warning: exported type Responses should have comment or be unexported (golint)
    • Line 31: warning: exported type ProtoMsgs should have comment or be unexported (golint)
    • Line 36: warning: exported type ClientNet should have comment or be unexported (golint)
    • Line 42: warning: exported type PeerNet should have comment or be unexported (golint)
    • Line 190: warning: comment on exported method ProtoMsgs.Discard should be of the form "Discard ..." (golint)
    • Line 191: warning: receiver name from should be consistent with previous receiver name to for ProtoMsgs (golint)
    • Line 217: warning: exported function MakeProtoMsgs should have comment or be unexported (golint)
    • Line 238: warning: exported function MakeClientNet should have comment or be unexported (golint)
    • Line 246: warning: exported function MakePeerNet should have comment or be unexported (golint)
    • ios/msgs/storage.go
    • Line 7: warning: exported type Storage should have comment or be unexported (golint)
    • Line 13: warning: exported type ExternalStorage should have comment or be unexported (golint)
    • Line 20: warning: exported function MakeExternalStorage should have comment or be unexported (golint)
    • Line 30: warning: exported method ExternalStorage.PersistView should have comment or be unexported (golint)
    • Line 36: warning: exported method ExternalStorage.PersistLogUpdate should have comment or be unexported (golint)
    • Line 42: warning: exported method ExternalStorage.PersistSnapshot should have comment or be unexported (golint)
    • Line 47: warning: exported type DummyStorage should have comment or be unexported (golint)
    • Line 49: warning: exported function MakeDummyStorage should have comment or be unexported (golint)
    • Line 53: warning: exported method DummyStorage.PersistView should have comment or be unexported (golint)
    • Line 53: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 58: warning: exported method DummyStorage.PersistLogUpdate should have comment or be unexported (golint)
    • Line 58: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 63: warning: exported method DummyStorage.PersistSnapshot should have comment or be unexported (golint)
    • Line 63: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • ios/services/services.go
    • Line 7: warning: exported type Service should have comment or be unexported (golint)
    • Line 15: warning: exported function StartService should have comment or be unexported (golint)
    • Line 28: warning: exported function GetInteractiveText should have comment or be unexported (golint)
    • Line 50: warning: exported function Parse should have comment or be unexported (golint)
    • ios/consensus/consensus.go
    • Line 12: warning: exported type ConfigAll should have comment or be unexported (golint)
    • Line 19: warning: exported type ConfigMaster should have comment or be unexported (golint)
    • Line 26: warning: exported type ConfigCoordinator should have comment or be unexported (golint)
    • Line 31: warning: exported type ConfigParticipant should have comment or be unexported (golint)
    • Line 37: warning: exported type ConfigInterfacer should have comment or be unexported (golint)
    • ios/msgs/formats.go
    • Line 78: warning: exported type NewViewRequest should have comment or be unexported (golint)
    • Line 83: warning: exported type NewViewResponse should have comment or be unexported (golint)
    • Line 89: warning: exported type NewView should have comment or be unexported (golint)
    • Line 94: warning: exported type QueryRequest should have comment or be unexported (golint)
    • Line 101: warning: exported type QueryResponse should have comment or be unexported (golint)
    • Line 107: warning: exported type Query should have comment or be unexported (golint)
    • Line 112: warning: exported type CopyRequest should have comment or be unexported (golint)
    • Line 125: warning: exported type Copy should have comment or be unexported (golint)
    • Line 130: warning: exported type CoordinateRequest should have comment or be unexported (golint)
    • Line 139: warning: exported type CoordinateResponse should have comment or be unexported (golint)
    • Line 144: warning: exported type Coordinate should have comment or be unexported (golint)
    • Line 149: warning: exported type ForwardRequest should have comment or be unexported (golint)
    • Line 155: warning: comment on exported type CheckRequest should be of the form "CheckRequest ..." (with optional leading article) (golint)
    • Line 161: warning: exported type CheckResponse should have comment or be unexported (golint)
    • Line 168: warning: exported type Check should have comment or be unexported (golint)
    • Line 173: warning: exported type LogUpdate should have comment or be unexported (golint)
    • ios/msgs/marshal.go
    • Line 13: warning: exported function Marshal should have comment or be unexported (golint)
    • Line 17: warning: exported function Unmarshal should have comment or be unexported (golint)
    • Line 21: warning: exported method ProtoMsgs.BytesToProtoMsg should have comment or be unexported (golint)
    • Line 225: warning: exported method ProtoMsgs.ProtoMsgToBytes should have comment or be unexported (golint)
    • ios/client/kvclient/kvclient.go
    • Line 14: warning: exported type KvClient should have comment or be unexported (golint)
    • Line 25: warning: exported method KvClient.Update should have comment or be unexported (golint)
    • Line 30: warning: exported method KvClient.Get should have comment or be unexported (golint)
    • Line 34: warning: exported method KvClient.Delete should have comment or be unexported (golint)
    • Line 39: warning: exported method KvClient.Count should have comment or be unexported (golint)
    • Line 48: warning: exported method KvClient.Print should have comment or be unexported (golint)
    • ios/config/client.go
    • Line 9: warning: exported type Config should have comment or be unexported (golint)
    • Line 36: warning: comment on exported function ParseClientConfig should be of the form "ParseClientConfig ..." (golint)
    • ios/consensus/log.go
    • Line 40: warning: exported function NewLog should have comment or be unexported (golint)
    • Line 44: warning: exported function RestoreLog should have comment or be unexported (golint)
    • Line 48: warning: exported method Log.AddEntries should have comment or be unexported (golint)
    • Line 72: warning: exported method Log.AddEntry should have comment or be unexported (golint)
    • Line 76: warning: exported method Log.GetEntries should have comment or be unexported (golint)
    • Line 88: warning: exported method Log.GetEntriesFrom should have comment or be unexported (golint)
    • Line 96: warning: exported method Log.GetEntry should have comment or be unexported (golint)
    • ios/msgs/notifier.go
    • Line 7: warning: exported type Notificator should have comment or be unexported (golint)
    • Line 12: warning: exported function NewNotificator should have comment or be unexported (golint)
    • Line 18: warning: exported method Notificator.Notify should have comment or be unexported (golint)
    • Line 27: warning: comment on exported method Notificator.Subscribe should be of the form "Subscribe ..." (golint)
    • Line 38: warning: exported method Notificator.IsSubscribed should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell92%

Misspell Finds commonly misspelled English words