Preparing report...

Report for github.com/textileio/go-eventstore

A+    Excellent!    Found 9 issues across 16 files

Tweet

gofmt93%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


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!


gocyclo87%

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.


golint50%

Golint is a linter for Go source code.

    • go-eventstore/model.go
    • Line 17: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • Line 26: warning: exported type Model should have comment or be unexported (golint)
    • Line 37: warning: exported function NewModel should have comment or be unexported (golint)
    • Line 54: warning: exported method Model.ReadTxn should have comment or be unexported (golint)
    • Line 58: warning: exported method Model.WriteTxn should have comment or be unexported (golint)
    • Line 62: warning: exported method Model.FindByID should have comment or be unexported (golint)
    • Line 68: warning: exported method Model.Create should have comment or be unexported (golint)
    • Line 74: warning: exported method Model.Delete should have comment or be unexported (golint)
    • Line 80: warning: exported method Model.Save should have comment or be unexported (golint)
    • Line 86: warning: exported method Model.Has should have comment or be unexported (golint)
    • Line 94: warning: exported method Model.Find should have comment or be unexported (golint)
    • Line 100: warning: exported method Model.Reduce should have comment or be unexported (golint)
    • Line 170: warning: exported method Txn.Save should have comment or be unexported (golint)
    • Line 210: warning: exported method Txn.Delete should have comment or be unexported (golint)
    • Line 235: warning: exported method Txn.Has should have comment or be unexported (golint)
    • Line 249: warning: exported method Txn.FindByID should have comment or be unexported (golint)
    • Line 261: warning: exported method Txn.Commit should have comment or be unexported (golint)
    • Line 279: warning: exported method Txn.Discard should have comment or be unexported (golint)
    • go-eventstore/query.go
    • Line 14: warning: exported var ErrInvalidSortingField should have comment or be unexported (golint)
    • Line 18: warning: exported type Query should have comment or be unexported (golint)
    • Line 27: warning: exported function Where should have comment or be unexported (golint)
    • Line 33: warning: exported method Query.And should have comment or be unexported (golint)
    • Line 40: warning: exported method Query.Or should have comment or be unexported (golint)
    • Line 45: warning: exported method Query.OrderBy should have comment or be unexported (golint)
    • Line 51: warning: exported method Query.OrderByDesc should have comment or be unexported (golint)
    • go-eventstore/store.go
    • Line 19: warning: exported var ErrInvalidModel should have comment or be unexported (golint)
    • Line 24: warning: exported type Store should have comment or be unexported (golint)
    • Line 43: warning: exported method Store.Register should have comment or be unexported (golint)
    • go-eventstore/core/event.go
    • Line 13: warning: exported const EmptyEntityID should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported type EntityID should have comment or be unexported (golint)
    • Line 18: warning: exported function NewEntityID should have comment or be unexported (golint)
    • Line 26: warning: exported type Event should have comment or be unexported (golint)
    • Line 33: warning: exported function NewNullEvent should have comment or be unexported (golint)
    • Line 64: warning: exported type ActionType should have comment or be unexported (golint)
    • Line 67: warning: exported const Create should have comment (or a comment on this block) or be unexported (golint)
    • Line 86: warning: exported type EventCodec should have comment or be unexported (golint)
    • go-eventstore/common.go
    • Line 19: warning: exported function NewTxMapDatastore should have comment or be unexported (golint)
    • Line 25: warning: exported method TxMapDatastore.NewTransaction should have comment or be unexported (golint)
    • Line 44: warning: exported function NewSimpleTx should have comment or be unexported (golint)
    • Line 51: warning: exported method SimpleTx.Query should have comment or be unexported (golint)
    • Line 57: warning: exported method SimpleTx.Get should have comment or be unexported (golint)
    • Line 63: warning: exported method SimpleTx.Has should have comment or be unexported (golint)
    • Line 69: warning: exported method SimpleTx.GetSize should have comment or be unexported (golint)
    • Line 75: warning: exported method SimpleTx.Put should have comment or be unexported (golint)
    • Line 82: warning: exported method SimpleTx.Delete should have comment or be unexported (golint)
    • Line 89: warning: exported method SimpleTx.Discard should have comment or be unexported (golint)
    • Line 95: warning: exported method SimpleTx.Commit 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!


misspell87%

Misspell Finds commonly misspelled English words

    • go-eventstore/model.go
    • Line 21: warning: "commited" is a misspelling of "committed" (misspell)
    • Line 23: warning: "unkown" is a misspelling of "unknown" (misspell)
    • Line 125: warning: "commited" is a misspelling of "committed" (misspell)