Preparing report...

Report for github.com/c3mb0/clickhouse-go

A+    Excellent!    Found 63 issues across 99 files

Tweet

gofmt91%

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!


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.


golint53%

Golint is a linter for Go source code.

    • clickhouse-go/lib/column/nullable.go
    • Line 11: warning: exported type Nullable should have comment or be unexported (golint)
    • Line 16: warning: exported method Nullable.ScanType should have comment or be unexported (golint)
    • Line 28: warning: exported method Nullable.ReadNull should have comment or be unexported (golint)
    • Line 53: warning: exported method Nullable.WriteNull should have comment or be unexported (golint)
    • Line 83: warning: exported method Nullable.GetColumn should have comment or be unexported (golint)
    • clickhouse-go/lib/leakypool/leaky_pool.go
    • Line 5: warning: exported function InitBytePool should have comment or be unexported (golint)
    • Line 9: warning: exported function GetBytes should have comment or be unexported (golint)
    • Line 18: warning: exported function PutBytes should have comment or be unexported (golint)
    • clickhouse-go/lib/data/block.go
    • Line 17: warning: exported type Block should have comment or be unexported (golint)
    • Line 27: warning: exported method Block.Copy should have comment or be unexported (golint)
    • Line 35: warning: exported method Block.ColumnNames should have comment or be unexported (golint)
    • Line 125: warning: exported method Block.AppendRow should have comment or be unexported (golint)
    • Line 156: warning: exported method Block.Reserve should have comment or be unexported (golint)
    • Line 175: warning: exported method Block.Reset should have comment or be unexported (golint)
    • clickhouse-go/lib/column/array.go
    • Line 13: warning: exported type Array should have comment or be unexported (golint)
    • Line 27: warning: exported method Array.ReadArray should have comment or be unexported (golint)
    • Line 92: warning: exported method Array.Depth should have comment or be unexported (golint)
    • clickhouse-go/lib/column/column.go
    • Line 12: warning: exported type Column should have comment or be unexported (golint)
    • Line 22: warning: exported function Factory should have comment or be unexported (golint)
    • Line 180: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • clickhouse-go/lib/binary/decoder.go
    • Line 9: warning: exported function NewDecoder should have comment or be unexported (golint)
    • Line 15: warning: exported function NewDecoderWithCompress should have comment or be unexported (golint)
    • Line 22: warning: exported type Decoder should have comment or be unexported (golint)
    • Line 29: warning: exported method Decoder.SelectCompress should have comment or be unexported (golint)
    • Line 33: warning: exported method Decoder.Get should have comment or be unexported (golint)
    • Line 40: warning: exported method Decoder.Bool should have comment or be unexported (golint)
    • Line 48: warning: exported method Decoder.Uvarint should have comment or be unexported (golint)
    • Line 52: warning: exported method Decoder.Int8 should have comment or be unexported (golint)
    • Line 60: warning: exported method Decoder.Int16 should have comment or be unexported (golint)
    • Line 68: warning: exported method Decoder.Int32 should have comment or be unexported (golint)
    • Line 76: warning: exported method Decoder.Int64 should have comment or be unexported (golint)
    • Line 84: warning: exported method Decoder.UInt8 should have comment or be unexported (golint)
    • Line 92: warning: exported method Decoder.UInt16 should have comment or be unexported (golint)
    • Line 99: warning: exported method Decoder.UInt32 should have comment or be unexported (golint)
    • Line 109: warning: exported method Decoder.UInt64 should have comment or be unexported (golint)
    • Line 123: warning: exported method Decoder.Float32 should have comment or be unexported (golint)
    • Line 131: warning: exported method Decoder.Float64 should have comment or be unexported (golint)
    • Line 139: warning: exported method Decoder.Fixed should have comment or be unexported (golint)
    • Line 162: warning: exported method Decoder.ReadByte should have comment or be unexported (golint)
    • Line 169: warning: exported type FixedReader should have comment or be unexported (golint)
    • clickhouse-go/clickhouse.go
    • Line 24: warning: exported type Date should have comment or be unexported (golint)
    • Line 25: warning: exported type DateTime should have comment or be unexported (golint)
    • Line 26: warning: exported type UUID should have comment or be unexported (golint)
    • Line 29: warning: exported type ExternalTable should have comment or be unexported (golint)
    • Line 36: warning: exported var ErrInsertInNotBatchMode should have comment or be unexported (golint)
    • clickhouse-go/write_column.go
    • Line 11: warning: comment on exported type Clickhouse should be of the form "Clickhouse ..." (with optional leading article) (golint)
    • Line 22: warning: comment on exported type ColumnWriter should be of the form "ColumnWriter ..." (with optional leading article) (golint)
    • Line 38: warning: exported function OpenDirect should have comment or be unexported (golint)
    • clickhouse-go/lib/protocol/protocol.go
    • Line 4: warning: exported const DBMS_MIN_REVISION_WITH_SERVER_TIMEZONE should have comment (or a comment on this block) or be unexported (golint)
    • Line 9: warning: exported const ClientHello should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported const CompressEnable should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported const StateComplete should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported const ServerHello should have comment (or a comment on this block) or be unexported (golint)
    • clickhouse-go/lib/writebuffer/buffer.go
    • Line 9: warning: exported const InitialSize should have comment or be unexported (golint)
    • Line 11: warning: exported function New should have comment or be unexported (golint)
    • Line 17: warning: exported type WriteBuffer should have comment or be unexported (golint)
    • Line 39: warning: exported method WriteBuffer.WriteTo should have comment or be unexported (golint)
    • Line 53: warning: exported method WriteBuffer.Bytes should have comment or be unexported (golint)
    • Line 108: warning: exported method WriteBuffer.Reset should have comment or be unexported (golint)
    • clickhouse-go/lib/binary/compress_settings.go
    • Line 3: warning: exported type CompressionMethodByte should have comment or be unexported (golint)
    • Line 6: warning: exported const NONE should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: comment on exported const CompressHeaderSize should be of the form "CompressHeaderSize ..." (golint)
    • Line 17: warning: comment on exported const HeaderSize should be of the form "HeaderSize ..." (golint)
    • clickhouse-go/lib/types/date.go
    • Line 10: warning: comment on exported type Date should be of the form "Date ..." (with optional leading article) (golint)
    • Line 15: warning: exported method Date.Value should have comment or be unexported (golint)
    • Line 23: warning: comment on exported type DateTime should be of the form "DateTime ..." (with optional leading article) (golint)
    • Line 28: warning: exported method DateTime.Value should have comment or be unexported (golint)
    • clickhouse-go/lib/cityhash102/city64.go
    • Line 8: warning: exported type City64 should have comment or be unexported (golint)
    • Line 15: warning: exported function New64 should have comment or be unexported (golint)
    • Line 19: warning: exported method City64.Sum should have comment or be unexported (golint)
    • Line 19: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 26: warning: exported method City64.Sum64 should have comment or be unexported (golint)
    • Line 26: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 30: warning: exported method City64.Reset should have comment or be unexported (golint)
    • Line 30: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 34: warning: exported method City64.BlockSize should have comment or be unexported (golint)
    • Line 34: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 38: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 43: warning: exported method City64.Size should have comment or be unexported (golint)
    • Line 43: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • clickhouse-go/lib/column/uuid.go
    • Line 13: warning: exported const UUIDLen should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported var ErrInvalidUUIDFormat should have comment or be unexported (golint)
    • Line 19: warning: exported type UUID should have comment or be unexported (golint)
    • Line 107: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • clickhouse-go/lib/data/block_write_column.go
    • Line 12: warning: exported method Block.WriteDate should have comment or be unexported (golint)
    • Line 18: warning: exported method Block.WriteDateTime should have comment or be unexported (golint)
    • Line 22: warning: exported method Block.WriteBool should have comment or be unexported (golint)
    • Line 29: warning: exported method Block.WriteInt8 should have comment or be unexported (golint)
    • Line 33: warning: exported method Block.WriteInt16 should have comment or be unexported (golint)
    • Line 37: warning: exported method Block.WriteInt32 should have comment or be unexported (golint)
    • Line 41: warning: exported method Block.WriteInt64 should have comment or be unexported (golint)
    • Line 45: warning: exported method Block.WriteUInt8 should have comment or be unexported (golint)
    • Line 49: warning: exported method Block.WriteUInt16 should have comment or be unexported (golint)
    • Line 53: warning: exported method Block.WriteUInt32 should have comment or be unexported (golint)
    • Line 57: warning: exported method Block.WriteUInt64 should have comment or be unexported (golint)
    • Line 61: warning: exported method Block.WriteFloat32 should have comment or be unexported (golint)
    • Line 65: warning: exported method Block.WriteFloat64 should have comment or be unexported (golint)
    • Line 69: warning: exported method Block.WriteBytes should have comment or be unexported (golint)
    • Line 79: warning: exported method Block.WriteString should have comment or be unexported (golint)
    • Line 89: warning: exported method Block.WriteFixedString should have comment or be unexported (golint)
    • Line 93: warning: exported method Block.WriteIP should have comment or be unexported (golint)
    • Line 97: warning: exported method Block.WriteArray should have comment or be unexported (golint)
    • Line 101: warning: exported method Block.WriteArrayWithValue should have comment or be unexported (golint)
    • clickhouse-go/lib/data/client_info.go
    • Line 9: warning: exported const ClientName should have comment or be unexported (golint)
    • Line 12: warning: exported const ClickHouseRevision should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported type ClientInfo should have comment or be unexported (golint)
    • clickhouse-go/lib/cityhash102/cityhash.go
    • Line 74: warning: exported type Uint128 should have comment or be unexported (golint)
    • Line 76: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 80: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 84: warning: exported method Uint128.Lower64 should have comment or be unexported (golint)
    • Line 84: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 88: warning: exported method Uint128.Higher64 should have comment or be unexported (golint)
    • Line 88: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 92: warning: exported method Uint128.Bytes should have comment or be unexported (golint)
    • Line 92: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 171: warning: don't use underscores in Go names; func weakHashLen32WithSeeds_3 should be weakHashLen32WithSeeds3 (golint)
    • Line 202: warning: exported function CityHash64 should have comment or be unexported (golint)
    • Line 206: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 248: warning: exported function CityHash64WithSeed should have comment or be unexported (golint)
    • Line 252: warning: exported function CityHash64WithSeeds should have comment or be unexported (golint)
    • Line 298: warning: exported function CityHash128WithSeed should have comment or be unexported (golint)
    • Line 374: warning: exported function CityHash128 should have comment or be unexported (golint)
    • clickhouse-go/array.go
    • Line 7: warning: exported function Array should have comment or be unexported (golint)
    • Line 11: warning: exported function ArrayFixedString should have comment or be unexported (golint)
    • Line 15: warning: exported function ArrayDate should have comment or be unexported (golint)
    • Line 19: warning: exported function ArrayDateTime should have comment or be unexported (golint)
    • clickhouse-go/lib/types/uuid.go
    • Line 10: warning: error var InvalidUUIDFormatError should have name of the form ErrFoo (golint)
    • Line 10: warning: exported var InvalidUUIDFormatError should have comment or be unexported (golint)
    • Line 12: warning: comment on exported type UUID should be of the form "UUID ..." (with optional leading article) (golint)
    • Line 15: warning: exported method UUID.Value should have comment or be unexported (golint)
    • Line 19: warning: exported method UUID.MarshalBinary should have comment or be unexported (golint)
    • Line 23: warning: exported method UUID.Scan should have comment or be unexported (golint)
    • Line 65: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • clickhouse-go/lib/binary/encoder.go
    • Line 11: warning: exported function NewEncoder should have comment or be unexported (golint)
    • Line 17: warning: exported function NewEncoderWithCompress should have comment or be unexported (golint)
    • Line 24: warning: exported type Encoder should have comment or be unexported (golint)
    • Line 31: warning: exported method Encoder.SelectCompress should have comment or be unexported (golint)
    • Line 41: warning: exported method Encoder.Get should have comment or be unexported (golint)
    • Line 48: warning: exported method Encoder.Uvarint should have comment or be unexported (golint)
    • Line 56: warning: exported method Encoder.Bool should have comment or be unexported (golint)
    • Line 63: warning: exported method Encoder.Int8 should have comment or be unexported (golint)
    • Line 67: warning: exported method Encoder.Int16 should have comment or be unexported (golint)
    • Line 71: warning: exported method Encoder.Int32 should have comment or be unexported (golint)
    • Line 75: warning: exported method Encoder.Int64 should have comment or be unexported (golint)
    • Line 79: warning: exported method Encoder.UInt8 should have comment or be unexported (golint)
    • Line 87: warning: exported method Encoder.UInt16 should have comment or be unexported (golint)
    • Line 96: warning: exported method Encoder.UInt32 should have comment or be unexported (golint)
    • Line 107: warning: exported method Encoder.UInt64 should have comment or be unexported (golint)
    • Line 122: warning: exported method Encoder.Float32 should have comment or be unexported (golint)
    • Line 126: warning: exported method Encoder.Float64 should have comment or be unexported (golint)
    • Line 141: warning: exported method Encoder.RawString should have comment or be unexported (golint)
    • Line 155: warning: exported method Encoder.Flush should have comment or be unexported (golint)
    • Line 162: warning: exported type WriteFlusher should have comment or be unexported (golint)
    • Line 166: warning: exported function Str2Bytes should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign90%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words