Preparing report...

Report for github.com/openchirp/framework

A+    Excellent!    Found 10 issues across 26 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!


golint76%

Golint is a linter for Go source code.

    • framework/pubsub/bridge.go
    • Line 48: warning: exported method Bridge.IsDeviceLinked should have comment or be unexported (golint)
    • Line 53: warning: exported method Bridge.IsLinkFwd should have comment or be unexported (golint)
    • Line 64: warning: exported method Bridge.IsLinkRev should have comment or be unexported (golint)
    • Line 75: warning: exported method Bridge.AddLinkFwd should have comment or be unexported (golint)
    • Line 105: warning: exported method Bridge.AddFwd should have comment or be unexported (golint)
    • Line 132: warning: exported method Bridge.AddLinkRev should have comment or be unexported (golint)
    • Line 162: warning: exported method Bridge.AddRev should have comment or be unexported (golint)
    • Line 189: warning: exported method Bridge.RemoveLinksAll should have comment or be unexported (golint)
    • framework/pubsub/mqttclient.go
    • Line 19: warning: comment on exported var AutoReconnect should be of the form "AutoReconnect ..." (golint)
    • Line 23: warning: exported type MQTTClient should have comment or be unexported (golint)
    • Line 34: warning: exported type MQTTQoS should have comment or be unexported (golint)
    • Line 37: warning: exported const QoSAtMostOnce should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported function ParseMQTTQoS should have comment or be unexported (golint)
    • Line 300: warning: exported method MQTTClient.Disconnect should have comment or be unexported (golint)
    • Line 307: warning: exported method MQTTClient.Subscribe should have comment or be unexported (golint)
    • Line 327: warning: exported method MQTTClient.Unsubscribe should have comment or be unexported (golint)
    • Line 347: warning: exported method MQTTClient.Publish should have comment or be unexported (golint)
    • framework/service.go
    • Line 17: warning: exported var ErrMarshalStatusMessage should have comment or be unexported (golint)
    • Line 18: warning: exported var ErrMarshalDeviceStatusMessage should have comment or be unexported (golint)
    • Line 19: warning: exported var ErrNotImplemented should have comment or be unexported (golint)
    • Line 20: warning: exported var ErrDeviceUpdatesAlreadyStarted should have comment or be unexported (golint)
    • Line 21: warning: exported var ErrDeviceUpdatesNotStarted should have comment or be unexported (golint)
    • Line 27: warning: comment on exported const DeviceUpdateTypeAdd should be of the form "DeviceUpdateTypeAdd ..." (golint)
    • Line 29: warning: comment on exported const DeviceUpdateTypeRem should be of the form "DeviceUpdateTypeRem ..." (golint)
    • Line 31: warning: comment on exported const DeviceUpdateTypeUpd should be of the form "DeviceUpdateTypeUpd ..." (golint)
    • framework/rest/rest.go
    • Line 34: warning: exported function DecodeOCError should have comment or be unexported (golint)
    • Line 75: warning: exported method Host.Login should have comment or be unexported (golint)
    • framework/rest/service.go
    • Line 99: warning: exported method ServiceDeviceListItem.GetID should have comment or be unexported (golint)
    • Line 103: warning: exported method ServiceDeviceListItem.GetConfigMap should have comment or be unexported (golint)
    • Line 110: warning: receiver name n should be consistent with previous receiver name i for ServiceDeviceListItem (golint)
    • Line 157: warning: comment on exported method Host.RequestServiceDeviceList should be of the form "RequestServiceDeviceList ..." (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!


misspell84%

Misspell Finds commonly misspelled English words