Preparing report...

Report for github.com/hewiefreeman/GopherDB

C    Needs some work    Found 25 issues across 27 files

Tweet

gofmt29%

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!


gocyclo48%

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.

    • GopherDB/authtable/CRUD.go
    • Line 281: warning: cyclomatic complexity 25 of function (*AuthTable).UpdateUser() is high (> 15) (gocyclo)
    • Line 42: warning: cyclomatic complexity 25 of function (*AuthTable).NewUser() is high (> 15) (gocyclo)
    • GopherDB/schema/methods.go
    • Line 216: warning: cyclomatic complexity 80 of function applyArrayMethods() is high (> 15) (gocyclo)
    • Line 583: warning: cyclomatic complexity 31 of function applyMapMethods() is high (> 15) (gocyclo)
    • Line 116: warning: cyclomatic complexity 17 of function getStringMethodResult() is high (> 15) (gocyclo)
    • GopherDB/schema/typeconv.go
    • Line 179: warning: cyclomatic complexity 16 of function makeInt64() is high (> 15) (gocyclo)
    • Line 319: warning: cyclomatic complexity 16 of function makeUint64() is high (> 15) (gocyclo)
    • GopherDB/schema/filter.go
    • Line 72: warning: cyclomatic complexity 18 of function getTypeFilter() is high (> 15) (gocyclo)
    • Line 497: warning: cyclomatic complexity 17 of function stringFilter() is high (> 15) (gocyclo)
    • Line 613: warning: cyclomatic complexity 17 of function mapFilter() is high (> 15) (gocyclo)
    • Line 681: warning: cyclomatic complexity 16 of function objectFilter() is high (> 15) (gocyclo)
    • GopherDB/keystore/CRUD.go
    • Line 257: warning: cyclomatic complexity 22 of function (*Keystore).UpdateKey() is high (> 15) (gocyclo)
    • Line 42: warning: cyclomatic complexity 19 of function (*Keystore).InsertKey() is high (> 15) (gocyclo)
    • GopherDB/schema/schema.go
    • Line 194: warning: cyclomatic complexity 25 of function makeSchemaItem() is high (> 15) (gocyclo)
    • Line 118: warning: cyclomatic complexity 20 of function New() is high (> 15) (gocyclo)
    • Line 458: warning: cyclomatic complexity 16 of function (SchemaItem).Required() is high (> 15) (gocyclo)

golint44%

Golint is a linter for Go source code.

    • GopherDB/helpers/defaults.go
    • Line 4: warning: comment on exported const DefaultPartitionMax should be of the form "DefaultPartitionMax ..." (golint)
    • Line 6: warning: exported const PartitionMin should have comment (or a comment on this block) or be unexported (golint)
    • GopherDB/authtable/authtable.go
    • Line 53: warning: comment on exported type AuthTable should be of the form "AuthTable ..." (with optional leading article) (golint)
    • Line 86: warning: exported type EmailSettings should have comment or be unexported (golint)
    • Line 225: warning: exported method AuthTable.Close should have comment or be unexported (golint)
    • Line 275: warning: exported method AuthTable.Get should have comment or be unexported (golint)
    • Line 306: warning: exported method AuthTable.Size should have comment or be unexported (golint)
    • Line 313: warning: exported method AuthTable.EncryptCost should have comment or be unexported (golint)
    • Line 317: warning: exported method AuthTable.AltLoginItem should have comment or be unexported (golint)
    • Line 325: warning: exported method AuthTable.SetEncryptionCost should have comment or be unexported (golint)
    • Line 343: warning: exported method AuthTable.SetMaxEntries should have comment or be unexported (golint)
    • Line 359: warning: exported method AuthTable.SetMinPasswordLength should have comment or be unexported (golint)
    • Line 378: warning: exported method AuthTable.SetPasswordResetLength should have comment or be unexported (golint)
    • Line 415: warning: comment on exported method AuthTable.SetEmailItem should be of the form "SetEmailItem ..." (golint)
    • Line 455: warning: comment on exported method AuthTable.SetEmailSettings should be of the form "SetEmailSettings ..." (golint)
    • Line 478: warning: exported method AuthTable.SetPartitionMax should have comment or be unexported (golint)
    • GopherDB/schema/types.go
    • Line 107: warning: exported type BoolItem should have comment or be unexported (golint)
    • Line 111: warning: exported type Int8Item should have comment or be unexported (golint)
    • Line 120: warning: exported type Int16Item should have comment or be unexported (golint)
    • Line 129: warning: exported type Int32Item should have comment or be unexported (golint)
    • Line 138: warning: exported type Int64Item should have comment or be unexported (golint)
    • Line 147: warning: exported type Uint8Item should have comment or be unexported (golint)
    • Line 155: warning: exported type Uint16Item should have comment or be unexported (golint)
    • Line 163: warning: exported type Uint32Item should have comment or be unexported (golint)
    • Line 171: warning: exported type Uint64Item should have comment or be unexported (golint)
    • Line 179: warning: exported type Float32Item should have comment or be unexported (golint)
    • Line 188: warning: exported type Float64Item should have comment or be unexported (golint)
    • Line 197: warning: exported type StringItem should have comment or be unexported (golint)
    • Line 205: warning: exported type ArrayItem should have comment or be unexported (golint)
    • Line 211: warning: exported type MapItem should have comment or be unexported (golint)
    • Line 217: warning: exported type ObjectItem should have comment or be unexported (golint)
    • Line 221: warning: exported type TimeItem should have comment or be unexported (golint)
    • GopherDB/datelist/datelist.go
    • Line 68: warning: exported type DateList should have comment or be unexported (golint)
    • Line 94: warning: exported type Year should have comment or be unexported (golint)
    • Line 99: warning: exported type Month should have comment or be unexported (golint)
    • Line 104: warning: exported type Day should have comment or be unexported (golint)
    • Line 109: warning: exported type DateListEntry should have comment or be unexported (golint)
    • GopherDB/storage/storage.go
    • Line 17: warning: package comment should be of the form "Package storage ..." (golint)
    • Line 182: warning: comment on exported function GetOpenFile should be of the form "GetOpenFile ..." (golint)
    • Line 376: warning: comment on exported function GetNumOpenFiles should be of the form "GetNumOpenFiles ..." (golint)
    • GopherDB/keystore/keystore.go
    • Line 44: warning: comment on exported type Keystore should be of the form "Keystore ..." (with optional leading article) (golint)
    • Line 260: warning: exported method Keystore.EncryptCost should have comment or be unexported (golint)
    • GopherDB/helpers/errors.go
    • Line 3: warning: exported type Error should have comment or be unexported (golint)
    • Line 9: warning: comment on exported const ErrorUnexpected should be of the form "ErrorUnexpected ..." (golint)
    • Line 12: warning: comment on exported const ErrorTableExists should be of the form "ErrorTableExists ..." (golint)
    • Line 14: warning: exported const ErrorTableDoesntExist should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: comment on exported const ErrorSchemaRequired should be of the form "ErrorSchemaRequired ..." (golint)
    • Line 25: warning: exported const ErrorSchemaItemsRequired should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: comment on exported const ErrorInvalidItem should be of the form "ErrorInvalidItem ..." (golint)
    • Line 58: warning: comment on exported const ErrorKeyRequired should be of the form "ErrorKeyRequired ..." (golint)
    • Line 60: warning: exported const ErrorKeyInUse should have comment (or a comment on this block) or be unexported (golint)
    • Line 64: warning: comment on exported const ErrorNameRequired should be of the form "ErrorNameRequired ..." (golint)
    • Line 66: warning: exported const ErrorNameInUse should have comment (or a comment on this block) or be unexported (golint)
    • Line 76: warning: comment on exported const ErrorLeaderboardExists should be of the form "ErrorLeaderboardExists ..." (golint)
    • Line 78: warning: exported const ErrorLeaderboardDoesntExist should have comment (or a comment on this block) or be unexported (golint)
    • Line 82: warning: comment on exported const ErrorStorageNotInitialized should be of the form "ErrorStorageNotInitialized ..." (golint)
    • Line 84: warning: exported const ErrorTableFolderCreate should have comment (or a comment on this block) or be unexported (golint)
    • GopherDB/keystore/CRUD.go
    • Line 41: warning: comment on exported method Keystore.InsertKey should be of the form "InsertKey ..." (golint)
    • Line 152: warning: comment on exported method Keystore.GetKey should be of the form "GetKey ..." (golint)
    • Line 256: warning: comment on exported method Keystore.UpdateKey should be of the form "UpdateKey ..." (golint)
    • Line 362: warning: comment on exported method Keystore.UpsertKey should be of the form "UpsertKey ..." (golint)
    • Line 377: warning: comment on exported method Keystore.DeleteKey should be of the form "DeleteKey ..." (golint)
    • GopherDB/authtable/CRUD.go
    • Line 175: warning: comment on exported method AuthTable.GetUser should be of the form "GetUser ..." (golint)
    • Line 280: warning: comment on exported method AuthTable.UpdateUser should be of the form "UpdateUser ..." (golint)
    • Line 401: warning: comment on exported method AuthTable.ChangeUserPassword should be of the form "ChangeUserPassword ..." (golint)
    • Line 457: warning: comment on exported method AuthTable.ResetUserPassword should be of the form "ResetUserPassword ..." (golint)
    • Line 537: warning: comment on exported method AuthTable.DeleteUser should be of the form "DeleteUser ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign92%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!