Preparing report...

Report for github.com/muka/go-bluetooth

A+    Excellent!    Found 72 issues across 142 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!


gocyclo95%

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.


golint52%

Golint is a linter for Go source code.

    • go-bluetooth/hw/hw.go
    • Line 9: warning: exported function GetAdapter should have comment or be unexported (golint)
    • Line 13: warning: exported function GetAdapters should have comment or be unexported (golint)
    • Line 17: warning: exported function Up should have comment or be unexported (golint)
    • Line 21: warning: exported function Down should have comment or be unexported (golint)
    • Line 25: warning: exported function Reset should have comment or be unexported (golint)
    • Line 29: warning: exported function NewBtMgmt should have comment or be unexported (golint)
    • Line 33: warning: exported function NewHCIConfig should have comment or be unexported (golint)
    • go-bluetooth/api/advertisement.go
    • Line 12: warning: comment on exported const BaseAdvertismentPath should be of the form "BaseAdvertismentPath ..." (golint)
    • Line 29: warning: exported type Advertisement should have comment or be unexported (golint)
    • Line 37: warning: exported method Advertisement.DBusConn should have comment or be unexported (golint)
    • Line 41: warning: exported method Advertisement.DBusObjectManager should have comment or be unexported (golint)
    • Line 45: warning: exported method Advertisement.DBusProperties should have comment or be unexported (golint)
    • Line 49: warning: exported method Advertisement.GetProperties should have comment or be unexported (golint)
    • Line 53: warning: exported method Advertisement.Path should have comment or be unexported (golint)
    • Line 57: warning: exported method Advertisement.Interface should have comment or be unexported (golint)
    • Line 61: warning: exported function NewAdvertisement should have comment or be unexported (golint)
    • Line 89: warning: comment on exported function ExposeAdvertisement should be of the form "ExposeAdvertisement ..." (golint)
    • go-bluetooth/api/service/app_service.go
    • Line 13: warning: exported type Service should have comment or be unexported (golint)
    • Line 22: warning: exported method Service.DBusProperties should have comment or be unexported (golint)
    • Line 26: warning: exported method Service.Path should have comment or be unexported (golint)
    • Line 30: warning: exported method Service.Interface should have comment or be unexported (golint)
    • Line 34: warning: exported method Service.GetProperties should have comment or be unexported (golint)
    • Line 45: warning: exported method Service.App should have comment or be unexported (golint)
    • Line 49: warning: exported method Service.DBusObjectManager should have comment or be unexported (golint)
    • Line 53: warning: exported method Service.DBusConn should have comment or be unexported (golint)
    • Line 67: warning: exported method Service.GetChars should have comment or be unexported (golint)
    • Line 94: warning: exported method Service.AddChar should have comment or be unexported (golint)
    • go-bluetooth/gen/types/parser.go
    • Line 8: warning: exported type ApiGroup should have comment or be unexported (golint)
    • Line 16: warning: exported type Api should have comment or be unexported (golint)
    • Line 28: warning: exported type Flag should have comment or be unexported (golint)
    • Line 31: warning: exported const FlagReadOnly should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported type Arg should have comment or be unexported (golint)
    • Line 48: warning: exported type Method should have comment or be unexported (golint)
    • Line 64: warning: exported type Property should have comment or be unexported (golint)
    • go-bluetooth/api/service/app_service_mgm.go
    • Line 13: warning: exported method App.GetServices should have comment or be unexported (golint)
    • Line 17: warning: exported method App.NewService should have comment or be unexported (golint)
    • Line 36: warning: exported method App.AddService should have comment or be unexported (golint)
    • go-bluetooth/gen/types/generator.go
    • Line 3: warning: exported type BluezError should have comment or be unexported (golint)
    • Line 8: warning: exported type BluezErrors should have comment or be unexported (golint)
    • Line 12: warning: exported type MethodDoc should have comment or be unexported (golint)
    • Line 22: warning: exported type InterfaceDoc should have comment or be unexported (golint)
    • Line 28: warning: exported type InterfacesDoc should have comment or be unexported (golint)
    • Line 32: warning: exported type PropertyDoc should have comment or be unexported (golint)
    • Line 41: warning: exported type ApiGroupDoc should have comment or be unexported (golint)
    • Line 46: warning: exported type ApiDoc should have comment or be unexported (golint)
    • Line 57: warning: exported type Constructor should have comment or be unexported (golint)
    • go-bluetooth/bluez/profile/obex/Client1.go
    • Line 9: warning: comment on exported function NewObexClient1 should be of the form "NewObexClient1 ..." (golint)
    • Line 34: warning: comment on exported method ObexClient1.CreateSession should be of the form "CreateSession ..." (golint)
    • Line 64: warning: comment on exported method ObexClient1.RemoveSession should be of the form "RemoveSession ..." (golint)
    • go-bluetooth/gen/generator/generator_tpl.go
    • Line 11: warning: exported function RootTemplate should have comment or be unexported (golint)
    • Line 35: warning: exported function ErrorsTemplate should have comment or be unexported (golint)
    • Line 82: warning: exported function InterfacesTemplate should have comment or be unexported (golint)
    • go-bluetooth/gen/parser/api.go
    • Line 12: warning: exported type ApiParser should have comment or be unexported (golint)
    • Line 32: warning: exported method ApiParser.Parse should have comment or be unexported (golint)
    • Line 60: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-bluetooth/gen/parser/property.go
    • Line 14: warning: exported type PropertyParser should have comment or be unexported (golint)
    • Line 19: warning: comment on exported function NewPropertyParser should be of the form "NewPropertyParser ..." (golint)
    • Line 27: warning: exported method PropertyParser.Parse should have comment or be unexported (golint)
    • go-bluetooth/bluez/profile/mesh/types.go
    • Line 11: warning: comment on exported type VendorOptionsItem should be of the form "VendorOptionsItem ..." (with optional leading article) (golint)
    • Line 17: warning: comment on exported type ModelConfig should be of the form "ModelConfig ..." (with optional leading article) (golint)
    • Line 25: warning: comment on exported type Model should be of the form "Model ..." (with optional leading article) (golint)
    • go-bluetooth/api/beacon/beacon.go
    • Line 14: warning: exported type BeaconType should have comment or be unexported (golint)
    • Line 17: warning: exported const BeaconTypeEddystone should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported type Beacon should have comment or be unexported (golint)
    • Line 30: warning: exported function NewBeacon should have comment or be unexported (golint)
    • Line 108: warning: comment on exported method Beacon.Parse should be of the form "Parse ..." (golint)
    • go-bluetooth/bluez/profile/obex/Transfer1.go
    • Line 62: warning: comment on exported method ObexTransfer1.Cancel should be of the form "Cancel ..." (golint)
    • Line 69: warning: receiver name a should be consistent with previous receiver name d for ObexTransfer1 (golint)
    • Line 83: warning: receiver name a should be consistent with previous receiver name d for ObexTransfer1 (golint)
    • Line 97: warning: receiver name a should be consistent with previous receiver name d for ObexTransfer1 (golint)
    • go-bluetooth/api/service/app_getter.go
    • Line 10: warning: exported method App.AdapterID should have comment or be unexported (golint)
    • Line 14: warning: exported method App.Adapter should have comment or be unexported (golint)
    • Line 18: warning: exported method App.Agent should have comment or be unexported (golint)
    • Line 22: warning: comment on exported method App.Path should be of the form "Path ..." (golint)
    • Line 27: warning: comment on exported method App.DBusConn should be of the form "DBusConn ..." (golint)
    • Line 32: warning: exported method App.DBusObjectManager should have comment or be unexported (golint)
    • Line 36: warning: exported method App.SetName should have comment or be unexported (golint)
    • go-bluetooth/bluez/profile/advertising/advertising.go
    • Line 4: warning: exported const SecondaryChannel1M should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported const AdvertisementTypeBroadcast should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported method LEAdvertisement1Properties.AddServiceUUID should have comment or be unexported (golint)
    • Line 37: warning: exported method LEAdvertisement1Properties.AddData should have comment or be unexported (golint)
    • Line 44: warning: exported method LEAdvertisement1Properties.AddServiceData should have comment or be unexported (golint)
    • Line 51: warning: exported method LEAdvertisement1Properties.AddManifacturerData should have comment or be unexported (golint)
    • go-bluetooth/api/service/app_descr.go
    • Line 10: warning: exported type DescrReadCallback should have comment or be unexported (golint)
    • Line 11: warning: exported type DescrWriteCallback should have comment or be unexported (golint)
    • Line 13: warning: exported type Descr should have comment or be unexported (golint)
    • Line 27: warning: exported method Descr.DBusProperties should have comment or be unexported (golint)
    • Line 31: warning: exported method Descr.DBusObjectManager should have comment or be unexported (golint)
    • Line 35: warning: exported method Descr.DBusConn should have comment or be unexported (golint)
    • Line 39: warning: exported method Descr.Path should have comment or be unexported (golint)
    • Line 43: warning: exported method Descr.Char should have comment or be unexported (golint)
    • Line 47: warning: exported method Descr.Interface should have comment or be unexported (golint)
    • Line 51: warning: exported method Descr.GetProperties should have comment or be unexported (golint)
    • Line 56: warning: exported method Descr.App should have comment or be unexported (golint)
    • go-bluetooth/api/service/gatt.go
    • Line 7: warning: comment on exported function NewGattService1Properties should be of the form "NewGattService1Properties ..." (golint)
    • Line 16: warning: comment on exported function NewGattCharacteristic1Properties should be of the form "NewGattCharacteristic1Properties ..." (golint)
    • Line 24: warning: comment on exported function NewGattDescriptor1Properties should be of the form "NewGattDescriptor1Properties ..." (golint)
    • go-bluetooth/props/props.go
    • Line 14: warning: exported type PropInfo should have comment or be unexported (golint)
    • Line 19: warning: exported function ParseProperties should have comment or be unexported (golint)
    • go-bluetooth/bluez/props.go
    • Line 11: warning: exported type WatchableClient should have comment or be unexported (golint)
    • Line 100: warning: exported function UnwatchProperties should have comment or be unexported (golint)
    • go-bluetooth/examples/btmgmt/btmgmt.go
    • Line 1: warning: package comment should be of the form "Package btmgmt_example ..." (golint)
    • Line 2: warning: don't use an underscore in package name (golint)
    • Line 9: warning: exported function Run should have comment or be unexported (golint)
    • go-bluetooth/hw/linux/linux.go
    • Line 13: warning: exported type BackendType should have comment or be unexported (golint)
    • Line 16: warning: exported const BackendBtmgmt should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported var Backend should have comment or be unexported (golint)
    • Line 23: warning: exported type AdapterInfo should have comment or be unexported (golint)
    • Line 68: warning: exported function Up should have comment or be unexported (golint)
    • Line 100: warning: exported function Down should have comment or be unexported (golint)
    • Line 131: warning: exported function Reset should have comment or be unexported (golint)
    • go-bluetooth/examples/service/main.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 10: warning: exported function Run should have comment or be unexported (golint)
    • Line 27: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-bluetooth/bluez/profile/adapter/adapter_filter.go
    • Line 8: warning: exported const DiscoveryFilterTransportAuto should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: comment on exported type DiscoveryFilter should be of the form "DiscoveryFilter ..." (with optional leading article) (golint)
    • Line 80: warning: comment on exported method DiscoveryFilter.AddUUIDs should be of the form "AddUUIDs ..." (golint)
    • Line 108: warning: comment on exported function NewDiscoveryFilter should be of the form "NewDiscoveryFilter ..." (golint)
    • go-bluetooth/bluez/profile/agent/agent_simple.go
    • Line 13: warning: exported const AgentBasePath should have comment or be unexported (golint)
    • Line 14: warning: exported const SimpleAgentPinCode should have comment or be unexported (golint)
    • Line 15: warning: exported const SimpleAgentPassKey should have comment or be unexported (golint)
    • Line 17: warning: exported function NextAgentPath should have comment or be unexported (golint)
    • Line 49: warning: exported method SimpleAgent.SetPassKey should have comment or be unexported (golint)
    • Line 49: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 53: warning: exported method SimpleAgent.SetPassCode should have comment or be unexported (golint)
    • Line 53: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 57: warning: exported method SimpleAgent.PassKey should have comment or be unexported (golint)
    • Line 57: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 61: warning: exported method SimpleAgent.PassCode should have comment or be unexported (golint)
    • Line 61: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 65: warning: exported method SimpleAgent.Path should have comment or be unexported (golint)
    • Line 65: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 69: warning: exported method SimpleAgent.Interface should have comment or be unexported (golint)
    • Line 69: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 73: warning: exported method SimpleAgent.Release should have comment or be unexported (golint)
    • Line 73: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 77: warning: exported method SimpleAgent.RequestPinCode should have comment or be unexported (golint)
    • Line 77: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 97: warning: exported method SimpleAgent.DisplayPinCode should have comment or be unexported (golint)
    • Line 97: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 102: warning: exported method SimpleAgent.RequestPasskey should have comment or be unexported (golint)
    • Line 102: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 120: warning: exported method SimpleAgent.DisplayPasskey should have comment or be unexported (golint)
    • Line 120: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 125: warning: exported method SimpleAgent.RequestConfirmation should have comment or be unexported (golint)
    • Line 125: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 145: warning: exported method SimpleAgent.RequestAuthorization should have comment or be unexported (golint)
    • Line 145: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 150: warning: exported method SimpleAgent.AuthorizeService should have comment or be unexported (golint)
    • Line 150: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 155: warning: exported method SimpleAgent.Cancel should have comment or be unexported (golint)
    • Line 155: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • go-bluetooth/api/service/app_char.go
    • Line 13: warning: exported type CharReadCallback should have comment or be unexported (golint)
    • Line 14: warning: exported type CharWriteCallback should have comment or be unexported (golint)
    • Line 16: warning: exported type Char should have comment or be unexported (golint)
    • Line 31: warning: exported method Char.Path should have comment or be unexported (golint)
    • Line 35: warning: exported method Char.DBusProperties should have comment or be unexported (golint)
    • Line 39: warning: exported method Char.Interface should have comment or be unexported (golint)
    • Line 43: warning: exported method Char.GetProperties should have comment or be unexported (golint)
    • Line 54: warning: exported method Char.GetDescr should have comment or be unexported (golint)
    • Line 54: warning: receiver name c should be consistent with previous receiver name s for Char (golint)
    • Line 58: warning: exported method Char.App should have comment or be unexported (golint)
    • Line 58: warning: receiver name c should be consistent with previous receiver name s for Char (golint)
    • Line 62: warning: exported method Char.Service should have comment or be unexported (golint)
    • Line 62: warning: receiver name c should be consistent with previous receiver name s for Char (golint)
    • Line 66: warning: exported method Char.DBusObjectManager should have comment or be unexported (golint)
    • Line 70: warning: exported method Char.DBusConn should have comment or be unexported (golint)
    • Line 74: warning: exported method Char.RemoveDescr should have comment or be unexported (golint)
    • go-bluetooth/gen/filters/filter.go
    • Line 9: warning: exported type FilterContext should have comment or be unexported (golint)
    • Line 12: warning: exported const FilterFile should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported const ParamFileFilter should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported type Filter should have comment or be unexported (golint)
    • Line 28: warning: exported function NewFilter should have comment or be unexported (golint)
    • Line 66: warning: exported function ParseCliFilters should have comment or be unexported (golint)
    • go-bluetooth/api/api.go
    • Line 1: warning: package comment should be of the form "Package api ..." (golint)
    • Line 23: warning: exported function GetAdapter should have comment or be unexported (golint)
    • Line 39: warning: exported function GetDefaultAdapter should have comment or be unexported (golint)
    • Line 43: warning: exported function GetDefaultAdapterID should have comment or be unexported (golint)
    • go-bluetooth/api/service_expose.go
    • Line 11: warning: exported type ExposedDBusService should have comment or be unexported (golint)
    • Line 22: warning: exported function RemoveDBusService should have comment or be unexported (golint)
    • Line 32: warning: comment on exported function ExposeDBusService should be of the form "ExposeDBusService ..." (golint)
    • go-bluetooth/hw/linux/rfkill/rfkill.go
    • Line 47: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 54: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 91: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 104: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 117: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 130: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 143: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 157: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 172: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 184: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell97%

Misspell Finds commonly misspelled English words