Preparing report...

Report for github.com/pilosa/go-pilosa

A+    Excellent!    Found 14 issues across 34 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


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!


golint70%

Golint is a linter for Go source code.

    • go-pilosa/gpexp/translator.go
    • Line 3: warning: exported type Translator should have comment or be unexported (golint)
    • Line 17: warning: exported function NewMapTranslator should have comment or be unexported (golint)
    • Line 29: warning: exported method MapTranslator.GetCol should have comment or be unexported (golint)
    • Line 38: warning: exported method MapTranslator.AddCols should have comment or be unexported (golint)
    • Line 51: warning: exported method MapTranslator.GetRow should have comment or be unexported (golint)
    • Line 60: warning: exported method MapTranslator.AddRows should have comment or be unexported (golint)
    • go-pilosa/examples/multicol-csv-import/main.go
    • Line 20: warning: comment on exported const HasHeader should be of the form "HasHeader ..." (golint)
    • Line 22: warning: exported const IndexName should have comment or be unexported (golint)
    • Line 23: warning: exported const IndexKeys should have comment or be unexported (golint)
    • Line 24: warning: exported const FieldDef should have comment or be unexported (golint)
    • Line 39: warning: exported const ThreadCount should have comment or be unexported (golint)
    • Line 40: warning: exported const BatchSize should have comment or be unexported (golint)
    • Line 41: warning: exported const ImportThreadCount should have comment or be unexported (golint)
    • Line 43: warning: comment on exported const EnableRoaringImport should be of the form "EnableRoaringImport ..." (golint)
    • Line 187: warning: exported type CSVFieldType should have comment or be unexported (golint)
    • Line 190: warning: exported const SetField should have comment (or a comment on this block) or be unexported (golint)
    • Line 195: warning: exported type FieldOptsInfo should have comment or be unexported (golint)
    • Line 204: warning: exported type FieldInfo should have comment or be unexported (golint)
    • Line 212: warning: exported type MultiColCSVRecordIterator should have comment or be unexported (golint)
    • Line 220: warning: exported function NewIterator should have comment or be unexported (golint)
    • Line 245: warning: exported method MultiColCSVRecordIterator.NextRecord should have comment or be unexported (golint)
    • go-pilosa/client.go
    • Line 126: warning: exported method Client.Close should have comment or be unexported (golint)
    • Line 1186: warning: exported method Client.TranslateRowKeys should have comment or be unexported (golint)
    • Line 1195: warning: exported method Client.TranslateColumnKeys should have comment or be unexported (golint)
    • go-pilosa/orm.go
    • Line 123: warning: exported type SerializedQuery should have comment or be unexported (golint)
    • Line 182: warning: exported method PQLBaseQuery.Serialize should have comment or be unexported (golint)
    • Line 204: warning: exported method PQLRowQuery.Serialize should have comment or be unexported (golint)
    • Line 240: warning: exported method PQLBatchQuery.Serialize should have comment or be unexported (golint)
    • Line 419: warning: exported method Index.ShardWidth should have comment or be unexported (golint)
    • Line 432: warning: comment on exported method Index.HasField should be of the form "HasField ..." (golint)
    • Line 1347: warning: exported method PQLRowsQuery.Serialize should have comment or be unexported (golint)
    • go-pilosa/tracer.go
    • Line 40: warning: exported type NoopTracer should have comment or be unexported (golint)
    • Line 42: warning: exported type NoopSpan should have comment or be unexported (golint)
    • Line 44: warning: exported method NoopSpan.Finish should have comment or be unexported (golint)
    • Line 47: warning: exported method NoopSpan.FinishWithOptions should have comment or be unexported (golint)
    • Line 51: warning: exported method NoopSpan.Context should have comment or be unexported (golint)
    • Line 54: warning: exported method NoopSpan.SetOperationName should have comment or be unexported (golint)
    • Line 58: warning: exported method NoopSpan.SetTag should have comment or be unexported (golint)
    • Line 62: warning: exported method NoopSpan.LogFields should have comment or be unexported (golint)
    • Line 66: warning: exported method NoopSpan.LogKV should have comment or be unexported (golint)
    • Line 70: warning: exported method NoopSpan.SetBaggageItem should have comment or be unexported (golint)
    • Line 74: warning: exported method NoopSpan.BaggageItem should have comment or be unexported (golint)
    • Line 78: warning: exported method NoopSpan.Tracer should have comment or be unexported (golint)
    • Line 82: warning: exported method NoopSpan.LogEvent should have comment or be unexported (golint)
    • Line 86: warning: exported method NoopSpan.LogEventWithPayload should have comment or be unexported (golint)
    • Line 90: warning: exported method NoopSpan.Log should have comment or be unexported (golint)
    • Line 94: warning: exported method NoopTracer.StartSpan should have comment or be unexported (golint)
    • Line 98: warning: exported method NoopTracer.Inject should have comment or be unexported (golint)
    • Line 102: warning: exported method NoopTracer.Extract should have comment or be unexported (golint)
    • go-pilosa/lru/lru.go
    • Line 57: warning: exported method LRU.Cleanup should have comment or be unexported (golint)
    • Line 63: warning: exported method LRU.AddNoEvict should have comment or be unexported (golint)
    • go-pilosa/csv/csv.go
    • Line 74: 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)

gocyclo88%

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.

    • go-pilosa/gpexp/importbatch_test.go
    • Line 181: warning: cyclomatic complexity 87 of function TestBatches() is high (> 15) (gocyclo)
    • Line 534: warning: cyclomatic complexity 35 of function TestBatchesStringIDs() is high (> 15) (gocyclo)
    • Line 75: warning: cyclomatic complexity 31 of function TestStringSlice() is high (> 15) (gocyclo)
    • go-pilosa/gpexp/importbatch.go
    • Line 265: warning: cyclomatic complexity 31 of function (*Batch).Add() is high (> 15) (gocyclo)
    • Line 534: warning: cyclomatic complexity 24 of function (*Batch).makeFragments() is high (> 15) (gocyclo)
    • Line 416: warning: cyclomatic complexity 21 of function (*Batch).doTranslation() is high (> 15) (gocyclo)

ineffassign94%

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!