Preparing report...

Report for github.com/neelance/graphql-go

(v1.3.0)

A+    Excellent!    Found 44 issues across 74 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!


gocyclo90%

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.

    • internal/schema/schema_test.go
    • Line 11: warning: cyclomatic complexity 117 of function TestParse() is high (> 15) (gocyclo)
    • Line 877: warning: cyclomatic complexity 20 of function TestInterfaceImplementsInterface() is high (> 15) (gocyclo)
    • internal/schema/schema.go
    • Line 29: warning: cyclomatic complexity 39 of function Parse() is high (> 15) (gocyclo)
    • Line 173: warning: cyclomatic complexity 24 of function mergeExtensions() is high (> 15) (gocyclo)
    • internal/validation/validation.go
    • Line 763: warning: cyclomatic complexity 29 of function validateValueType() is high (> 15) (gocyclo)
    • Line 68: warning: cyclomatic complexity 26 of function Validate() is high (> 15) (gocyclo)
    • Line 301: warning: cyclomatic complexity 23 of function validateSelection() is high (> 15) (gocyclo)
    • Line 505: warning: cyclomatic complexity 19 of function (*context).validateOverlap() is high (> 15) (gocyclo)
    • Line 846: warning: cyclomatic complexity 18 of function validateBasicLit() is high (> 15) (gocyclo)
    • Line 184: warning: cyclomatic complexity 16 of function validateValue() is high (> 15) (gocyclo)

golint41%

Golint is a linter for Go source code.

    • introspection/introspection.go
    • Line 9: warning: exported type Schema should have comment or be unexported (golint)
    • Line 18: warning: exported method Schema.Types should have comment or be unexported (golint)
    • Line 32: warning: exported method Schema.Directives should have comment or be unexported (golint)
    • Line 46: warning: exported method Schema.QueryType should have comment or be unexported (golint)
    • Line 54: warning: exported method Schema.MutationType should have comment or be unexported (golint)
    • Line 62: warning: exported method Schema.SubscriptionType should have comment or be unexported (golint)
    • Line 70: warning: exported type Type should have comment or be unexported (golint)
    • Line 79: warning: exported method Type.Kind should have comment or be unexported (golint)
    • Line 83: warning: exported method Type.Name should have comment or be unexported (golint)
    • Line 91: warning: exported method Type.Description should have comment or be unexported (golint)
    • Line 102: warning: exported method Type.Fields should have comment or be unexported (golint)
    • Line 122: warning: exported method Type.Interfaces should have comment or be unexported (golint)
    • Line 135: warning: exported method Type.PossibleTypes should have comment or be unexported (golint)
    • Line 153: warning: exported method Type.EnumValues should have comment or be unexported (golint)
    • Line 168: warning: exported method Type.InputFields should have comment or be unexported (golint)
    • Line 181: warning: exported method Type.OfType should have comment or be unexported (golint)
    • Line 192: warning: exported type Field should have comment or be unexported (golint)
    • Line 196: warning: exported method Field.Name should have comment or be unexported (golint)
    • Line 200: warning: exported method Field.Description should have comment or be unexported (golint)
    • Line 207: warning: exported method Field.Args should have comment or be unexported (golint)
    • Line 215: warning: exported method Field.Type should have comment or be unexported (golint)
    • Line 219: warning: exported method Field.IsDeprecated should have comment or be unexported (golint)
    • Line 223: warning: exported method Field.DeprecationReason should have comment or be unexported (golint)
    • Line 232: warning: exported type InputValue should have comment or be unexported (golint)
    • Line 236: warning: exported method InputValue.Name should have comment or be unexported (golint)
    • Line 240: warning: exported method InputValue.Description should have comment or be unexported (golint)
    • Line 247: warning: exported method InputValue.Type should have comment or be unexported (golint)
    • Line 251: warning: exported method InputValue.DefaultValue should have comment or be unexported (golint)
    • Line 259: warning: exported type EnumValue should have comment or be unexported (golint)
    • Line 263: warning: exported method EnumValue.Name should have comment or be unexported (golint)
    • Line 267: warning: exported method EnumValue.Description should have comment or be unexported (golint)
    • Line 274: warning: exported method EnumValue.IsDeprecated should have comment or be unexported (golint)
    • Line 278: warning: exported method EnumValue.DeprecationReason should have comment or be unexported (golint)
    • Line 287: warning: exported type Directive should have comment or be unexported (golint)
    • Line 291: warning: exported method Directive.Name should have comment or be unexported (golint)
    • Line 295: warning: exported method Directive.Description should have comment or be unexported (golint)
    • Line 302: warning: exported method Directive.Locations should have comment or be unexported (golint)
    • Line 306: warning: exported method Directive.Args should have comment or be unexported (golint)
    • types/fragment.go
    • Line 5: warning: exported type Fragment should have comment or be unexported (golint)
    • Line 38: warning: exported type FragmentList should have comment or be unexported (golint)
    • Line 40: warning: comment on exported method FragmentList.Get should be of the form "Get ..." (golint)
    • types/schema.go
    • Line 40: warning: exported method Schema.Resolve should have comment or be unexported (golint)
    • internal/schema/schema.go
    • Line 29: warning: exported function Parse should have comment or be unexported (golint)
    • Line 167: warning: exported function ParseSchema should have comment or be unexported (golint)
    • internal/common/lexer.go
    • Line 16: warning: exported type Lexer should have comment or be unexported (golint)
    • Line 23: warning: exported type Ident should have comment or be unexported (golint)
    • Line 28: warning: exported function NewLexer should have comment or be unexported (golint)
    • Line 40: warning: exported method Lexer.CatchSyntaxError should have comment or be unexported (golint)
    • Line 56: warning: exported method Lexer.Peek should have comment or be unexported (golint)
    • Line 116: warning: exported method Lexer.ConsumeIdent should have comment or be unexported (golint)
    • Line 122: warning: exported method Lexer.ConsumeIdentWithLoc should have comment or be unexported (golint)
    • Line 129: warning: exported method Lexer.ConsumeKeyword should have comment or be unexported (golint)
    • Line 136: warning: exported method Lexer.ConsumeLiteral should have comment or be unexported (golint)
    • Line 142: warning: exported method Lexer.ConsumeToken should have comment or be unexported (golint)
    • Line 149: warning: exported method Lexer.DescComment should have comment or be unexported (golint)
    • Line 158: warning: exported method Lexer.SyntaxError should have comment or be unexported (golint)
    • Line 162: warning: exported method Lexer.Location should have comment or be unexported (golint)
    • Line 227: warning: exported method Lexer.CatchScannerError should have comment or be unexported (golint)
    • errors/errors.go
    • Line 7: warning: exported type QueryError should have comment or be unexported (golint)
    • Line 17: warning: exported type Location should have comment or be unexported (golint)
    • Line 22: warning: exported method Location.Before should have comment or be unexported (golint)
    • Line 26: warning: exported function Errorf should have comment or be unexported (golint)
    • types/variable.go
    • Line 13: warning: exported method Variable.Deserialize should have comment or be unexported (golint)
    • Line 15: warning: exported method Variable.Location should have comment or be unexported (golint)
    • internal/exec/exec.go
    • Line 21: warning: exported type Request should have comment or be unexported (golint)
    • Line 41: warning: exported method Request.Execute should have comment or be unexported (golint)
    • trace/validation_trace.go
    • Line 9: warning: exported type TraceValidationFinishFunc should have comment or be unexported (golint)
    • Line 11: warning: comment on exported type ValidationTracer should be of the form "ValidationTracer ..." (with optional leading article) (golint)
    • Line 16: warning: exported type ValidationTracerContext should have comment or be unexported (golint)
    • Line 20: warning: exported type NoopValidationTracer should have comment or be unexported (golint)
    • Line 22: warning: comment on exported method NoopValidationTracer.TraceValidation should be of the form "TraceValidation ..." (golint)
    • types/object.go
    • Line 22: warning: exported method ObjectTypeDefinition.Kind should have comment or be unexported (golint)
    • Line 24: warning: exported method ObjectTypeDefinition.TypeName should have comment or be unexported (golint)
    • Line 25: warning: exported method ObjectTypeDefinition.Description should have comment or be unexported (golint)
    • types/value.go
    • Line 31: warning: exported method PrimitiveValue.Deserialize should have comment or be unexported (golint)
    • Line 70: warning: exported method PrimitiveValue.Location should have comment or be unexported (golint)
    • Line 80: warning: exported method ListValue.Deserialize should have comment or be unexported (golint)
    • Line 96: warning: exported method ListValue.Location should have comment or be unexported (golint)
    • Line 112: warning: exported method ObjectValue.Deserialize should have comment or be unexported (golint)
    • Line 128: warning: exported method ObjectValue.Location should have comment or be unexported (golint)
    • Line 139: warning: exported method NullValue.Deserialize should have comment or be unexported (golint)
    • Line 141: warning: exported method NullValue.Location should have comment or be unexported (golint)
    • example/scalar_map/types/map.go
    • Line 5: warning: exported type Map should have comment or be unexported (golint)
    • Line 7: warning: exported method Map.ImplementsGraphQLType should have comment or be unexported (golint)
    • Line 11: warning: exported method Map.UnmarshalGraphQL should have comment or be unexported (golint)
    • internal/exec/selected/selected.go
    • Line 16: warning: exported type Request should have comment or be unexported (golint)
    • Line 25: warning: exported method Request.AddError should have comment or be unexported (golint)
    • Line 31: warning: exported function ApplyOperation should have comment or be unexported (golint)
    • Line 44: warning: exported type Selection should have comment or be unexported (golint)
    • Line 48: warning: exported type SchemaField should have comment or be unexported (golint)
    • Line 58: warning: exported type TypeAssertion should have comment or be unexported (golint)
    • Line 63: warning: exported type TypenameField should have comment or be unexported (golint)
    • Line 251: warning: exported function HasAsyncSel should have comment or be unexported (golint)
    • id.go
    • Line 11: warning: exported method ID.ImplementsGraphQLType should have comment or be unexported (golint)
    • Line 15: warning: exported method ID.UnmarshalGraphQL should have comment or be unexported (golint)
    • Line 28: warning: exported method ID.MarshalJSON should have comment or be unexported (golint)
    • types/query.go
    • Line 26: warning: exported type OperationType should have comment or be unexported (golint)
    • Line 52: warning: exported type OperationList should have comment or be unexported (golint)
    • types/scalar.go
    • Line 19: warning: exported method ScalarTypeDefinition.Kind should have comment or be unexported (golint)
    • Line 21: warning: exported method ScalarTypeDefinition.TypeName should have comment or be unexported (golint)
    • Line 22: warning: exported method ScalarTypeDefinition.Description should have comment or be unexported (golint)
    • types/types.go
    • Line 21: warning: exported type Ident should have comment or be unexported (golint)
    • Line 26: warning: exported type Type should have comment or be unexported (golint)
    • Line 57: warning: exported method List.Kind should have comment or be unexported (golint)
    • Line 58: warning: exported method NonNull.Kind should have comment or be unexported (golint)
    • Line 59: warning: exported method TypeName.Kind should have comment or be unexported (golint)
    • internal/common/types.go
    • Line 8: warning: exported function ParseType should have comment or be unexported (golint)
    • Line 28: warning: exported type Resolver should have comment or be unexported (golint)
    • example/social/social.go
    • Line 13: warning: exported const Schema should have comment or be unexported (golint)
    • Line 200: warning: exported type Resolver should have comment or be unexported (golint)
    • Line 202: warning: exported method Resolver.Admin should have comment or be unexported (golint)
    • Line 215: warning: exported method Resolver.User should have comment or be unexported (golint)
    • Line 223: warning: exported method Resolver.Search should have comment or be unexported (golint)
    • internal/exec/resolvable/resolvable.go
    • Line 14: warning: exported type Schema should have comment or be unexported (golint)
    • Line 23: warning: exported type Resolvable should have comment or be unexported (golint)
    • Line 27: warning: exported type Object should have comment or be unexported (golint)
    • Line 33: warning: exported type Field should have comment or be unexported (golint)
    • Line 45: warning: exported method Field.UseMethodResolver should have comment or be unexported (golint)
    • Line 49: warning: exported type TypeAssertion should have comment or be unexported (golint)
    • Line 54: warning: exported type List should have comment or be unexported (golint)
    • Line 58: warning: exported type Scalar should have comment or be unexported (golint)
    • Line 64: warning: exported function ApplyResolver should have comment or be unexported (golint)
    • internal/exec/packer/packer.go
    • Line 18: warning: exported type Builder should have comment or be unexported (golint)
    • Line 33: warning: exported function NewBuilder should have comment or be unexported (golint)
    • Line 39: warning: exported method Builder.Finish should have comment or be unexported (golint)
    • Line 168: warning: exported method Builder.MakeStructPacker should have comment or be unexported (golint)
    • Line 217: warning: exported type StructPacker should have comment or be unexported (golint)
    • Line 230: warning: exported method StructPacker.Pack should have comment or be unexported (golint)
    • Line 300: warning: exported type ValuePacker should have comment or be unexported (golint)
    • Line 304: warning: exported method ValuePacker.Pack should have comment or be unexported (golint)
    • types/argument.go
    • Line 14: warning: comment on exported method ArgumentList.Get should be of the form "Get ..." (golint)
    • Line 34: warning: exported type ArgumentsDefinition should have comment or be unexported (golint)
    • types/enum.go
    • Line 29: warning: exported method EnumTypeDefinition.Kind should have comment or be unexported (golint)
    • Line 31: warning: exported method EnumTypeDefinition.TypeName should have comment or be unexported (golint)
    • Line 32: warning: exported method EnumTypeDefinition.Description should have comment or be unexported (golint)
    • types/interface.go
    • Line 22: warning: exported method InterfaceTypeDefinition.Kind should have comment or be unexported (golint)
    • Line 24: warning: exported method InterfaceTypeDefinition.TypeName should have comment or be unexported (golint)
    • Line 25: warning: exported method InterfaceTypeDefinition.Description should have comment or be unexported (golint)
    • relay/relay.go
    • Line 14: warning: exported function MarshalID should have comment or be unexported (golint)
    • Line 22: warning: exported function UnmarshalKind should have comment or be unexported (golint)
    • Line 34: warning: exported function UnmarshalSpec should have comment or be unexported (golint)
    • Line 46: warning: exported type Handler should have comment or be unexported (golint)
    • example/starwars/starwars.go
    • Line 15: warning: exported var Schema should have comment or be unexported (golint)
    • Line 287: warning: exported type Resolver should have comment or be unexported (golint)
    • Line 289: warning: exported method Resolver.Hero should have comment or be unexported (golint)
    • Line 296: warning: exported method Resolver.Reviews should have comment or be unexported (golint)
    • Line 304: warning: exported method Resolver.Search should have comment or be unexported (golint)
    • Line 324: warning: exported method Resolver.Character should have comment or be unexported (golint)
    • Line 334: warning: exported method Resolver.Human should have comment or be unexported (golint)
    • Line 341: warning: exported method Resolver.Droid should have comment or be unexported (golint)
    • Line 348: warning: exported method Resolver.Starship should have comment or be unexported (golint)
    • Line 355: warning: exported method Resolver.CreateReview should have comment or be unexported (golint)
    • example/scalar_map/server.go
    • Line 13: warning: exported type Args should have comment or be unexported (golint)
    • Line 20: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • example/customerrors/starwars.go
    • Line 9: warning: exported var Schema should have comment or be unexported (golint)
    • Line 43: warning: exported type Resolver should have comment or be unexported (golint)
    • Line 45: warning: exported method Resolver.Droid should have comment or be unexported (golint)
    • internal/query/query.go
    • Line 13: warning: exported const Query should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported function Parse should have comment or be unexported (golint)
    • graphql.go
    • Line 87: warning: exported method Schema.ASTSchema should have comment or be unexported (golint)
    • trace/trace.go
    • Line 14: warning: exported type TraceQueryFinishFunc should have comment or be unexported (golint)
    • Line 15: warning: exported type TraceFieldFinishFunc should have comment or be unexported (golint)
    • Line 17: warning: exported type Tracer should have comment or be unexported (golint)
    • Line 22: warning: exported type OpenTracingTracer should have comment or be unexported (golint)
    • Line 24: warning: exported method OpenTracingTracer.TraceQuery should have comment or be unexported (golint)
    • Line 49: warning: exported method OpenTracingTracer.TraceField should have comment or be unexported (golint)
    • Line 70: warning: exported method OpenTracingTracer.TraceValidation should have comment or be unexported (golint)
    • Line 88: warning: exported type NoopTracer should have comment or be unexported (golint)
    • Line 90: warning: exported method NoopTracer.TraceQuery should have comment or be unexported (golint)
    • Line 94: warning: exported method NoopTracer.TraceField should have comment or be unexported (golint)
    • types/union.go
    • Line 21: warning: exported method Union.Kind should have comment or be unexported (golint)
    • Line 23: warning: exported method Union.TypeName should have comment or be unexported (golint)
    • Line 24: warning: exported method Union.Description should have comment or be unexported (golint)
    • example/caching/caching.go
    • Line 10: warning: exported const Schema should have comment or be unexported (golint)
    • Line 25: warning: exported type Resolver should have comment or be unexported (golint)
    • Line 27: warning: exported method Resolver.Hello should have comment or be unexported (golint)
    • Line 32: warning: exported method Resolver.Me should have comment or be unexported (golint)
    • Line 37: warning: exported type UserProfile should have comment or be unexported (golint)
    • Line 41: warning: exported method UserProfile.Name should have comment or be unexported (golint)
    • internal/common/values.go
    • Line 7: warning: exported function ParseInputValue should have comment or be unexported (golint)
    • Line 23: warning: exported function ParseArgumentList should have comment or be unexported (golint)
    • internal/exec/subscribe.go
    • Line 17: warning: exported type Response should have comment or be unexported (golint)
    • Line 22: warning: exported method Request.Subscribe should have comment or be unexported (golint)
    • types/directive.go
    • Line 24: warning: exported type DirectiveList should have comment or be unexported (golint)
    • Line 26: warning: comment on exported method DirectiveList.Get should be of the form "Get ..." (golint)
    • types/input.go
    • Line 18: warning: exported type InputValueDefinitionList should have comment or be unexported (golint)
    • Line 20: warning: comment on exported method InputValueDefinitionList.Get should be of the form "Get ..." (golint)
    • Line 44: warning: exported method InputObject.Kind should have comment or be unexported (golint)
    • Line 46: warning: exported method InputObject.TypeName should have comment or be unexported (golint)
    • Line 47: warning: exported method InputObject.Description should have comment or be unexported (golint)
    • nullable_types.go
    • Line 16: warning: exported method NullString.ImplementsGraphQLType should have comment or be unexported (golint)
    • Line 20: warning: exported method NullString.UnmarshalGraphQL should have comment or be unexported (golint)
    • Line 36: warning: exported method NullString.Nullable should have comment or be unexported (golint)
    • Line 46: warning: exported method NullBool.ImplementsGraphQLType should have comment or be unexported (golint)
    • Line 50: warning: exported method NullBool.UnmarshalGraphQL should have comment or be unexported (golint)
    • Line 66: warning: exported method NullBool.Nullable should have comment or be unexported (golint)
    • Line 76: warning: exported method NullInt.ImplementsGraphQLType should have comment or be unexported (golint)
    • Line 80: warning: exported method NullInt.UnmarshalGraphQL should have comment or be unexported (golint)
    • Line 103: warning: exported method NullInt.Nullable should have comment or be unexported (golint)
    • Line 113: warning: exported method NullFloat.ImplementsGraphQLType should have comment or be unexported (golint)
    • Line 117: warning: exported method NullFloat.UnmarshalGraphQL should have comment or be unexported (golint)
    • Line 141: warning: exported method NullFloat.Nullable should have comment or be unexported (golint)
    • Line 151: warning: exported method NullTime.ImplementsGraphQLType should have comment or be unexported (golint)
    • Line 155: warning: exported method NullTime.UnmarshalGraphQL should have comment or be unexported (golint)
    • Line 166: warning: exported method NullTime.Nullable 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!