Preparing report...

Report for github.com/zserge/hid

A    Great!    Found 5 issues across 6 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!


gocyclo66%

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.


golint16%

Golint is a linter for Go source code.

    • hid/example/main.go
    • Line 25: 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)
    • hid/hid.go
    • Line 9: warning: comment on exported type Info should be of the form "Info ..." (with optional leading article) (golint)
    • Line 25: warning: comment on exported type Device should be of the form "Device ..." (with optional leading article) (golint)
    • Line 40: warning: comment on exported var Logger should be of the form "Logger ..." (golint)
    • hid/usb_linux.go
    • Line 37: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 113: 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 126: 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 140: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 149: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 160: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 171: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 197: 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 300: warning: exported function UsbWalk should have comment or be unexported (golint)
    • hid/usbdef64_linux.go
    • Line 10: warning: exported const USBDEVFS_IOCTL should have comment (or a comment on this block) or be unexported (golint)
    • hid/usbdef_linux.go
    • Line 3: warning: exported const UsbHidClass should have comment or be unexported (golint)
    • Line 60: warning: exported const USBDEVFS_CONNECT should have comment (or a comment on this block) or be unexported (golint)
    • Line 66: warning: exported const DevBusUsb should have comment or be unexported (golint)
    • Line 69: warning: exported const UsbDescTypeDevice should have comment (or a comment on this block) or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign83%

IneffAssign detects ineffectual assignments in Go code.

    • hid/example/main.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: could not import github.com/chzyer/readline (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/zserge/hid (invalid package name: "") (ineffassign)

misspell66%

Misspell Finds commonly misspelled English words

    • hid/hid.go
    • Line 26: warning: "interace" is a misspelling of "interacted" (misspell)