Preparing report...

Report for github.com/temoto/gpio-cdev-go

A+    Excellent!    Found 6 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.


golint54%

Golint is a linter for Go source code.

    • gpio-cdev-go/mock/mock.go
    • Line 1: warning: package comment should be of the form "Package gpio_mock ..." (golint)
    • Line 3: warning: don't use an underscore in package name (golint)
    • Line 12: warning: exported type MockChip should have comment or be unexported (golint)
    • Line 14: warning: exported method MockChip.Close should have comment or be unexported (golint)
    • Line 16: warning: exported method MockChip.Info should have comment or be unexported (golint)
    • Line 18: warning: exported method MockChip.LineInfo should have comment or be unexported (golint)
    • Line 23: warning: exported method MockChip.OpenLines should have comment or be unexported (golint)
    • Line 32: warning: exported method MockChip.GetLineEvent should have comment or be unexported (golint)
    • Line 37: warning: exported type MockLines should have comment or be unexported (golint)
    • Line 39: warning: exported method MockLines.Close should have comment or be unexported (golint)
    • Line 41: warning: exported method MockLines.Flush should have comment or be unexported (golint)
    • Line 43: warning: exported method MockLines.LineOffsets should have comment or be unexported (golint)
    • Line 50: warning: exported method MockLines.SetBulk should have comment or be unexported (golint)
    • Line 58: warning: exported method MockLines.SetFunc should have comment or be unexported (golint)
    • Line 62: warning: exported type MockEvent should have comment or be unexported (golint)
    • Line 64: warning: exported method MockEvent.Close should have comment or be unexported (golint)
    • Line 71: warning: exported method MockEvent.Wait should have comment or be unexported (golint)
    • gpio-cdev-go/api.go
    • Line 9: warning: exported var ErrClosed should have comment or be unexported (golint)
    • Line 10: warning: exported var ErrTimeout should have comment or be unexported (golint)
    • Line 19: warning: comment on exported function IsClosed should be of the form "IsClosed ..." (golint)
    • Line 24: warning: comment on exported function IsTimeout should be of the form "IsTimeout ..." (golint)
    • Line 35: warning: exported type Chiper should have comment or be unexported (golint)
    • Line 43: warning: exported type LineSetFunc should have comment or be unexported (golint)
    • Line 45: warning: exported type Lineser should have comment or be unexported (golint)
    • Line 54: warning: exported type Eventer should have comment or be unexported (golint)
    • gpio-cdev-go/event.go
    • Line 59: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 70: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 79: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 102: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • gpio-cdev-go/ffi.go
    • Line 10: warning: comment on exported type ChipInfo should be of the form "ChipInfo ..." (with optional leading article) (golint)
    • Line 22: warning: exported type LineFlag should have comment or be unexported (golint)
    • Line 25: warning: exported const GPIOLINE_FLAG_KERNEL should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: comment on exported type LineInfo should be of the form "LineInfo ..." (with optional leading article) (golint)
    • Line 51: warning: exported const GPIOHANDLES_MAX should have comment or be unexported (golint)
    • Line 53: warning: exported type RequestFlag should have comment or be unexported (golint)
    • Line 56: warning: exported const GPIOHANDLE_REQUEST_INPUT should have comment (or a comment on this block) or be unexported (golint)
    • Line 63: warning: comment on exported type HandleRequest should be of the form "HandleRequest ..." (with optional leading article) (golint)
    • Line 98: warning: comment on exported type HandleData should be of the form "HandleData ..." (with optional leading article) (golint)
    • Line 105: warning: exported type EventFlag should have comment or be unexported (golint)
    • Line 108: warning: exported const GPIOEVENT_REQUEST_RISING_EDGE should have comment (or a comment on this block) or be unexported (golint)
    • Line 115: warning: exported type EventRequest should have comment or be unexported (golint)
    • Line 137: warning: exported type EventID should have comment or be unexported (golint)
    • Line 140: warning: exported const GPIOEVENT_EVENT_RISING_EDGE should have comment (or a comment on this block) or be unexported (golint)
    • Line 144: warning: comment on exported type EventData should be of the form "EventData ..." (with optional leading article) (golint)
    • Line 155: warning: exported function RawGetChipInfo should have comment or be unexported (golint)
    • Line 159: warning: exported function RawGetLineInfo should have comment or be unexported (golint)
    • Line 163: warning: exported function RawGetLineHandle should have comment or be unexported (golint)
    • Line 167: warning: exported function RawGetLineEvent should have comment or be unexported (golint)
    • Line 171: warning: exported function RawGetLineValues should have comment or be unexported (golint)
    • Line 175: warning: exported function RawSetLineValues should have comment or be unexported (golint)
    • gpio-cdev-go/gpio.go
    • Line 18: warning: comment on exported function Open should be of the form "Open ..." (golint)
    • Line 92: 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 LineInfo.ConsumerString should have comment or be unexported (golint)
    • Line 98: warning: exported method LineInfo.NameString should have comment or be unexported (golint)
    • Line 114: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 124: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 138: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (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 149: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 155: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 161: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!