Preparing report...

Report for gitlab.com/xdevs23/goqlorm

A    Great!    Found 33 issues across 46 files

Tweet

gofmt97%

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!


gocyclo95%

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.


golint28%

Golint is a linter for Go source code.

    • /gitlab.com/xdevs23/goqlorm/database/dbdefs/adapter.go
    • Line 9: warning: exported method MutationAdapterOverlay.SyncSchema should have comment or be unexported (golint)
    • Line 13: warning: exported method MutationAdapterOverlay.IsConnected should have comment or be unexported (golint)
    • Line 17: warning: exported method MutationAdapterOverlay.Close should have comment or be unexported (golint)
    • Line 21: warning: exported method MutationAdapterOverlay.Select should have comment or be unexported (golint)
    • Line 25: warning: exported method MutationAdapterOverlay.SelectInto should have comment or be unexported (golint)
    • Line 30: warning: exported method MutationAdapterOverlay.SelectAdvanced should have comment or be unexported (golint)
    • Line 35: warning: exported method MutationAdapterOverlay.CreateCollectionFromModel should have comment or be unexported (golint)
    • Line 39: warning: exported method MutationAdapterOverlay.Insert should have comment or be unexported (golint)
    • Line 43: warning: exported method MutationAdapterOverlay.Update should have comment or be unexported (golint)
    • Line 47: warning: exported method MutationAdapterOverlay.Delete should have comment or be unexported (golint)
    • Line 51: warning: exported method MutationAdapterOverlay.DataFromDatabaseUsingResolveParams should have comment or be unexported (golint)
    • Line 55: warning: exported method MutationAdapterOverlay.RunInTransaction should have comment or be unexported (golint)
    • /gitlab.com/xdevs23/goqlorm/database/dbdefs/definitions.go
    • Line 12: warning: exported type SchemaSyncOptions should have comment or be unexported (golint)
    • Line 28: warning: exported type MutationAdapter should have comment or be unexported (golint)
    • Line 43: warning: comment on exported type Adapter should be of the form "Adapter ..." (with optional leading article) (golint)
    • Line 86: warning: exported type ColumnName should have comment or be unexported (golint)
    • Line 87: warning: exported type ConditionValue should have comment or be unexported (golint)
    • /gitlab.com/xdevs23/goqlorm/generator/field_generator.go
    • Line 248: warning: exported type IDBehavior should have comment or be unexported (golint)
    • Line 250: warning: exported method GraphQLSchemaGenerator.InputFieldConfigArgs should have comment or be unexported (golint)
    • Line 293: warning: exported method GraphQLSchemaGenerator.QueryOne should have comment or be unexported (golint)
    • Line 303: warning: exported method GraphQLSchemaGenerator.QueryList should have comment or be unexported (golint)
    • Line 313: warning: exported method GraphQLSchemaGenerator.GenerateQueryFields should have comment or be unexported (golint)
    • Line 326: warning: exported method GraphQLSchemaGenerator.CreateOne should have comment or be unexported (golint)
    • Line 336: warning: exported method GraphQLSchemaGenerator.UpdateOne should have comment or be unexported (golint)
    • Line 346: warning: exported method GraphQLSchemaGenerator.DeleteOne should have comment or be unexported (golint)
    • Line 356: warning: exported method GraphQLSchemaGenerator.GenerateMutationFields should have comment or be unexported (golint)
    • /gitlab.com/xdevs23/goqlorm/generator/helpers.go
    • Line 15: warning: comment on exported method GraphQLSchemaGenerator.GetGraphQLObjType should be of the form "GetGraphQLObjType ..." (golint)
    • Line 35: warning: comment on exported function ConstructObjectFromPArgs should be of the form "ConstructObjectFromPArgs ..." (golint)
    • /gitlab.com/xdevs23/goqlorm/generator/mutation_resolvers.go
    • Line 23: warning: exported method GraphQLSchemaGenerator.AutoResolveCreateOne should have comment or be unexported (golint)
    • Line 40: warning: exported method GraphQLSchemaGenerator.AutoResolveUpdateOne should have comment or be unexported (golint)
    • Line 57: warning: exported method GraphQLSchemaGenerator.AutoResolveDeleteOne should have comment or be unexported (golint)
    • /gitlab.com/xdevs23/goqlorm/randutil/rand.go
    • Line 15: warning: exported function RandomBytes should have comment or be unexported (golint)
    • Line 26: warning: exported function FastRandomB64UString should have comment or be unexported (golint)
    • Line 34: warning: exported function RandomB64UString should have comment or be unexported (golint)
    • Line 42: warning: exported function FastRandomInt should have comment or be unexported (golint)
    • Line 54: warning: exported function RandomInt should have comment or be unexported (golint)
    • /gitlab.com/xdevs23/goqlorm/reflectutil/reflect_utils.go
    • Line 144: warning: comment on exported function EnsureSinglePointerType should be of the form "EnsureSinglePointerType ..." (golint)
    • Line 165: warning: comment on exported function AutoPointerNewFromValue should be of the form "AutoPointerNewFromValue ..." (golint)
    • Line 210: warning: comment on exported function PurifyToType should be of the form "PurifyToType ..." (golint)
    • Line 246: warning: exported function Clone should have comment or be unexported (golint)
    • Line 250: warning: exported function CloneValue should have comment or be unexported (golint)
    • Line 254: warning: exported function GetFieldByName should have comment or be unexported (golint)
    • Line 264: warning: exported function SetFieldByName should have comment or be unexported (golint)
    • Line 275: warning: exported function CopyValueToModel should have comment or be unexported (golint)
    • Line 296: warning: exported function Copy should have comment or be unexported (golint)
    • /gitlab.com/xdevs23/goqlorm/database/relationtype/relationtypes.go
    • Line 27: warning: comment on exported const OneToOne should be of the form "OneToOne ..." (golint)
    • Line 31: warning: comment on exported const OneToMany should be of the form "OneToMany ..." (golint)
    • Line 39: warning: comment on exported const ManyToOne should be of the form "ManyToOne ..." (golint)
    • Line 46: warning: comment on exported const ManyToMany should be of the form "ManyToMany ..." (golint)
    • Line 51: warning: exported var RelationTypeNames should have comment or be unexported (golint)
    • Line 65: warning: exported type RelationType should have comment or be unexported (golint)
    • Line 74: warning: exported function FromString should have comment or be unexported (golint)
    • Line 81: warning: exported method RelationType.IsToMany should have comment or be unexported (golint)
    • Line 85: warning: exported method RelationType.IsToOne should have comment or be unexported (golint)
    • /gitlab.com/xdevs23/goqlorm/postgres/query.go
    • Line 12: warning: exported method Database.Select should have comment or be unexported (golint)
    • Line 19: warning: exported method Database.SelectInto should have comment or be unexported (golint)
    • Line 26: warning: exported method Database.SelectAdvanced should have comment or be unexported (golint)
    • /gitlab.com/xdevs23/goqlorm/generator/generator.go
    • Line 11: warning: exported type GraphQLSchemaGenerator should have comment or be unexported (golint)
    • Line 18: warning: exported function GenerateGraphQLSchema should have comment or be unexported (golint)
    • Line 50: warning: exported method GraphQLSchemaGenerator.Database should have comment or be unexported (golint)
    • /gitlab.com/xdevs23/goqlorm/collections/functional.go
    • Line 5: warning: exported function Index should have comment or be unexported (golint)
    • Line 14: warning: exported function Include should have comment or be unexported (golint)
    • Line 18: warning: exported function Any should have comment or be unexported (golint)
    • Line 27: warning: exported function All should have comment or be unexported (golint)
    • Line 36: warning: exported function Filter should have comment or be unexported (golint)
    • Line 46: warning: exported function Map should have comment or be unexported (golint)
    • /gitlab.com/xdevs23/goqlorm/plugnplay/plugnplay.go
    • Line 30: warning: exported type Config should have comment or be unexported (golint)
    • Line 82: warning: exported type PluggedConfig should have comment or be unexported (golint)
    • Line 90: warning: exported function Plug should have comment or be unexported (golint)
    • Line 132: warning: exported method PluggedConfig.Play should have comment or be unexported (golint)
    • /gitlab.com/xdevs23/goqlorm/api/api.go
    • Line 1: warning: package comment should be of the form "Package api ..." (golint)
    • Line 24: warning: exported type GraphQLQueryResolverInterceptorFunc should have comment or be unexported (golint)
    • Line 27: warning: exported type GraphQLMutationResolverInterceptorFunc should have comment or be unexported (golint)
    • Line 76: warning: exported type GraphQLContextWrapper should have comment or be unexported (golint)
    • Line 182: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 212: warning: exported function GraphiQLContextWrapper should have comment or be unexported (golint)
    • /gitlab.com/xdevs23/goqlorm/database/dbsystem/systems.go
    • Line 10: warning: exported type DBAdapterConfig should have comment or be unexported (golint)
    • Line 31: warning: exported var Names should have comment or be unexported (golint)
    • Line 39: warning: exported type DBSystem should have comment or be unexported (golint)
    • Line 48: warning: exported function FromString should have comment or be unexported (golint)
    • Line 55: warning: exported function Register should have comment or be unexported (golint)
    • Line 62: warning: exported function NewAdapter should have comment or be unexported (golint)
    • /gitlab.com/xdevs23/goqlorm/memdb/mutate.go
    • Line 11: warning: exported method Database.CreateCollectionFromModel should have comment or be unexported (golint)
    • Line 47: warning: exported method Database.Insert should have comment or be unexported (golint)
    • Line 80: warning: exported method Database.Update should have comment or be unexported (golint)
    • Line 109: warning: exported method Database.Delete should have comment or be unexported (golint)
    • /gitlab.com/xdevs23/goqlorm/memdb/query.go
    • Line 13: warning: exported method Database.Select should have comment or be unexported (golint)
    • Line 26: warning: error should be the last type when returning multiple items (golint)
    • Line 51: warning: exported method Database.SelectInto should have comment or be unexported (golint)
    • Line 60: warning: exported method Database.SelectAdvanced should have comment or be unexported (golint)
    • Line 72: warning: should omit 2nd value from range; this loop is equivalent to `for id := range ...` (golint)
    • /gitlab.com/xdevs23/goqlorm/generator/query_resolvers.go
    • Line 13: warning: exported method GraphQLSchemaGenerator.AutoResolveQueryOne should have comment or be unexported (golint)
    • Line 17: warning: exported method GraphQLSchemaGenerator.AutoResolveQueryList should have comment or be unexported (golint)
    • Line 21: warning: exported method GraphQLSchemaGenerator.AutoResolve should have comment or be unexported (golint)
    • /gitlab.com/xdevs23/goqlorm/database/relations.go
    • Line 36: warning: exported const AssocFieldPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 45: warning: exported type Relation should have comment or be unexported (golint)
    • Line 63: warning: exported type RelationSolveContext should have comment or be unexported (golint)
    • Line 90: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 108: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 117: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 139: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 145: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 157: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 165: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 291: warning: error should be the last type when returning multiple items (golint)
    • Line 299: warning: error should be the last type when returning multiple items (golint)
    • Line 338: warning: error should be the last type when returning multiple items (golint)
    • Line 412: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 424: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 431: warning: error should be the last type when returning multiple items (golint)
    • Line 551: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 679: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 716: warning: exported method Database.IsRelation should have comment or be unexported (golint)
    • Line 720: warning: exported method Database.IsTypeRelation should have comment or be unexported (golint)
    • Line 729: warning: error should be the last type when returning multiple items (golint)
    • /gitlab.com/xdevs23/goqlorm/postgres/basic.go
    • Line 16: warning: exported method Database.Close should have comment or be unexported (golint)
    • Line 20: warning: exported method Database.IsConnected should have comment or be unexported (golint)
    • Line 25: warning: exported method Database.RunInTransaction should have comment or be unexported (golint)
    • Line 82: warning: exported function ToPgString should have comment or be unexported (golint)
    • Line 86: warning: exported function ToPgTableName should have comment or be unexported (golint)
    • /gitlab.com/xdevs23/goqlorm/database/abstraction.go
    • Line 20: warning: exported const ErrorMustBeInTx should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported type TypeName should have comment or be unexported (golint)
    • Line 24: warning: exported type StructFieldName should have comment or be unexported (golint)
    • Line 25: warning: exported type StructFieldRelationMap should have comment or be unexported (golint)
    • Line 26: warning: exported type TypeRelationsMap should have comment or be unexported (golint)
    • Line 28: warning: exported type Database should have comment or be unexported (golint)
    • Line 38: warning: exported type Collection should have comment or be unexported (golint)
    • Line 44: warning: exported type TransactionFunc should have comment or be unexported (golint)
    • Line 46: warning: exported method Database.Prepare should have comment or be unexported (golint)
    • Line 71: warning: exported method Collection.IsInTx should have comment or be unexported (golint)
    • Line 75: warning: exported method Database.Close should have comment or be unexported (golint)
    • Line 86: warning: exported method Collection.Insert should have comment or be unexported (golint)
    • Line 114: warning: exported method Collection.EnsureInTx should have comment or be unexported (golint)
    • Line 128: warning: error should be the last type when returning multiple items (golint)
    • Line 146: warning: exported method Collection.Update should have comment or be unexported (golint)
    • Line 162: warning: exported method Collection.UpdateSpecifiedFields should have comment or be unexported (golint)
    • Line 192: warning: exported method Collection.Delete should have comment or be unexported (golint)
    • Line 206: warning: exported method Collection.DataFromDatabaseUsingResolveParams should have comment or be unexported (golint)
    • Line 222: warning: exported method Collection.SelectSimple should have comment or be unexported (golint)
    • Line 226: warning: exported method Collection.Select should have comment or be unexported (golint)
    • Line 241: warning: exported method Collection.SelectSimpleInto should have comment or be unexported (golint)
    • Line 245: warning: exported method Collection.SelectInto should have comment or be unexported (golint)
    • Line 262: warning: exported method Collection.SelectAdvanced should have comment or be unexported (golint)
    • Line 279: warning: exported method Collection.SelectSimpleAdvanced should have comment or be unexported (golint)
    • Line 283: warning: exported method Collection.Collection should have comment or be unexported (golint)
    • Line 291: warning: exported method Collection.CustomCollection should have comment or be unexported (golint)
    • Line 299: warning: exported method Database.Collection should have comment or be unexported (golint)
    • Line 306: warning: exported method Database.CustomCollection should have comment or be unexported (golint)
    • Line 313: warning: exported method Collection.RunInTransaction should have comment or be unexported (golint)
    • Line 337: warning: exported function Plug should have comment or be unexported (golint)
    • Line 349: warning: exported function PlugCustom should have comment or be unexported (golint)
    • /gitlab.com/xdevs23/goqlorm/postgres/mutate.go
    • Line 14: warning: exported method Database.CreateCollectionFromModel should have comment or be unexported (golint)
    • Line 24: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 30: warning: exported method Database.Insert should have comment or be unexported (golint)
    • Line 35: warning: exported method Database.Update should have comment or be unexported (golint)
    • Line 40: warning: exported method Database.Delete should have comment or be unexported (golint)
    • Line 45: warning: exported type TxMutationAdapter should have comment or be unexported (golint)
    • Line 49: warning: exported method TxMutationAdapter.CreateCollectionFromModel should have comment or be unexported (golint)
    • Line 53: warning: exported method TxMutationAdapter.Insert should have comment or be unexported (golint)
    • Line 58: warning: exported method TxMutationAdapter.Update should have comment or be unexported (golint)
    • Line 63: warning: exported method TxMutationAdapter.Delete should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!