Preparing report...

Report for github.com/francoispqt/gojay

A+    Excellent!    Found 39 issues across 125 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!


golint79%

Golint is a linter for Go source code.

    • gojay/benchmarks/benchmarks_small.go
    • Line 5: warning: exported var SmallFixture should have comment or be unexported (golint)
    • Line 7: warning: comment on exported type SmallPayload should be of the form "SmallPayload ..." (with optional leading article) (golint)
    • Line 20: warning: exported method SmallPayload.MarshalJSONObject should have comment or be unexported (golint)
    • Line 32: warning: exported method SmallPayload.IsNil should have comment or be unexported (golint)
    • Line 36: warning: exported method SmallPayload.UnmarshalJSONObject should have comment or be unexported (golint)
    • Line 60: warning: exported method SmallPayload.NKeys should have comment or be unexported (golint)
    • Line 64: warning: exported function NewSmallPayload should have comment or be unexported (golint)
    • gojay/examples/http-benchmarks/gojay/main.go
    • Line 32: warning: exported type Body should have comment or be unexported (golint)
    • Line 36: warning: exported method Body.UnmarshalJSONObject should have comment or be unexported (golint)
    • Line 45: warning: exported method Body.NKeys should have comment or be unexported (golint)
    • Line 45: warning: receiver name b should be consistent with previous receiver name c for Body (golint)
    • Line 49: warning: exported method Body.MarshalJSONObject should have comment or be unexported (golint)
    • Line 49: warning: receiver name b should be consistent with previous receiver name c for Body (golint)
    • Line 52: warning: exported method Body.IsNil should have comment or be unexported (golint)
    • Line 52: warning: receiver name b should be consistent with previous receiver name c for Body (golint)
    • Line 77: warning: exported type Color should have comment or be unexported (golint)
    • Line 84: warning: exported method Color.UnmarshalJSONObject should have comment or be unexported (golint)
    • Line 98: warning: exported method Color.NKeys should have comment or be unexported (golint)
    • Line 102: warning: exported method Color.MarshalJSONObject should have comment or be unexported (golint)
    • Line 108: warning: exported method Color.IsNil should have comment or be unexported (golint)
    • Line 112: warning: exported type Code should have comment or be unexported (golint)
    • Line 117: warning: exported method Code.UnmarshalJSONObject should have comment or be unexported (golint)
    • Line 128: warning: exported method Code.NKeys should have comment or be unexported (golint)
    • Line 128: warning: receiver name b should be consistent with previous receiver name c for Code (golint)
    • Line 132: warning: exported method Code.MarshalJSONObject should have comment or be unexported (golint)
    • Line 132: warning: receiver name b should be consistent with previous receiver name c for Code (golint)
    • Line 136: warning: exported method Code.IsNil should have comment or be unexported (golint)
    • Line 136: warning: receiver name b should be consistent with previous receiver name c for Code (golint)
    • gojay/benchmarks/benchmarks_medium.go
    • Line 5: warning: comment on exported var MediumFixture should be of the form "MediumFixture ..." (golint)
    • Line 100: warning: exported type CBAvatar should have comment or be unexported (golint)
    • Line 104: warning: exported method CBAvatar.UnmarshalJSONObject should have comment or be unexported (golint)
    • Line 111: warning: exported method CBAvatar.NKeys should have comment or be unexported (golint)
    • Line 115: warning: exported method CBAvatar.MarshalJSONObject should have comment or be unexported (golint)
    • Line 119: warning: exported method CBAvatar.IsNil should have comment or be unexported (golint)
    • Line 123: warning: exported type Avatars should have comment or be unexported (golint)
    • Line 125: warning: exported method Avatars.UnmarshalJSONArray should have comment or be unexported (golint)
    • Line 131: warning: exported method Avatars.MarshalJSONArray should have comment or be unexported (golint)
    • Line 131: warning: receiver name m should be consistent with previous receiver name t for Avatars (golint)
    • Line 136: warning: exported method Avatars.IsNil should have comment or be unexported (golint)
    • Line 136: warning: receiver name m should be consistent with previous receiver name t for Avatars (golint)
    • Line 140: warning: exported type CBGravatar should have comment or be unexported (golint)
    • Line 144: warning: exported method CBGravatar.UnmarshalJSONObject should have comment or be unexported (golint)
    • Line 151: warning: exported method CBGravatar.NKeys should have comment or be unexported (golint)
    • Line 155: warning: exported method CBGravatar.MarshalJSONObject should have comment or be unexported (golint)
    • Line 159: warning: exported method CBGravatar.IsNil should have comment or be unexported (golint)
    • Line 163: warning: exported type CBGithub should have comment or be unexported (golint)
    • Line 167: warning: exported method CBGithub.UnmarshalJSONObject should have comment or be unexported (golint)
    • Line 175: warning: exported method CBGithub.NKeys should have comment or be unexported (golint)
    • Line 179: warning: exported method CBGithub.MarshalJSONObject should have comment or be unexported (golint)
    • Line 183: warning: exported method CBGithub.IsNil should have comment or be unexported (golint)
    • Line 187: warning: exported type CBName should have comment or be unexported (golint)
    • Line 191: warning: exported method CBName.UnmarshalJSONObject should have comment or be unexported (golint)
    • Line 199: warning: exported method CBName.NKeys should have comment or be unexported (golint)
    • Line 203: warning: exported method CBName.MarshalJSONObject should have comment or be unexported (golint)
    • Line 207: warning: exported method CBName.IsNil should have comment or be unexported (golint)
    • Line 211: warning: exported type CBPerson should have comment or be unexported (golint)
    • Line 217: warning: exported method CBPerson.UnmarshalJSONObject should have comment or be unexported (golint)
    • Line 232: warning: exported method CBPerson.NKeys should have comment or be unexported (golint)
    • Line 236: warning: exported method CBPerson.MarshalJSONObject should have comment or be unexported (golint)
    • Line 242: warning: exported method CBPerson.IsNil should have comment or be unexported (golint)
    • Line 246: warning: comment on exported type MediumPayload should be of the form "MediumPayload ..." (with optional leading article) (golint)
    • Line 252: warning: exported method MediumPayload.UnmarshalJSONObject should have comment or be unexported (golint)
    • Line 263: warning: exported method MediumPayload.NKeys should have comment or be unexported (golint)
    • Line 267: warning: exported method MediumPayload.MarshalJSONObject should have comment or be unexported (golint)
    • Line 272: warning: exported method MediumPayload.IsNil should have comment or be unexported (golint)
    • Line 276: warning: exported function NewMediumPayload should have comment or be unexported (golint)
    • gojay/benchmarks/benchmarks_large.go
    • Line 9: warning: exported type DSUser should have comment or be unexported (golint)
    • Line 13: warning: exported method DSUser.UnmarshalJSONObject should have comment or be unexported (golint)
    • Line 20: warning: exported method DSUser.NKeys should have comment or be unexported (golint)
    • Line 23: warning: exported method DSUser.IsNil should have comment or be unexported (golint)
    • Line 26: warning: exported method DSUser.MarshalJSONObject should have comment or be unexported (golint)
    • Line 30: warning: exported type DSTopic should have comment or be unexported (golint)
    • Line 35: warning: exported method DSTopic.UnmarshalJSONObject should have comment or be unexported (golint)
    • Line 44: warning: exported method DSTopic.NKeys should have comment or be unexported (golint)
    • Line 47: warning: exported method DSTopic.IsNil should have comment or be unexported (golint)
    • Line 50: warning: exported method DSTopic.MarshalJSONObject should have comment or be unexported (golint)
    • Line 55: warning: exported type DSTopics should have comment or be unexported (golint)
    • Line 57: warning: exported method DSTopics.UnmarshalJSONArray should have comment or be unexported (golint)
    • Line 63: warning: exported method DSTopics.MarshalJSONArray should have comment or be unexported (golint)
    • Line 63: warning: receiver name m should be consistent with previous receiver name t for DSTopics (golint)
    • Line 68: warning: exported method DSTopics.IsNil should have comment or be unexported (golint)
    • Line 68: warning: receiver name m should be consistent with previous receiver name t for DSTopics (golint)
    • Line 72: warning: exported type DSTopicsList should have comment or be unexported (golint)
    • Line 77: warning: exported method DSTopicsList.UnmarshalJSONObject should have comment or be unexported (golint)
    • Line 87: warning: exported method DSTopicsList.NKeys should have comment or be unexported (golint)
    • Line 91: warning: exported method DSTopicsList.IsNil should have comment or be unexported (golint)
    • Line 95: warning: exported method DSTopicsList.MarshalJSONObject should have comment or be unexported (golint)
    • Line 100: warning: exported type DSUsers should have comment or be unexported (golint)
    • Line 102: warning: exported method DSUsers.UnmarshalJSONArray should have comment or be unexported (golint)
    • Line 108: warning: exported method DSUsers.MarshalJSONArray should have comment or be unexported (golint)
    • Line 108: warning: receiver name m should be consistent with previous receiver name t for DSUsers (golint)
    • Line 113: warning: exported method DSUsers.IsNil should have comment or be unexported (golint)
    • Line 113: warning: receiver name m should be consistent with previous receiver name t for DSUsers (golint)
    • Line 117: warning: exported type LargePayload should have comment or be unexported (golint)
    • Line 122: warning: exported method LargePayload.UnmarshalJSONObject should have comment or be unexported (golint)
    • Line 133: warning: exported method LargePayload.NKeys should have comment or be unexported (golint)
    • Line 137: warning: comment on exported method LargePayload.MarshalJSONObject should be of the form "MarshalJSONObject ..." (golint)
    • Line 143: warning: exported method LargePayload.IsNil should have comment or be unexported (golint)
    • Line 147: warning: exported var LargeFixture should have comment or be unexported (golint)
    • Line 151: warning: exported function NewLargePayload should have comment or be unexported (golint)
    • gojay/examples/websocket/server/server.go
    • Line 20: warning: exported type Client should have comment or be unexported (golint)
    • Line 25: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 32: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 39: warning: exported method Client.Close should have comment or be unexported (golint)
    • gojay/decode_slice.go
    • Line 47: warning: comment on exported method Decoder.AddSliceFloat64 should be of the form "AddSliceFloat64 ..." (golint)
    • Line 69: warning: comment on exported method Decoder.AddSliceBool should be of the form "AddSliceBool ..." (golint)
    • gojay/examples/websocket/comm/comm.go
    • Line 13: warning: exported type Message should have comment or be unexported (golint)
    • Line 18: warning: exported method Message.UnmarshalJSONObject should have comment or be unexported (golint)
    • Line 27: warning: exported method Message.NKeys should have comment or be unexported (golint)
    • Line 31: warning: exported method Message.MarshalJSONObject should have comment or be unexported (golint)
    • Line 35: warning: exported method Message.IsNil should have comment or be unexported (golint)
    • Line 35: warning: receiver name u should be consistent with previous receiver name m for Message (golint)
    • Line 39: warning: comment on exported type Sender should be of the form "Sender ..." (with optional leading article) (golint)
    • Line 42: warning: exported method Sender.MarshalStream should have comment or be unexported (golint)
    • Line 51: warning: exported type Receiver should have comment or be unexported (golint)
    • Line 53: warning: exported method Receiver.UnmarshalStream should have comment or be unexported (golint)
    • Line 62: warning: exported type SenderReceiver should have comment or be unexported (golint)
    • Line 70: warning: exported method SenderReceiver.SetReceiver should have comment or be unexported (golint)
    • Line 76: warning: exported method SenderReceiver.SetSender should have comment or be unexported (golint)
    • Line 82: warning: exported method SenderReceiver.SendMessage should have comment or be unexported (golint)
    • Line 92: warning: exported method SenderReceiver.OnMessage should have comment or be unexported (golint)
    • Line 92: warning: receiver name c should be consistent with previous receiver name sc for SenderReceiver (golint)
    • Line 103: warning: exported method SenderReceiver.Init should have comment or be unexported (golint)

gocyclo89%

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.

    • gojay/gojay/codegen/struct.go
    • Line 103: warning: cyclomatic complexity 29 of function (*Struct).generateFieldDecoding() is high (> 15) (gocyclo)
    • Line 233: warning: cyclomatic complexity 19 of function (*Struct).generateFieldEncoding() is high (> 15) (gocyclo)
    • gojay/decode_object.go
    • Line 103: warning: cyclomatic complexity 29 of function (*Decoder).decodeObjectNull() is high (> 15) (gocyclo)
    • Line 20: warning: cyclomatic complexity 26 of function (*Decoder).decodeObject() is high (> 15) (gocyclo)
    • Line 202: warning: cyclomatic complexity 18 of function (*Decoder).skipObject() is high (> 15) (gocyclo)
    • gojay/gojay_test.go
    • Line 59: warning: cyclomatic complexity 28 of function (*testObject).UnmarshalJSONObject() is high (> 15) (gocyclo)
    • gojay/decode_number_int.go
    • Line 454: warning: cyclomatic complexity 20 of function (*Decoder).getInt8() is high (> 15) (gocyclo)
    • Line 683: warning: cyclomatic complexity 20 of function (*Decoder).getInt32() is high (> 15) (gocyclo)
    • Line 222: warning: cyclomatic complexity 20 of function (*Decoder).getInt16() is high (> 15) (gocyclo)
    • Line 914: warning: cyclomatic complexity 20 of function (*Decoder).getInt64() is high (> 15) (gocyclo)
    • Line 763: warning: cyclomatic complexity 16 of function (*Decoder).getInt32WithExp() is high (> 15) (gocyclo)
    • Line 301: warning: cyclomatic complexity 16 of function (*Decoder).getInt16WithExp() is high (> 15) (gocyclo)
    • Line 533: warning: cyclomatic complexity 16 of function (*Decoder).getInt8WithExp() is high (> 15) (gocyclo)
    • Line 994: warning: cyclomatic complexity 16 of function (*Decoder).getInt64WithExp() is high (> 15) (gocyclo)
    • gojay/decode.go
    • Line 256: warning: cyclomatic complexity 34 of function (*Decoder).Decode() is high (> 15) (gocyclo)
    • Line 63: warning: cyclomatic complexity 32 of function Unmarshal() is high (> 15) (gocyclo)
    • gojay/decode_number_float.go
    • Line 108: warning: cyclomatic complexity 28 of function (*Decoder).getFloat() is high (> 15) (gocyclo)
    • Line 316: warning: cyclomatic complexity 28 of function (*Decoder).getFloat32() is high (> 15) (gocyclo)
    • gojay/encode_interface.go
    • Line 11: warning: cyclomatic complexity 18 of function (*Encoder).Encode() is high (> 15) (gocyclo)
    • Line 92: warning: cyclomatic complexity 18 of function (*Encoder).AddInterfaceKey() is high (> 15) (gocyclo)
    • Line 134: warning: cyclomatic complexity 18 of function (*Encoder).AddInterfaceKeyOmitEmpty() is high (> 15) (gocyclo)
    • Line 52: warning: cyclomatic complexity 17 of function (*Encoder).AddInterface() is high (> 15) (gocyclo)
    • gojay/decode_array.go
    • Line 139: warning: cyclomatic complexity 18 of function (*Decoder).skipArray() is high (> 15) (gocyclo)
    • Line 69: warning: cyclomatic complexity 16 of function (*Decoder).decodeArrayNull() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!