Preparing report...

Report for github.com/raff/goble

A+    Excellent!    Found 5 issues across 11 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!


gocyclo90%

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.

    • goble/goble.go
    • Line 164: warning: cyclomatic complexity 61 of function (*BLE).HandleXpcEvent() is high (> 15) (gocyclo)

golint54%

Golint is a linter for Go source code.

    • goble/examples/explorer.go
    • Line 19: warning: exported function DebugPrint should have comment or be unexported (golint)
    • Line 25: warning: exported type Result should have comment or be unexported (golint)
    • Line 121: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • goble/xpc/xpc.go
    • Line 17: warning: exported type XPC should have comment or be unexported (golint)
    • Line 21: warning: exported method XPC.Send should have comment or be unexported (golint)
    • Line 29: warning: comment on exported type Dict should be of the form "Dict ..." (with optional leading article) (golint)
    • Line 32: warning: exported method Dict.Contains should have comment or be unexported (golint)
    • Line 37: warning: exported method Dict.MustGetDict should have comment or be unexported (golint)
    • Line 45: warning: exported method Dict.MustGetArray should have comment or be unexported (golint)
    • Line 53: warning: exported method Dict.MustGetBytes should have comment or be unexported (golint)
    • Line 57: warning: exported method Dict.MustGetHexBytes should have comment or be unexported (golint)
    • Line 61: warning: exported method Dict.MustGetInt should have comment or be unexported (golint)
    • Line 65: warning: exported method Dict.MustGetUUID should have comment or be unexported (golint)
    • Line 69: warning: exported method Dict.GetString should have comment or be unexported (golint)
    • Line 73: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 79: warning: exported method Dict.GetBytes should have comment or be unexported (golint)
    • Line 83: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 89: warning: exported method Dict.GetInt should have comment or be unexported (golint)
    • Line 93: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 99: warning: exported method Dict.GetUUID should have comment or be unexported (golint)
    • Line 103: warning: comment on exported type Array should be of the form "Array ..." (with optional leading article) (golint)
    • Line 106: warning: exported method Array.GetUUID should have comment or be unexported (golint)
    • Line 110: warning: comment on exported type UUID should be of the form "UUID ..." (with optional leading article) (golint)
    • Line 113: warning: exported function MakeUUID should have comment or be unexported (golint)
    • Line 124: warning: exported function MustUUID should have comment or be unexported (golint)
    • Line 144: warning: exported function GetUUID should have comment or be unexported (golint)
    • Line 178: warning: error var CONNECTION_INVALID should have name of the form ErrFoo (golint)
    • Line 178: warning: exported var CONNECTION_INVALID should have comment or be unexported (golint)
    • Line 179: warning: error var CONNECTION_INTERRUPTED should have name of the form ErrFoo (golint)
    • Line 180: warning: error var CONNECTION_TERMINATED should have name of the form ErrFoo (golint)
    • Line 188: warning: exported type XpcEventHandler should have comment or be unexported (golint)
    • Line 192: warning: exported function XpcConnect should have comment or be unexported (golint)
    • Line 360: warning: don't use underscores in Go names; func xpc_release should be xpcRelease (golint)
    • Line 366: warning: exported type Utsname should have comment or be unexported (golint)
    • Line 374: warning: exported function Uname should have comment or be unexported (golint)
    • goble/xpc/xpc_test.go
    • Line 10: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • goble/emitter.go
    • Line 10: warning: exported const ALL should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: comment on exported type EventHandlerFunc should be of the form "EventHandlerFunc ..." (with optional leading article) (golint)
    • Line 66: warning: exported method Emitter.SetVerbose should have comment or be unexported (golint)
    • Line 75: warning: comment on exported method Emitter.On should be of the form "On ..." (golint)
    • goble/goble.go
    • Line 20: warning: exported var STATES should have comment or be unexported (golint)
    • Line 22: warning: exported type Property should have comment or be unexported (golint)
    • Line 25: warning: exported const Broadcast should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported method Property.Readable should have comment or be unexported (golint)
    • Line 68: warning: exported type ServiceData should have comment or be unexported (golint)
    • Line 73: warning: exported type CharacteristicDescriptor should have comment or be unexported (golint)
    • Line 78: warning: exported type ServiceCharacteristic should have comment or be unexported (golint)
    • Line 88: warning: exported type ServiceHandle should have comment or be unexported (golint)
    • Line 97: warning: exported type Advertisement should have comment or be unexported (golint)
    • Line 105: warning: exported type Peripheral should have comment or be unexported (golint)
    • Line 115: warning: comment on exported type Descriptor should be of the form "Descriptor ..." (with optional leading article) (golint)
    • Line 121: warning: comment on exported type Characteristic should be of the form "Characteristic ..." (with optional leading article) (golint)
    • Line 130: warning: comment on exported type Service should be of the form "Service ..." (with optional leading article) (golint)
    • Line 136: warning: exported type BLE should have comment or be unexported (golint)
    • Line 149: warning: exported function New should have comment or be unexported (golint)
    • Line 157: warning: exported method BLE.SetVerbose should have comment or be unexported (golint)
    • Line 162: warning: comment on exported method BLE.HandleXpcEvent should be of the form "HandleXpcEvent ..." (golint)
    • Line 482: warning: comment on exported method BLE.Init should be of the form "Init ..." (golint)
    • Line 488: warning: comment on exported method BLE.StartAdvertising should be of the form "StartAdvertising ..." (golint)
    • Line 497: warning: comment on exported method BLE.StartAdvertisingIBeaconData should be of the form "StartAdvertisingIBeaconData ..." (golint)
    • Line 509: warning: comment on exported method BLE.StartAdvertisingIBeacon should be of the form "StartAdvertisingIBeacon ..." (golint)
    • Line 520: warning: comment on exported method BLE.StopAdvertising should be of the form "StopAdvertising ..." (golint)
    • Line 525: warning: comment on exported method BLE.StartScanning should be of the form "StartScanning ..." (golint)
    • Line 554: warning: comment on exported method BLE.StopScanning should be of the form "StopScanning ..." (golint)
    • Line 565: warning: comment on exported method BLE.Connect should be of the form "Connect ..." (golint)
    • Line 581: warning: comment on exported method BLE.Disconnect should be of the form "Disconnect ..." (golint)
    • Line 597: warning: comment on exported method BLE.UpdateRssi should be of the form "UpdateRssi ..." (golint)
    • Line 613: warning: comment on exported method BLE.DiscoverServices should be of the form "DiscoverServices ..." (golint)
    • Line 633: warning: comment on exported method BLE.DiscoverCharacteristics should be of the form "DiscoverCharacteristics ..." (golint)
    • Line 660: warning: comment on exported method BLE.DiscoverDescriptors should be of the form "DiscoverDescriptors ..." (golint)
    • Line 708: warning: comment on exported method BLE.RemoveServices should be of the form "RemoveServices ..." (golint)
    • Line 713: warning: comment on exported method BLE.SetServices should be of the form "SetServices ..." (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!


misspell90%

Misspell Finds commonly misspelled English words