Preparing report...

Report for github.com/thrift-iterator/go

C    Needs some work    Found 118 issues across 126 files

Tweet

gofmt22%

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!


gocyclo97%

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.


golint69%

Golint is a linter for Go source code.

    • go/protocol/protocol.go
    • Line 3: warning: comment on exported type TType should be of the form "TType ..." (with optional leading article) (golint)
    • Line 5: warning: exported type TMessageType should have comment or be unexported (golint)
    • Line 6: warning: exported type SeqId should have comment or be unexported (golint)
    • Line 7: warning: exported type FieldId should have comment or be unexported (golint)
    • Line 10: warning: exported const BINARY_VERSION_MASK should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported const MessgeTypeInvalid should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported const TypeStop should have comment (or a comment on this block) or be unexported (golint)
    • Line 74: warning: exported type MessageHeader should have comment or be unexported (golint)
    • Line 80: warning: exported type Flusher should have comment or be unexported (golint)
    • go/test/level_2/struct_complex_test/TestObject.go
    • Line 3: warning: exported type SubType should have comment or be unexported (golint)
    • Line 7: warning: exported type Enum should have comment or be unexported (golint)
    • Line 10: warning: don't use underscores in Go names; const Enum_A should be EnumA (golint)
    • Line 10: warning: exported const Enum_A should have comment (or a comment on this block) or be unexported (golint)
    • Line 12: warning: don't use underscores in Go names; const Enum_B should be EnumB (golint)
    • Line 15: warning: exported type Int should have comment or be unexported (golint)
    • Line 17: warning: exported type TestObject should have comment or be unexported (golint)
    • go/config.go
    • Line 30: warning: exported method Config.AddExtension should have comment or be unexported (golint)
    • Line 35: warning: exported method Config.Froze should have comment or be unexported (golint)
    • go/encoder.go
    • Line 11: warning: exported type Encoder should have comment or be unexported (golint)
    • Line 16: warning: exported method Encoder.Encode should have comment or be unexported (golint)
    • Line 32: warning: exported method Encoder.EncodeMessage should have comment or be unexported (golint)
    • Line 36: warning: exported method Encoder.EncodeMessageHeader should have comment or be unexported (golint)
    • Line 40: warning: exported method Encoder.EncodeMessageArguments should have comment or be unexported (golint)
    • Line 44: warning: exported method Encoder.Reset should have comment or be unexported (golint)
    • Line 48: warning: exported method Encoder.Buffer should have comment or be unexported (golint)
    • go/protocol/compact/type.go
    • Line 7: warning: exported type TCompactType should have comment or be unexported (golint)
    • Line 10: warning: exported const TypeStop should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: comment on exported method TCompactType.ToTType should be of the form "ToTType ..." (golint)
    • go/protocol/binary/skip.go
    • Line 19: warning: exported method Iterator.Skip should have comment or be unexported (golint)
    • Line 23: warning: exported method Iterator.SkipMessageHeader should have comment or be unexported (golint)
    • Line 27: warning: exported method Iterator.SkipStruct should have comment or be unexported (golint)
    • Line 31: warning: exported method Iterator.SkipList should have comment or be unexported (golint)
    • Line 35: warning: exported method Iterator.SkipMap should have comment or be unexported (golint)
    • Line 39: warning: exported method Iterator.SkipBinary should have comment or be unexported (golint)
    • go/test/level_0/enum_test/Player.go
    • Line 3: warning: exported type Player should have comment or be unexported (golint)
    • Line 5: warning: don't use underscores in Go names; const Player_JAVA should be PlayerJAVA (golint)
    • Line 5: warning: exported const Player_JAVA should have comment (or a comment on this block) or be unexported (golint)
    • Line 6: warning: don't use underscores in Go names; const Player_FLASH should be PlayerFLASH (golint)
    • go/test/combinations.go
    • Line 10: warning: exported type Combination should have comment or be unexported (golint)
    • Line 147: warning: exported var Combinations should have comment or be unexported (golint)
    • Line 151: warning: exported var UnmarshalCombinations should have comment or be unexported (golint)
    • Line 153: warning: exported var MarshalCombinations should have comment or be unexported (golint)
    • go/binding/codegen/codegen.go
    • Line 8: warning: exported type Extension should have comment or be unexported (golint)
    • Line 13: warning: exported method Extension.MangledName should have comment or be unexported (golint)
    • go/raw/raw_object.go
    • Line 5: warning: exported type StructField should have comment or be unexported (golint)
    • Line 10: warning: exported type Struct should have comment or be unexported (golint)
    • Line 12: warning: exported type List should have comment or be unexported (golint)
    • Line 17: warning: exported type MapEntry should have comment or be unexported (golint)
    • Line 22: warning: exported type Map should have comment or be unexported (golint)
    • go/protocol/compact/stream.go
    • Line 11: warning: exported type Stream should have comment or be unexported (golint)
    • Line 21: warning: exported function NewStream should have comment or be unexported (golint)
    • Line 30: warning: exported method Stream.Spawn should have comment or be unexported (golint)
    • Line 40: warning: exported method Stream.ReportError should have comment or be unexported (golint)
    • Line 46: warning: exported method Stream.Buffer should have comment or be unexported (golint)
    • Line 50: warning: exported method Stream.Reset should have comment or be unexported (golint)
    • Line 56: warning: exported method Stream.Flush should have comment or be unexported (golint)
    • Line 79: warning: exported method Stream.WriteMessageHeader should have comment or be unexported (golint)
    • Line 86: warning: exported method Stream.WriteListHeader should have comment or be unexported (golint)
    • Line 95: warning: exported method Stream.WriteStructHeader should have comment or be unexported (golint)
    • Line 100: warning: exported method Stream.WriteStructField should have comment or be unexported (golint)
    • Line 116: warning: exported method Stream.WriteStructFieldStop should have comment or be unexported (golint)
    • Line 123: warning: exported method Stream.WriteMapHeader should have comment or be unexported (golint)
    • Line 132: warning: exported method Stream.WriteBool should have comment or be unexported (golint)
    • Line 159: warning: exported method Stream.WriteInt8 should have comment or be unexported (golint)
    • Line 163: warning: exported method Stream.WriteUint8 should have comment or be unexported (golint)
    • Line 167: warning: exported method Stream.WriteInt16 should have comment or be unexported (golint)
    • Line 171: warning: exported method Stream.WriteUint16 should have comment or be unexported (golint)
    • Line 175: warning: exported method Stream.WriteInt32 should have comment or be unexported (golint)
    • Line 179: warning: exported method Stream.WriteUint32 should have comment or be unexported (golint)
    • Line 197: warning: exported method Stream.WriteInt64 should have comment or be unexported (golint)
    • Line 215: warning: exported method Stream.WriteUint64 should have comment or be unexported (golint)
    • Line 219: warning: exported method Stream.WriteInt should have comment or be unexported (golint)
    • Line 223: warning: exported method Stream.WriteUint should have comment or be unexported (golint)
    • Line 227: warning: exported method Stream.WriteFloat64 should have comment or be unexported (golint)
    • Line 241: warning: exported method Stream.WriteBinary should have comment or be unexported (golint)
    • Line 246: warning: exported method Stream.WriteString should have comment or be unexported (golint)
    • go/protocol/binary/stream.go
    • Line 11: warning: exported type Stream should have comment or be unexported (golint)
    • Line 18: warning: exported function NewStream should have comment or be unexported (golint)
    • Line 26: warning: exported method Stream.Spawn should have comment or be unexported (golint)
    • Line 36: warning: exported method Stream.ReportError should have comment or be unexported (golint)
    • Line 42: warning: exported method Stream.Buffer should have comment or be unexported (golint)
    • Line 46: warning: exported method Stream.Reset should have comment or be unexported (golint)
    • Line 52: warning: exported method Stream.Flush should have comment or be unexported (golint)
    • Line 75: warning: exported method Stream.WriteMessageHeader should have comment or be unexported (golint)
    • Line 82: warning: exported method Stream.WriteListHeader should have comment or be unexported (golint)
    • Line 87: warning: exported method Stream.WriteStructHeader should have comment or be unexported (golint)
    • Line 90: warning: exported method Stream.WriteStructField should have comment or be unexported (golint)
    • Line 94: warning: exported method Stream.WriteStructFieldStop should have comment or be unexported (golint)
    • Line 98: warning: exported method Stream.WriteMapHeader should have comment or be unexported (golint)
    • Line 103: warning: exported method Stream.WriteBool should have comment or be unexported (golint)
    • Line 111: warning: exported method Stream.WriteInt8 should have comment or be unexported (golint)
    • Line 115: warning: exported method Stream.WriteUint8 should have comment or be unexported (golint)
    • Line 119: warning: exported method Stream.WriteInt16 should have comment or be unexported (golint)
    • Line 123: warning: exported method Stream.WriteUint16 should have comment or be unexported (golint)
    • Line 127: warning: exported method Stream.WriteInt32 should have comment or be unexported (golint)
    • Line 131: warning: exported method Stream.WriteUint32 should have comment or be unexported (golint)
    • Line 135: warning: exported method Stream.WriteInt64 should have comment or be unexported (golint)
    • Line 139: warning: exported method Stream.WriteUint64 should have comment or be unexported (golint)
    • Line 145: warning: exported method Stream.WriteInt should have comment or be unexported (golint)
    • Line 149: warning: exported method Stream.WriteUint should have comment or be unexported (golint)
    • Line 153: warning: exported method Stream.WriteFloat64 should have comment or be unexported (golint)
    • Line 157: warning: exported method Stream.WriteBinary should have comment or be unexported (golint)
    • Line 162: warning: exported method Stream.WriteString should have comment or be unexported (golint)
    • go/decoder.go
    • Line 11: warning: exported type Decoder should have comment or be unexported (golint)
    • Line 16: warning: exported method Decoder.Decode should have comment or be unexported (golint)
    • Line 31: warning: exported method Decoder.DecodeMessage should have comment or be unexported (golint)
    • Line 37: warning: exported method Decoder.DecodeMessageHeader should have comment or be unexported (golint)
    • Line 43: warning: exported method Decoder.DecodeMessageArguments should have comment or be unexported (golint)
    • Line 49: warning: exported method Decoder.Reset should have comment or be unexported (golint)
    • go/raw/raw_extension.go
    • Line 8: warning: exported type Extension should have comment or be unexported (golint)
    • Line 11: warning: exported method Extension.DecoderOf should have comment or be unexported (golint)
    • Line 23: warning: exported method Extension.EncoderOf should have comment or be unexported (golint)
    • go/protocol/binary/iterator.go
    • Line 11: warning: exported type Iterator should have comment or be unexported (golint)
    • Line 20: warning: exported function NewIterator should have comment or be unexported (golint)
    • Line 86: warning: exported method Iterator.Spawn should have comment or be unexported (golint)
    • Line 94: warning: exported method Iterator.ReportError should have comment or be unexported (golint)
    • Line 100: warning: exported method Iterator.Reset should have comment or be unexported (golint)
    • Line 106: warning: exported method Iterator.ReadMessageHeader should have comment or be unexported (golint)
    • Line 123: warning: exported method Iterator.ReadStructHeader should have comment or be unexported (golint)
    • Line 127: warning: exported method Iterator.ReadStructField should have comment or be unexported (golint)
    • Line 137: warning: exported method Iterator.ReadListHeader should have comment or be unexported (golint)
    • Line 144: warning: exported method Iterator.ReadMapHeader should have comment or be unexported (golint)
    • Line 152: warning: exported method Iterator.ReadBool should have comment or be unexported (golint)
    • Line 156: warning: exported method Iterator.ReadInt should have comment or be unexported (golint)
    • Line 160: warning: exported method Iterator.ReadUint should have comment or be unexported (golint)
    • Line 164: warning: exported method Iterator.ReadInt8 should have comment or be unexported (golint)
    • Line 168: warning: exported method Iterator.ReadUint8 should have comment or be unexported (golint)
    • Line 172: warning: exported method Iterator.ReadInt16 should have comment or be unexported (golint)
    • Line 176: warning: exported method Iterator.ReadUint16 should have comment or be unexported (golint)
    • Line 181: warning: exported method Iterator.ReadInt32 should have comment or be unexported (golint)
    • Line 185: warning: exported method Iterator.ReadUint32 should have comment or be unexported (golint)
    • Line 190: warning: exported method Iterator.ReadInt64 should have comment or be unexported (golint)
    • Line 194: warning: exported method Iterator.ReadUint64 should have comment or be unexported (golint)
    • Line 200: warning: exported method Iterator.ReadFloat64 should have comment or be unexported (golint)
    • Line 204: warning: exported method Iterator.ReadString should have comment or be unexported (golint)
    • Line 209: warning: exported method Iterator.ReadBinary should have comment or be unexported (golint)
    • go/general/general_object.go
    • Line 5: warning: exported type Object should have comment or be unexported (golint)
    • Line 9: warning: exported type List should have comment or be unexported (golint)
    • Line 11: warning: exported method List.Get should have comment or be unexported (golint)
    • Line 22: warning: exported type Map should have comment or be unexported (golint)
    • Line 24: warning: exported method Map.Get should have comment or be unexported (golint)
    • Line 35: warning: exported type Struct should have comment or be unexported (golint)
    • Line 37: warning: exported method Struct.Get should have comment or be unexported (golint)
    • Line 48: warning: exported type Message should have comment or be unexported (golint)
    • go/spi/spi.go
    • Line 9: warning: exported type Iterator should have comment or be unexported (golint)
    • Line 43: warning: exported type Stream should have comment or be unexported (golint)
    • Line 74: warning: exported type ValEncoder should have comment or be unexported (golint)
    • Line 79: warning: exported type ValDecoder should have comment or be unexported (golint)
    • Line 83: warning: exported type ValDecoderProvider should have comment or be unexported (golint)
    • Line 88: warning: exported type ValEncoderProvider should have comment or be unexported (golint)
    • Line 93: warning: exported type Extension should have comment or be unexported (golint)
    • Line 98: warning: exported type DummyExtension should have comment or be unexported (golint)
    • Line 101: warning: exported method DummyExtension.DecoderOf should have comment or be unexported (golint)
    • Line 105: warning: exported method DummyExtension.EncoderOf should have comment or be unexported (golint)
    • Line 109: warning: exported type Extensions should have comment or be unexported (golint)
    • Line 111: warning: exported method Extensions.DecoderOf should have comment or be unexported (golint)
    • Line 121: warning: exported method Extensions.EncoderOf should have comment or be unexported (golint)
    • go/protocol/compact/skip.go
    • Line 19: warning: exported method Iterator.Skip should have comment or be unexported (golint)
    • Line 23: warning: exported method Iterator.SkipMessageHeader should have comment or be unexported (golint)
    • Line 27: warning: exported method Iterator.SkipStruct should have comment or be unexported (golint)
    • Line 31: warning: exported method Iterator.SkipList should have comment or be unexported (golint)
    • Line 35: warning: exported method Iterator.SkipMap should have comment or be unexported (golint)
    • Line 39: warning: exported method Iterator.SkipBinary should have comment or be unexported (golint)
    • go/api.go
    • Line 9: warning: exported type Protocol should have comment or be unexported (golint)
    • Line 11: warning: exported var ProtocolBinary should have comment or be unexported (golint)
    • Line 12: warning: exported var ProtocolCompact should have comment or be unexported (golint)
    • Line 14: warning: exported type Config should have comment or be unexported (golint)
    • Line 20: warning: exported type API should have comment or be unexported (golint)
    • Line 47: warning: exported var DefaultConfig should have comment or be unexported (golint)
    • Line 49: warning: exported function NewStream should have comment or be unexported (golint)
    • Line 53: warning: exported function NewIterator should have comment or be unexported (golint)
    • Line 57: warning: exported function Unmarshal should have comment or be unexported (golint)
    • Line 71: warning: exported function Marshal should have comment or be unexported (golint)
    • Line 80: warning: exported function NewDecoder should have comment or be unexported (golint)
    • Line 84: warning: exported function NewEncoder should have comment or be unexported (golint)
    • go/test/api/generated.go
    • Line 10: warning: exported function DecodeSimpleValue_DT_ptr_int64_EXT_default_ST_ptr_binary__Iterator should have comment or be unexported (golint)
    • Line 10: warning: don't use underscores in Go names; func DecodeSimpleValue_DT_ptr_int64_EXT_default_ST_ptr_binary__Iterator should be DecodeSimpleValueDTPtrInt64EXTDefaultSTPtrBinaryIterator (golint)
    • Line 14: warning: exported function DecodeAnything_DT_ptr_int64_EXT_default_ST_ptr_binary__Iterator should have comment or be unexported (golint)
    • Line 14: warning: don't use underscores in Go names; func DecodeAnything_DT_ptr_int64_EXT_default_ST_ptr_binary__Iterator should be DecodeAnythingDTPtrInt64EXTDefaultSTPtrBinaryIterator (golint)
    • Line 22: warning: exported function DecodeStruct_DT_ptr_binding_test__TestObject_EXT_default_ST_ptr_binary__Iterator should have comment or be unexported (golint)
    • Line 22: warning: don't use underscores in Go names; func DecodeStruct_DT_ptr_binding_test__TestObject_EXT_default_ST_ptr_binary__Iterator should be DecodeStructDTPtrBindingTestTestObjectEXTDefaultSTPtrBinaryIterator (golint)
    • Line 44: warning: exported function DecodeAnything_DT_ptr_binding_test__TestObject_EXT_default_ST_ptr_binary__Iterator should have comment or be unexported (golint)
    • Line 44: warning: don't use underscores in Go names; func DecodeAnything_DT_ptr_binding_test__TestObject_EXT_default_ST_ptr_binary__Iterator should be DecodeAnythingDTPtrBindingTestTestObjectEXTDefaultSTPtrBinaryIterator (golint)
    • Line 52: warning: exported function Decode_DT_ptr_binding_test__TestObject_EXT_default_ST_ptr_binary__Iterator should have comment or be unexported (golint)
    • Line 52: warning: don't use underscores in Go names; func Decode_DT_ptr_binding_test__TestObject_EXT_default_ST_ptr_binary__Iterator should be DecodeDTPtrBindingTestTestObjectEXTDefaultSTPtrBinaryIterator (golint)
    • go/general/general_extension.go
    • Line 9: warning: exported type Extension should have comment or be unexported (golint)
    • Line 12: warning: exported method Extension.EncoderOf should have comment or be unexported (golint)
    • Line 28: warning: exported method Extension.DecoderOf should have comment or be unexported (golint)
    • go/spi/discard.go
    • Line 3: warning: exported function DiscardList should have comment or be unexported (golint)
    • Line 10: warning: exported function DiscardStruct should have comment or be unexported (golint)
    • Line 21: warning: exported function DiscardMap should have comment or be unexported (golint)
    • go/protocol/compact/iterator.go
    • Line 12: warning: exported type Iterator should have comment or be unexported (golint)
    • Line 25: warning: exported function NewIterator should have comment or be unexported (golint)
    • Line 112: warning: exported method Iterator.Spawn should have comment or be unexported (golint)
    • Line 120: warning: exported method Iterator.ReportError should have comment or be unexported (golint)
    • Line 126: warning: exported method Iterator.Reset should have comment or be unexported (golint)
    • Line 132: warning: exported method Iterator.ReadMessageHeader should have comment or be unexported (golint)
    • Line 154: warning: exported method Iterator.ReadStructHeader should have comment or be unexported (golint)
    • Line 159: warning: exported method Iterator.ReadStructField should have comment or be unexported (golint)
    • Line 196: warning: exported method Iterator.ReadListHeader should have comment or be unexported (golint)
    • Line 211: warning: exported method Iterator.ReadMapHeader should have comment or be unexported (golint)
    • Line 222: warning: exported method Iterator.ReadBool should have comment or be unexported (golint)
    • Line 229: warning: exported method Iterator.ReadInt should have comment or be unexported (golint)
    • Line 233: warning: exported method Iterator.ReadUint should have comment or be unexported (golint)
    • Line 237: warning: exported method Iterator.ReadInt8 should have comment or be unexported (golint)
    • Line 241: warning: exported method Iterator.ReadUint8 should have comment or be unexported (golint)
    • Line 245: warning: exported method Iterator.ReadInt16 should have comment or be unexported (golint)
    • Line 249: warning: exported method Iterator.ReadUint16 should have comment or be unexported (golint)
    • Line 253: warning: exported method Iterator.ReadInt32 should have comment or be unexported (golint)
    • Line 259: warning: exported method Iterator.ReadUint32 should have comment or be unexported (golint)
    • Line 263: warning: exported method Iterator.ReadInt64 should have comment or be unexported (golint)
    • Line 269: warning: exported method Iterator.ReadUint64 should have comment or be unexported (golint)
    • Line 273: warning: exported method Iterator.ReadFloat64 should have comment or be unexported (golint)
    • Line 278: warning: exported method Iterator.ReadString should have comment or be unexported (golint)
    • Line 283: warning: exported method Iterator.ReadBinary 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!