Preparing report...

Report for github.com/kshvakov/clickhouse

A    Great!    Found 58 issues across 101 files

Tweet

gofmt88%

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!


golint53%

Golint is a linter for Go source code.

    • clickhouse/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/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 131: warning: exported method Block.AppendRow should have comment or be unexported (golint)
    • Line 162: warning: exported method Block.Reserve should have comment or be unexported (golint)
    • Line 181: warning: exported method Block.Reset should have comment or be unexported (golint)
    • clickhouse/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/lib/column/array.go
    • Line 16: warning: exported type Array should have comment or be unexported (golint)
    • Line 30: warning: exported method Array.ReadArray should have comment or be unexported (golint)
    • Line 122: warning: exported method Array.Depth should have comment or be unexported (golint)
    • clickhouse/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/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/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/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/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/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/stmt.go
    • Line 24: warning: comment on exported function WithQueryID should be of the form "WithQueryID ..." (golint)
    • clickhouse/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/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/lib/data/block_write_column.go
    • Line 13: warning: exported method Block.WriteDate should have comment or be unexported (golint)
    • Line 19: warning: exported method Block.WriteDateNullable should have comment or be unexported (golint)
    • Line 27: warning: exported method Block.WriteDateTime should have comment or be unexported (golint)
    • Line 31: warning: exported method Block.WriteBool should have comment or be unexported (golint)
    • Line 38: warning: exported method Block.WriteDateTimeNullable should have comment or be unexported (golint)
    • Line 46: warning: exported method Block.WriteInt8 should have comment or be unexported (golint)
    • Line 50: warning: exported method Block.WriteInt8Nullable should have comment or be unexported (golint)
    • Line 54: warning: exported method Block.WriteInt16 should have comment or be unexported (golint)
    • Line 58: warning: exported method Block.WriteInt16Nullable should have comment or be unexported (golint)
    • Line 62: warning: exported method Block.WriteInt32 should have comment or be unexported (golint)
    • Line 66: warning: exported method Block.WriteInt32Nullable should have comment or be unexported (golint)
    • Line 70: warning: exported method Block.WriteInt64 should have comment or be unexported (golint)
    • Line 74: warning: exported method Block.WriteInt64Nullable should have comment or be unexported (golint)
    • Line 78: warning: exported method Block.WriteUInt8 should have comment or be unexported (golint)
    • Line 82: warning: exported method Block.WriteUInt8Nullable should have comment or be unexported (golint)
    • Line 86: warning: exported method Block.WriteUInt16 should have comment or be unexported (golint)
    • Line 90: warning: exported method Block.WriteUInt16Nullable should have comment or be unexported (golint)
    • Line 94: warning: exported method Block.WriteUInt32 should have comment or be unexported (golint)
    • Line 98: warning: exported method Block.WriteUInt32Nullable should have comment or be unexported (golint)
    • Line 102: warning: exported method Block.WriteUInt64 should have comment or be unexported (golint)
    • Line 106: warning: exported method Block.WriteUInt64Nullable should have comment or be unexported (golint)
    • Line 110: warning: exported method Block.WriteFloat32 should have comment or be unexported (golint)
    • Line 114: warning: exported method Block.WriteFloat32Nullable should have comment or be unexported (golint)
    • Line 118: warning: exported method Block.WriteFloat64 should have comment or be unexported (golint)
    • Line 122: warning: exported method Block.WriteFloat64Nullable should have comment or be unexported (golint)
    • Line 126: warning: exported method Block.WriteBytes should have comment or be unexported (golint)
    • Line 136: warning: exported method Block.WriteBytesNullable should have comment or be unexported (golint)
    • Line 147: warning: exported method Block.WriteString should have comment or be unexported (golint)
    • Line 157: warning: exported method Block.WriteStringNullable should have comment or be unexported (golint)
    • Line 168: warning: exported method Block.WriteFixedString should have comment or be unexported (golint)
    • Line 172: warning: exported method Block.WriteIP should have comment or be unexported (golint)
    • Line 176: warning: exported method Block.WriteArray should have comment or be unexported (golint)
    • Line 180: warning: exported method Block.WriteArrayWithValue should have comment or be unexported (golint)
    • Line 187: warning: exported method Block.WriteFixedStringNullable should have comment or be unexported (golint)
    • Line 192: warning: exported method Block.WriteArrayNullable should have comment or be unexported (golint)
    • clickhouse/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.Nullable should have comment or be unexported (golint)
    • Line 59: warning: exported method Encoder.Uvarint should have comment or be unexported (golint)
    • Line 67: warning: exported method Encoder.UvarintNullable should have comment or be unexported (golint)
    • Line 78: warning: exported method Encoder.Bool should have comment or be unexported (golint)
    • Line 85: warning: exported method Encoder.BoolNullable should have comment or be unexported (golint)
    • Line 96: warning: exported method Encoder.Int8 should have comment or be unexported (golint)
    • Line 100: warning: exported method Encoder.Int8Nullable should have comment or be unexported (golint)
    • Line 111: warning: exported method Encoder.Int16 should have comment or be unexported (golint)
    • Line 115: warning: exported method Encoder.Int16Nullable should have comment or be unexported (golint)
    • Line 126: warning: exported method Encoder.Int32 should have comment or be unexported (golint)
    • Line 130: warning: exported method Encoder.Int32Nullable should have comment or be unexported (golint)
    • Line 141: warning: exported method Encoder.Int64 should have comment or be unexported (golint)
    • Line 145: warning: exported method Encoder.Int64Nullable should have comment or be unexported (golint)
    • Line 156: warning: exported method Encoder.UInt8 should have comment or be unexported (golint)
    • Line 164: warning: exported method Encoder.UInt8Nullable should have comment or be unexported (golint)
    • Line 175: warning: exported method Encoder.UInt16 should have comment or be unexported (golint)
    • Line 184: warning: exported method Encoder.UInt16Nullable should have comment or be unexported (golint)
    • Line 195: warning: exported method Encoder.UInt32 should have comment or be unexported (golint)
    • Line 206: warning: exported method Encoder.UInt32Nullable should have comment or be unexported (golint)
    • Line 217: warning: exported method Encoder.UInt64 should have comment or be unexported (golint)
    • Line 232: warning: exported method Encoder.UInt64Nullable should have comment or be unexported (golint)
    • Line 243: warning: exported method Encoder.Float32 should have comment or be unexported (golint)
    • Line 247: warning: exported method Encoder.Float32Nullable should have comment or be unexported (golint)
    • Line 258: warning: exported method Encoder.Float64 should have comment or be unexported (golint)
    • Line 262: warning: exported method Encoder.Float64Nullable should have comment or be unexported (golint)
    • Line 284: warning: exported method Encoder.StringNullable should have comment or be unexported (golint)
    • Line 295: warning: exported method Encoder.RawString should have comment or be unexported (golint)
    • Line 305: warning: exported method Encoder.RawStringNullable should have comment or be unexported (golint)
    • Line 320: warning: exported method Encoder.Flush should have comment or be unexported (golint)
    • Line 327: warning: exported type WriteFlusher should have comment or be unexported (golint)
    • Line 331: warning: exported function Str2Bytes should have comment or be unexported (golint)
    • clickhouse/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 50: warning: exported function OpenDirect should have comment or be unexported (golint)
    • clickhouse/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/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/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/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/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)

gocyclo91%

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.

    • clickhouse/lib/column/decimal.go
    • Line 63: warning: cyclomatic complexity 29 of function (*Decimal).write32() is high (> 15) (gocyclo)
    • Line 141: warning: cyclomatic complexity 25 of function (*Decimal).write64() is high (> 15) (gocyclo)

ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


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!