Preparing report...

Report for github.com/luno/reflex

A+    Excellent!    Found 21 issues across 77 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!


gocyclo97%

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.

    • reflex/run.go
    • Line 16: warning: cyclomatic complexity 16 of function Run() is high (> 15) (gocyclo)

golint76%

Golint is a linter for Go source code.

    • reflex/example/exserver/exserver.go
    • Line 9: warning: exported type ExEvent should have comment or be unexported (golint)
    • Line 11: warning: exported type ExEventType should have comment or be unexported (golint)
    • Line 13: warning: exported method ExEventType.ReflexType should have comment or be unexported (golint)
    • Line 18: warning: exported const EventTypeUnknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: exported const ConsumerNameInternalLoop should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported type Client should have comment or be unexported (golint)
    • reflex/example/internal/db/db.go
    • Line 10: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 13: warning: exported function Connect should have comment or be unexported (golint)
    • Line 22: warning: exported function ConnectForTesting should have comment or be unexported (golint)
    • reflex/example/exserver/server/server.go
    • Line 56: warning: exported method Server.StreamEvent1 should have comment or be unexported (golint)
    • Line 60: warning: exported method Server.StreamEvent2 should have comment or be unexported (golint)
    • Line 64: warning: exported method Server.Echo should have comment or be unexported (golint)
    • Line 68: warning: exported method Server.Stop should have comment or be unexported (golint)
    • reflex/rpatterns/parallel.go
    • Line 39: warning: exported type ParallelOption should have comment or be unexported (golint)
    • Line 124: warning: exported function WithStreamOpts should have comment or be unexported (golint)
    • Line 130: warning: exported function WithHashOption should have comment or be unexported (golint)
    • reflex/errors.go
    • Line 27: warning: exported function IsStoppedErr should have comment or be unexported (golint)
    • Line 31: warning: exported function IsHeadReachedErr should have comment or be unexported (golint)
    • reflex/rsql/testutil.go
    • Line 20: warning: exported function TestCursorsTable should have comment or be unexported (golint)
    • Line 36: warning: comment on exported function TestEventsTableInt should be of the form "TestEventsTableInt ..." (golint)
    • Line 42: warning: exported function TestEventsTable should have comment or be unexported (golint)
    • Line 46: warning: exported function TestEventsTableWithID should have comment or be unexported (golint)
    • reflex/mock/cstore.go
    • Line 10: warning: exported type MockCStore should have comment or be unexported (golint)
    • Line 15: warning: exported method MockCStore.GetCursor should have comment or be unexported (golint)
    • Line 22: warning: exported method MockCStore.SetCursor should have comment or be unexported (golint)
    • Line 30: warning: exported method MockCStore.Flush should have comment or be unexported (golint)
    • Line 35: warning: exported method MockCStore.GetFlushCount should have comment or be unexported (golint)
    • Line 39: warning: exported function NewMockCStore should have comment or be unexported (golint)
    • reflex/example/exclient/db/db.go
    • Line 9: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 16: warning: exported var Cursors should have comment or be unexported (golint)
    • Line 18: warning: exported function Connect should have comment or be unexported (golint)
    • Line 22: warning: exported function ConnectForTesting should have comment or be unexported (golint)
    • reflex/example/exserver/db/db.go
    • Line 9: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 18: warning: exported var Events1 should have comment or be unexported (golint)
    • Line 23: warning: exported function Connect should have comment or be unexported (golint)
    • Line 27: warning: exported function ConnectForTesting should have comment or be unexported (golint)
    • reflex/grpctest/server.go
    • Line 52: warning: exported type Server should have comment or be unexported (golint)
    • Line 60: warning: exported method Server.Stream should have comment or be unexported (golint)
    • Line 66: warning: exported method Server.SentCount should have comment or be unexported (golint)
    • Line 70: warning: exported method Server.Stop should have comment or be unexported (golint)
    • reflex/consumable.go
    • Line 7: warning: comment on exported function NewConsumable should be of the form "NewConsumable ..." (golint)
    • reflex/grpctest/client.go
    • Line 14: warning: exported type Client should have comment or be unexported (golint)
    • Line 19: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 33: warning: exported method Client.StreamEvents should have comment or be unexported (golint)
    • Line 44: warning: exported method Client.Close should have comment or be unexported (golint)
    • reflex/rsql/cursorstable.go
    • Line 17: warning: exported type CursorType should have comment or be unexported (golint)
    • Line 75: warning: exported type CursorsOption should have comment or be unexported (golint)
    • Line 130: warning: exported function WithTestCursorSleep should have comment or be unexported (golint)
    • reflex/rsql/db.go
    • Line 126: warning: context.Context should be the first parameter of a function (golint)
    • Line 126: warning: exported function GetNextEventsForTesting should have comment or be unexported (golint)
    • Line 131: warning: context.Context should be the first parameter of a function (golint)
    • Line 131: warning: exported function GetLatestIDForTesting should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!