Preparing report...

Report for github.com/saturn4er/proto2gql

A+    Excellent!    Found 18 issues across 29 files

Tweet

gofmt96%

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!


gocyclo93%

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.


golint41%

Golint is a linter for Go source code.

    • proto2gql/example/main.go
    • Line 16: warning: exported type FakeClient should have comment or be unexported (golint)
    • Line 19: warning: exported method FakeClient.GetEmptiesMsg should have comment or be unexported (golint)
    • Line 23: warning: exported method FakeClient.GetQueryMethod should have comment or be unexported (golint)
    • Line 27: warning: exported method FakeClient.MutationMethod should have comment or be unexported (golint)
    • Line 31: warning: exported method FakeClient.QueryMethod should have comment or be unexported (golint)
    • Line 35: warning: exported method FakeClient.GetMutatuionMethod should have comment or be unexported (golint)
    • proto2gql/api/interceptors/interceptor.go
    • Line 8: warning: exported type Context should have comment or be unexported (golint)
    • Line 15: warning: exported type ResolveArgsInvoker should have comment or be unexported (golint)
    • Line 16: warning: exported type CallMethodInvoker should have comment or be unexported (golint)
    • Line 18: warning: exported type ResolveArgsInterceptor should have comment or be unexported (golint)
    • Line 19: warning: exported type CallInterceptor should have comment or be unexported (golint)
    • Line 21: warning: exported type InterceptorHandler should have comment or be unexported (golint)
    • Line 26: warning: exported method InterceptorHandler.ResolveArgs should have comment or be unexported (golint)
    • Line 40: warning: exported method InterceptorHandler.Call should have comment or be unexported (golint)
    • Line 53: warning: exported method InterceptorHandler.OnResolveArgs should have comment or be unexported (golint)
    • Line 57: warning: exported method InterceptorHandler.OnCall should have comment or be unexported (golint)
    • proto2gql/api/scalars/scalars.go
    • Line 11: warning: exported var GraphQLInt64Scalar should have comment or be unexported (golint)
    • Line 58: warning: exported var GraphQLInt32Scalar should have comment or be unexported (golint)
    • Line 103: warning: exported var GraphQLUInt64Scalar should have comment or be unexported (golint)
    • Line 150: warning: exported var GraphQLUInt32Scalar should have comment or be unexported (golint)
    • Line 193: warning: exported var GraphQLFloat32Scalar should have comment or be unexported (golint)
    • Line 230: warning: exported var GraphQLFloat64Scalar should have comment or be unexported (golint)
    • Line 269: warning: exported var NoDataScalar should have comment or be unexported (golint)
    • proto2gql/example/out/example/example.go
    • Line 36: warning: comment on exported var ExmplSomeEnum should be of the form "ExmplSomeEnum ..." (golint)
    • Line 51: warning: exported var ExmplAsomeEnum3 should have comment or be unexported (golint)
    • Line 66: warning: comment on exported var ExmplA should be of the form "ExmplA ..." (golint)
    • Line 72: warning: comment on exported function ResolveA should be of the form "ResolveA ..." (golint)
    • Line 82: warning: don't use underscores in Go names; var r_msg_list should be rMsgList (golint)
    • Line 83: warning: don't use underscores in Go names; var r_msg_ should be rMsg (golint)
    • Line 84: warning: don't use underscores in Go names; range var r_msg_item should be rMsgItem (golint)
    • Line 86: warning: don't use underscores in Go names; var r_msg_r should be rMsgR (golint)
    • Line 97: warning: don't use underscores in Go names; var r_scalar_list should be rScalarList (golint)
    • Line 98: warning: don't use underscores in Go names; var r_scalar_ should be rScalar (golint)
    • Line 99: warning: don't use underscores in Go names; range var r_scalar_item should be rScalarItem (golint)
    • Line 100: warning: don't use underscores in Go names; var r_scalar_r should be rScalarR (golint)
    • Line 110: warning: don't use underscores in Go names; var r_enum_list should be rEnumList (golint)
    • Line 111: warning: don't use underscores in Go names; var r_enum_ should be rEnum (golint)
    • Line 112: warning: don't use underscores in Go names; range var r_enum_item should be rEnumItem (golint)
    • Line 113: warning: don't use underscores in Go names; var r_enum_r should be rEnumR (golint)
    • Line 130: warning: don't use underscores in Go names; var n_r_msg_r should be nRMsgR (golint)
    • Line 144: warning: don't use underscores in Go names; var message_from_context_r should be messageFromContextR (golint)
    • Line 149: warning: don't use underscores in Go names; var message_with_oneoffs_ctx should be messageWithOneoffsCtx (golint)
    • Line 158: warning: don't use underscores in Go names; var map_enum_ should be mapEnum (golint)
    • Line 166: warning: don't use underscores in Go names; var map_scalar_ should be mapScalar (golint)
    • Line 174: warning: don't use underscores in Go names; var map_msg_ should be mapMsg (golint)
    • Line 185: warning: exported var ExmplAOneOffs should have comment or be unexported (golint)
    • Line 189: warning: exported var ExmplAOneOffsInput should have comment or be unexported (golint)
    • Line 224: warning: comment on exported function ResolveAOneOffs should be of the form "ResolveAOneOffs ..." (golint)
    • Line 233: warning: don't use underscores in Go names; var e_n_r_enum_ should be eNREnum (golint)
    • Line 235: warning: don't use underscores in Go names; var e_n_r_scalar_ should be eNRScalar (golint)
    • Line 238: warning: don't use underscores in Go names; var e_n_r_msg_ should be eNRMsg (golint)
    • Line 241: warning: don't use underscores in Go names; var e_n_r_msg_r should be eNRMsgR (golint)
    • Line 248: warning: don't use underscores in Go names; var s_n_r_scalar_ should be sNRScalar (golint)
    • Line 250: warning: don't use underscores in Go names; var s_n_r_enum_ should be sNREnum (golint)
    • Line 253: warning: don't use underscores in Go names; var s_n_r_msg_ should be sNRMsg (golint)
    • Line 256: warning: don't use underscores in Go names; var s_n_r_msg_r should be sNRMsgR (golint)
    • Line 263: warning: don't use underscores in Go names; var m_n_r_msg_ should be mNRMsg (golint)
    • Line 265: warning: don't use underscores in Go names; var m_n_r_msg_r should be mNRMsgR (golint)
    • Line 271: warning: don't use underscores in Go names; var m_n_r_scalar_ should be mNRScalar (golint)
    • Line 274: warning: don't use underscores in Go names; var m_n_r_enum_ should be mNREnum (golint)
    • Line 281: warning: exported var ExmplMsgWithEmpty should have comment or be unexported (golint)
    • Line 286: warning: comment on exported function ResolveMsgWithEmpty should be of the form "ResolveMsgWithEmpty ..." (golint)
    • Line 300: warning: exported var ExmplB should have comment or be unexported (golint)
    • Line 305: warning: comment on exported function ResolveB should be of the form "ResolveB ..." (golint)
    • Line 315: warning: don't use underscores in Go names; var r_msg_list should be rMsgList (golint)
    • Line 316: warning: don't use underscores in Go names; var r_msg_ should be rMsg (golint)
    • Line 317: warning: don't use underscores in Go names; range var r_msg_item should be rMsgItem (golint)
    • Line 319: warning: don't use underscores in Go names; var r_msg_r should be rMsgR (golint)
    • Line 330: warning: don't use underscores in Go names; var r_scalar_list should be rScalarList (golint)
    • Line 331: warning: don't use underscores in Go names; var r_scalar_ should be rScalar (golint)
    • Line 332: warning: don't use underscores in Go names; range var r_scalar_item should be rScalarItem (golint)
    • Line 333: warning: don't use underscores in Go names; var r_scalar_r should be rScalarR (golint)
    • Line 343: warning: don't use underscores in Go names; var r_enum_list should be rEnumList (golint)
    • Line 344: warning: don't use underscores in Go names; var r_enum_ should be rEnum (golint)
    • Line 345: warning: don't use underscores in Go names; range var r_enum_item should be rEnumItem (golint)
    • Line 346: warning: don't use underscores in Go names; var r_enum_r should be rEnumR (golint)
    • Line 363: warning: don't use underscores in Go names; var n_r_msg_r should be nRMsgR (golint)
    • Line 369: warning: don't use underscores in Go names; var map_enum_ should be mapEnum (golint)
    • Line 377: warning: don't use underscores in Go names; var map_scalar_ should be mapScalar (golint)
    • Line 385: warning: don't use underscores in Go names; var map_msg_ should be mapMsg (golint)
    • Line 396: warning: comment on exported var ExmplAMapEnumMap should be of the form "ExmplAMapEnumMap ..." (golint)
    • Line 425: warning: exported var ExmplAMapScalarMap should have comment or be unexported (golint)
    • Line 453: warning: exported var ExmplAMapMsgMap should have comment or be unexported (golint)
    • Line 483: warning: exported var ExmplAMapEnumMapInput should have comment or be unexported (golint)
    • Line 495: warning: exported var ExmplAMapScalarMapInput should have comment or be unexported (golint)
    • Line 507: warning: exported var ExmplAMapMsgMapInput should have comment or be unexported (golint)
    • Line 519: warning: exported function ResolveAMapEnumMap should have comment or be unexported (golint)
    • Line 531: warning: exported function ResolveAMapScalarMap should have comment or be unexported (golint)
    • Line 543: warning: exported function ResolveAMapMsgMap should have comment or be unexported (golint)
    • Line 562: warning: comment on exported var ExmplBMapEnumMap should be of the form "ExmplBMapEnumMap ..." (golint)
    • Line 593: warning: exported var ExmplBMapScalarMap should have comment or be unexported (golint)
    • Line 621: warning: exported var ExmplBMapMsgMap should have comment or be unexported (golint)
    • Line 651: warning: exported var ExmplBMapEnumMapInput should have comment or be unexported (golint)
    • Line 663: warning: exported var ExmplBMapScalarMapInput should have comment or be unexported (golint)
    • Line 675: warning: exported var ExmplBMapMsgMapInput should have comment or be unexported (golint)
    • Line 687: warning: exported function ResolveBMapEnumMap should have comment or be unexported (golint)
    • Line 699: warning: exported function ResolveBMapScalarMap should have comment or be unexported (golint)
    • Line 711: warning: exported function ResolveBMapMsgMap should have comment or be unexported (golint)
    • Line 1152: warning: exported function GetServiceExampleGraphQLQueriesFields should have comment or be unexported (golint)
    • Line 1210: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 1217: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 1253: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 1260: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 1299: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 1306: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 1315: warning: exported function GetServiceExampleGraphQLMutationsFields should have comment or be unexported (golint)
    • Line 1373: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 1380: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 1449: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 1456: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • proto2gql/parser/parser.go
    • Line 11: warning: exported type Parser should have comment or be unexported (golint)
    • Line 66: warning: exported method Parser.Parse should have comment or be unexported (golint)
    • Line 107: warning: exported function New should have comment or be unexported (golint)
    • proto2gql/generator/config.go
    • Line 4: warning: exported const MethodTypeMutation should have comment (or a comment on this block) or be unexported (golint)
    • Line 11: warning: exported type FieldsConfig should have comment or be unexported (golint)
    • Line 14: warning: exported type MessageConfig should have comment or be unexported (golint)
    • Line 18: warning: exported type MethodConfig should have comment or be unexported (golint)
    • Line 22: warning: exported type ServiceConfig should have comment or be unexported (golint)
    • Line 26: warning: exported type ProtoConfig should have comment or be unexported (golint)
    • Line 39: warning: exported type ImportConfig should have comment or be unexported (golint)
    • Line 44: warning: exported type ImportsConfig should have comment or be unexported (golint)
    • Line 50: warning: exported type SchemaNodeConfig should have comment or be unexported (golint)
    • Line 60: warning: exported type SchemaConfig should have comment or be unexported (golint)
    • Line 67: warning: exported type GenerateConfig should have comment or be unexported (golint)
    • proto2gql/parser/enum.go
    • Line 5: warning: exported type Enum should have comment or be unexported (golint)
    • Line 15: warning: exported type EnumValue should have comment or be unexported (golint)
    • proto2gql/parser/message.go
    • Line 5: warning: exported type Messages should have comment or be unexported (golint)
    • Line 7: warning: exported method Messages.Copy should have comment or be unexported (golint)
    • Line 12: warning: exported method Messages.Contains should have comment or be unexported (golint)
    • Line 21: warning: exported type Message should have comment or be unexported (golint)
    • Line 34: warning: exported method Message.HaveFields should have comment or be unexported (golint)
    • Line 45: warning: exported method Message.HaveFieldsExcept should have comment or be unexported (golint)
    • Line 66: warning: exported type Field should have comment or be unexported (golint)
    • Line 74: warning: exported type MapField should have comment or be unexported (golint)
    • Line 82: warning: exported type OneOf should have comment or be unexported (golint)
    • Line 87: warning: exported type Map should have comment or be unexported (golint)
    • proto2gql/parser/service.go
    • Line 3: warning: exported type Service should have comment or be unexported (golint)
    • Line 9: warning: exported type Method should have comment or be unexported (golint)
    • proto2gql/parser/type_name.go
    • Line 3: warning: exported type TypeName should have comment or be unexported (golint)
    • Line 5: warning: exported method TypeName.NewSubTypeName should have comment or be unexported (golint)
    • Line 11: warning: exported method TypeName.Equal should have comment or be unexported (golint)
    • proto2gql/parser/types.go
    • Line 3: warning: exported type Type should have comment or be unexported (golint)
    • Line 11: warning: exported method Type.IsScalar should have comment or be unexported (golint)
    • Line 14: warning: exported method Type.IsMessage should have comment or be unexported (golint)
    • Line 18: warning: exported method Type.IsEnum should have comment or be unexported (golint)
    • Line 22: warning: exported method Type.IsMap 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!