Preparing report...

Report for github.com/karalabe/gousb

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


golint59%

Golint is a linter for Go source code.

    • gousb/usb/config.go
    • Line 32: warning: exported type EndpointInfo should have comment or be unexported (golint)
    • Line 42: warning: exported method EndpointInfo.Number should have comment or be unexported (golint)
    • Line 46: warning: exported method EndpointInfo.Direction should have comment or be unexported (golint)
    • Line 60: warning: exported type InterfaceInfo should have comment or be unexported (golint)
    • Line 69: warning: exported type InterfaceSetup should have comment or be unexported (golint)
    • Line 82: warning: exported type ConfigInfo should have comment or be unexported (golint)
    • gousb/usb/constants.go
    • Line 20: warning: exported type Class should have comment or be unexported (golint)
    • Line 23: warning: exported const CLASS_PER_INTERFACE should have comment (or a comment on this block) or be unexported (golint)
    • Line 56: warning: exported type DescriptorType should have comment or be unexported (golint)
    • Line 59: warning: exported const DT_DEVICE should have comment (or a comment on this block) or be unexported (golint)
    • Line 86: warning: exported type EndpointDirection should have comment or be unexported (golint)
    • Line 89: warning: exported const ENDPOINT_NUM_MASK should have comment (or a comment on this block) or be unexported (golint)
    • Line 104: warning: exported type TransferType should have comment or be unexported (golint)
    • Line 107: warning: exported const TRANSFER_TYPE_CONTROL should have comment (or a comment on this block) or be unexported (golint)
    • Line 125: warning: exported type IsoSyncType should have comment or be unexported (golint)
    • Line 128: warning: exported const ISO_SYNC_TYPE_NONE should have comment (or a comment on this block) or be unexported (golint)
    • Line 146: warning: exported type IsoUsageType should have comment or be unexported (golint)
    • Line 149: warning: exported const ISO_USAGE_TYPE_DATA should have comment (or a comment on this block) or be unexported (golint)
    • Line 165: warning: exported type RequestType should have comment or be unexported (golint)
    • Line 168: warning: exported const REQUEST_TYPE_STANDARD should have comment (or a comment on this block) or be unexported (golint)
    • gousb/usb/device.go
    • Line 34: warning: exported var DefaultReadTimeout should have comment or be unexported (golint)
    • Line 35: warning: exported var DefaultWriteTimeout should have comment or be unexported (golint)
    • Line 36: warning: exported var DefaultControlTimeout should have comment or be unexported (golint)
    • Line 38: warning: exported type Device should have comment or be unexported (golint)
    • Line 129: warning: exported method Device.Reset should have comment or be unexported (golint)
    • Line 136: warning: exported method Device.Control should have comment or be unexported (golint)
    • Line 190: warning: exported method Device.OpenEndpoint should have comment or be unexported (golint)
    • Line 274: warning: exported method Device.GetStringDescriptor should have comment or be unexported (golint)
    • Line 274: warning: don't use underscores in Go names; method parameter desc_index should be descIndex (golint)
    • gousb/usb/endpoint.go
    • Line 27: warning: exported type Endpoint should have comment or be unexported (golint)
    • Line 62: warning: don't use underscores in Go names; func bulk_xfer should be bulkXfer (golint)
    • Line 82: warning: don't use underscores in Go names; func interrupt_xfer should be interruptXfer (golint)
    • gousb/usb/misc.go
    • Line 21: warning: exported type BCD should have comment or be unexported (golint)
    • Line 24: warning: exported const USB_2_0 should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported method BCD.Int should have comment or be unexported (golint)
    • Line 43: warning: exported type ID should have comment or be unexported (golint)
    • gousb/usb/error.go
    • Line 31: warning: exported const SUCCESS should have comment (or a comment on this block) or be unexported (golint)
    • Line 64: warning: exported type TransferStatus should have comment or be unexported (golint)
    • Line 67: warning: exported const LIBUSB_TRANSFER_COMPLETED should have comment (or a comment on this block) or be unexported (golint)
    • gousb/usb/iso.go
    • Line 42: warning: don't use underscores in Go names; const iso_packets should be isoPackets (golint)
    • Line 43: warning: don't use underscores in Go names; const packet_size should be packetSize (golint)
    • Line 82: warning: exported type Transfer should have comment or be unexported (golint)
    • Line 89: warning: exported method Transfer.Submit should have comment or be unexported (golint)
    • Line 98: warning: exported method Transfer.Wait should have comment or be unexported (golint)
    • Line 128: warning: exported method Transfer.Close should have comment or be unexported (golint)
    • Line 133: warning: don't use underscores in Go names; func isochronous_xfer should be isochronousXfer (golint)
    • gousb/usb/usb.go
    • Line 63: warning: exported type Context should have comment or be unexported (golint)
    • Line 68: warning: exported method Context.Debug should have comment or be unexported (golint)
    • Line 72: warning: exported function NewContext should have comment or be unexported (golint)
    • Line 171: warning: exported method Context.Close 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!


misspell90%

Misspell Finds commonly misspelled English words

    • gousb/usbid/load_data.go
    • Line 2108: warning: "Reciever" is a misspelling of "Receiver" (misspell)
    • Line 2485: warning: "Messanger" is a misspelling of "Messenger" (misspell)
    • Line 2637: warning: "Reciever" is a misspelling of "Receiver" (misspell)
    • Line 7920: warning: "Promptus" is a misspelling of "Prompts" (misspell)
    • Line 7953: warning: "Sandstrom" is a misspelling of "Sandstorm" (misspell)
    • Line 12372: warning: "Clas" is a misspelling of "Class" (misspell)
    • Line 12724: warning: "JSTU" is a misspelling of "JUST" (misspell)
    • Line 13482: warning: "Intellegent" is a misspelling of "Intelligent" (misspell)
    • Line 13713: warning: "Internatinal" is a misspelling of "International" (misspell)
    • Line 17183: warning: "Electroncs" is a misspelling of "Electrons" (misspell)
    • Line 17186: warning: "aquisition" is a misspelling of "acquisition" (misspell)
    • Line 18715: warning: "Simualtion" is a misspelling of "Simulation" (misspell)
    • Line 19874: warning: "Carribean" is a misspelling of "Caribbean" (misspell)