Preparing report...

Report for github.com/senrok/go-odm

A+    Excellent!    Found 6 issues across 17 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!


gocyclo100%

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.

No problems detected. Good job!


golint70%

Golint is a linter for Go source code.

    • go-odm/collection.go
    • Line 20: warning: error var InvalidatedModels should have name of the form ErrFoo (golint)
    • Line 20: warning: exported var InvalidatedModels should have comment or be unexported (golint)
    • Line 22: warning: error var UnableSoftDeletable should have name of the form ErrFoo (golint)
    • Line 25: warning: exported type Collection should have comment or be unexported (golint)
    • Line 68: 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 188: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 227: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 251: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-odm/field.go
    • Line 18: warning: exported type IDField should have comment or be unexported (golint)
    • Line 42: warning: don't use underscores in Go names; const odm_tag should be odmTag (golint)
    • Line 43: warning: don't use underscores in Go names; const bson_tag should be bsonTag (golint)
    • Line 50: warning: exported type TimestampFields should have comment or be unexported (golint)
    • Line 55: warning: exported type DeletedAtField should have comment or be unexported (golint)
    • Line 59: warning: exported type FieldsConfig should have comment or be unexported (golint)
    • Line 68: warning: exported method FieldsConfig.SoftDeletable should have comment or be unexported (golint)
    • Line 72: warning: exported type FieldsInfo should have comment or be unexported (golint)
    • Line 92: warning: exported type FieldInfo should have comment or be unexported (golint)
    • go-odm/model.go
    • Line 35: warning: exported method DefaultModel.Restoring should have comment or be unexported (golint)
    • Line 41: warning: exported method DefaultModel.SoftDeleting should have comment or be unexported (golint)
    • Line 47: warning: exported method DefaultModel.Creating should have comment or be unexported (golint)
    • Line 53: warning: exported method DefaultModel.Saving should have comment or be unexported (golint)
    • Line 59: warning: exported type IModels should have comment or be unexported (golint)
    • Line 61: warning: exported method IModels.Interfaces should have comment or be unexported (golint)
    • Line 68: warning: exported method IModels.At should have comment or be unexported (golint)
    • go-odm/options.go
    • Line 17: warning: exported type Collections should have comment or be unexported (golint)
    • Line 19: warning: exported type Options should have comment or be unexported (golint)
    • Line 25: warning: exported type Option should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!