Preparing report...

Report for github.com/RediSearch/redisearch-go

A+    Excellent!    Found 18 issues across 31 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!


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.


golint51%

Golint is a linter for Go source code.

    • redisearch-go/redisearch/query.go
    • Line 43: warning: exported function NewSortingKeyDir should have comment or be unexported (golint)
    • Line 50: warning: exported method SortingKey.Serialize should have comment or be unexported (golint)
    • Line 103: warning: exported function NewPaging should have comment or be unexported (golint)
    • redisearch-go/redisearch/schema.go
    • Line 54: warning: exported function NewOptions should have comment or be unexported (golint)
    • Line 59: warning: comment on exported method Options.SetTemporary should be of the form "SetTemporary ..." (golint)
    • Line 67: warning: comment on exported method Options.SetTemporaryPeriod should be of the form "SetTemporaryPeriod ..." (golint)
    • Line 75: warning: comment on exported method Options.SetStopWords should be of the form "SetStopWords ..." (golint)
    • Line 84: warning: comment on exported method Options.SetMaxTextFieldsFlag should be of the form "SetMaxTextFieldsFlag ..." (golint)
    • Line 270: warning: exported function SerializeSchema should have comment or be unexported (golint)
    • redisearch-go/redisearch/aggregate.go
    • Line 10: warning: comment on exported type Projection should be of the form "Projection ..." (with optional leading article) (golint)
    • Line 16: warning: exported function NewProjection should have comment or be unexported (golint)
    • Line 23: warning: exported method Projection.Serialize should have comment or be unexported (golint)
    • Line 28: warning: comment on exported type Cursor should be of the form "Cursor ..." (with optional leading article) (golint)
    • Line 35: warning: exported function NewCursor should have comment or be unexported (golint)
    • Line 43: warning: exported method Cursor.SetId should have comment or be unexported (golint)
    • Line 48: warning: exported method Cursor.SetCount should have comment or be unexported (golint)
    • Line 53: warning: exported method Cursor.SetMaxIdle should have comment or be unexported (golint)
    • Line 58: warning: exported method Cursor.Serialize should have comment or be unexported (golint)
    • Line 69: warning: comment on exported type GroupBy should be of the form "GroupBy ..." (with optional leading article) (golint)
    • Line 76: warning: exported function NewGroupBy should have comment or be unexported (golint)
    • Line 84: warning: exported method GroupBy.AddFields should have comment or be unexported (golint)
    • Line 96: warning: exported method GroupBy.Reduce should have comment or be unexported (golint)
    • Line 101: warning: exported method GroupBy.Limit should have comment or be unexported (golint)
    • Line 106: warning: exported method GroupBy.Serialize should have comment or be unexported (golint)
    • Line 118: warning: comment on exported type AggregateQuery should be of the form "AggregateQuery ..." (with optional leading article) (golint)
    • Line 132: warning: exported function NewAggregateQuery should have comment or be unexported (golint)
    • Line 143: warning: exported method AggregateQuery.SetQuery should have comment or be unexported (golint)
    • Line 148: warning: exported method AggregateQuery.SetWithSchema should have comment or be unexported (golint)
    • Line 153: warning: exported method AggregateQuery.SetVerbatim should have comment or be unexported (golint)
    • Line 158: warning: exported method AggregateQuery.SetMax should have comment or be unexported (golint)
    • Line 163: warning: exported method AggregateQuery.SetCursor should have comment or be unexported (golint)
    • Line 169: warning: exported method AggregateQuery.CursorHasResults should have comment or be unexported (golint)
    • Line 177: warning: comment on exported method AggregateQuery.Apply should be of the form "Apply ..." (golint)
    • Line 183: warning: comment on exported method AggregateQuery.Limit should be of the form "Limit ..." (golint)
    • Line 201: warning: comment on exported method AggregateQuery.GroupBy should be of the form "GroupBy ..." (golint)
    • Line 207: warning: comment on exported method AggregateQuery.SortBy should be of the form "SortBy ..." (golint)
    • Line 222: warning: comment on exported method AggregateQuery.Filter should be of the form "Filter ..." (golint)
    • Line 229: warning: exported method AggregateQuery.Serialize should have comment or be unexported (golint)
    • Line 229: warning: receiver name q should be consistent with previous receiver name a for AggregateQuery (golint)
    • Line 263: warning: comment on exported function ProcessAggResponse should be of the form "ProcessAggResponse ..." (golint)
    • Line 280: warning: don't use underscores in Go names; var aggregate_results should be aggregateResults (golint)
    • Line 296: warning: exported function ProcessAggResponseSS should have comment or be unexported (golint)
    • redisearch-go/redisearch/index.go
    • Line 42: warning: comment on exported function NewIndexDefinition should be of the form "NewIndexDefinition ..." (golint)
    • Line 48: warning: comment on exported method IndexDefinition.SetAsync should be of the form "SetAsync ..." (golint)
    • Line 55: warning: comment on exported method IndexDefinition.AddPrefix should be of the form "AddPrefix ..." (golint)
    • Line 62: warning: exported method IndexDefinition.SetFilterExpression should have comment or be unexported (golint)
    • Line 68: warning: comment on exported method IndexDefinition.SetLanguage should be of the form "SetLanguage ..." (golint)
    • Line 75: warning: comment on exported method IndexDefinition.SetLanguageField should be of the form "SetLanguageField ..." (golint)
    • Line 82: warning: comment on exported method IndexDefinition.SetScore should be of the form "SetScore ..." (golint)
    • Line 89: warning: comment on exported method IndexDefinition.SetScoreField should be of the form "SetScoreField ..." (golint)
    • Line 96: warning: comment on exported method IndexDefinition.SetPayloadField should be of the form "SetPayloadField ..." (golint)
    • Line 103: warning: comment on exported method IndexDefinition.Serialize should be of the form "Serialize ..." (golint)
    • Line 139: warning: exported function SerializeIndexingOptions should have comment or be unexported (golint)
    • redisearch-go/redisearch/pool.go
    • Line 11: warning: exported type ConnPool should have comment or be unexported (golint)
    • Line 16: warning: exported type SingleHostPool should have comment or be unexported (golint)
    • Line 20: warning: exported function NewSingleHostPool should have comment or be unexported (golint)
    • Line 33: warning: exported type MultiHostPool should have comment or be unexported (golint)
    • Line 39: warning: exported function NewMultiHostPool should have comment or be unexported (golint)
    • Line 47: warning: exported method MultiHostPool.Get should have comment or be unexported (golint)
    • Line 70: warning: exported method MultiHostPool.Close should have comment or be unexported (golint)
    • redisearch-go/redisearch/document.go
    • Line 11: warning: don't use underscores in Go names; const field_tokenization should be fieldTokenization (golint)
    • Line 73: warning: comment on exported function EscapeTextFileString should be of the form "EscapeTextFileString ..." (golint)
    • Line 149: warning: exported method Document.EstimateSize should have comment or be unexported (golint)
    • redisearch-go/redisearch/filter.go
    • Line 3: warning: comment on exported type Filter should be of the form "Filter ..." (with optional leading article) (golint)
    • Line 9: warning: comment on exported type GeoFilterOptions should be of the form "GeoFilterOptions ..." (with optional leading article) (golint)
    • Line 17: warning: comment on exported type NumericFilterOptions should be of the form "NumericFilterOptions ..." (with optional leading article) (golint)
    • Line 25: warning: comment on exported type Unit should be of the form "Unit ..." (with optional leading article) (golint)
    • Line 29: warning: exported const KILOMETERS should have comment (or a comment on this block) or be unexported (golint)
    • redisearch-go/redisearch/predicate.go
    • Line 3: warning: exported type Operator should have comment or be unexported (golint)
    • Line 6: warning: exported const Eq should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported type Predicate should have comment or be unexported (golint)
    • Line 24: warning: exported function NewPredicate should have comment or be unexported (golint)
    • Line 31: warning: exported function Equals should have comment or be unexported (golint)
    • Line 36: warning: exported function InRange should have comment or be unexported (golint)
    • Line 45: warning: exported function LessThan should have comment or be unexported (golint)
    • Line 49: warning: exported function LessThanEquals should have comment or be unexported (golint)
    • Line 53: warning: exported function GreaterThan should have comment or be unexported (golint)
    • Line 57: warning: exported function GreaterThanEquals should have comment or be unexported (golint)
    • redisearch-go/redisearch/reducer.go
    • Line 5: warning: comment on exported type GroupByReducers should be of the form "GroupByReducers ..." (with optional leading article) (golint)
    • Line 63: warning: comment on exported function NewReducerAlias should be of the form "NewReducerAlias ..." (golint)
    • Line 72: warning: exported method Reducer.SetName should have comment or be unexported (golint)
    • Line 77: warning: exported method Reducer.SetArgs should have comment or be unexported (golint)
    • Line 82: warning: exported method Reducer.SetAlias should have comment or be unexported (golint)
    • Line 87: warning: exported method Reducer.Serialize should have comment or be unexported (golint)
    • redisearch-go/redisearch/autocomplete.go
    • Line 14: warning: comment on exported function NewAutocompleterFromPool should be of the form "NewAutocompleterFromPool ..." (golint)
    • Line 71: warning: comment on exported method Autocompleter.DeleteTerms should be of the form "DeleteTerms ..." (golint)
    • Line 97: warning: comment on exported method Autocompleter.Length should be of the form "Length ..." (golint)
    • Line 148: warning: exported method Autocompleter.Serialize should have comment or be unexported (golint)
    • Line 165: warning: exported function ProcessSugGetVals should have comment or be unexported (golint)
    • redisearch-go/redisearch/client.go
    • Line 148: warning: comment on exported method Client.AliasAdd should be of the form "AliasAdd ..." (golint)
    • Line 157: warning: comment on exported method Client.AliasDel should be of the form "AliasDel ..." (golint)
    • Line 166: warning: comment on exported method Client.AliasUpdate should be of the form "AliasUpdate ..." (golint)
    • Line 175: warning: comment on exported method Client.DictAdd should be of the form "DictAdd ..." (golint)
    • Line 185: warning: comment on exported method Client.DictDel should be of the form "DictDel ..." (golint)
    • Line 195: warning: comment on exported method Client.DictDump should be of the form "DictDump ..." (golint)
    • Line 247: warning: comment on exported method Client.Aggregate should be of the form "Aggregate ..." (golint)
    • Line 293: warning: don't use underscores in Go names; var array_reply should be arrayReply (golint)
    • Line 318: warning: don't use underscores in Go names; var array_reply should be arrayReply (golint)
    • Line 357: warning: comment on exported method Client.Drop should be of the form "Drop ..." (golint)
    • Line 367: warning: comment on exported method Client.DropIndex should be of the form "DropIndex ..." (golint)
    • Line 392: warning: comment on exported method Client.DeleteDocument should be of the form "DeleteDocument ..." (golint)
    • Line 565: warning: comment on exported method Client.SetConfig should be of the form "SetConfig ..." (golint)
    • Line 574: warning: comment on exported method Client.GetConfig should be of the form "GetConfig ..." (golint)
    • Line 596: warning: comment on exported method Client.GetTagVals should be of the form "GetTagVals ..." (golint)
    • Line 605: warning: comment on exported method Client.SynAdd should be of the form "SynAdd ..." (golint)
    • Line 615: warning: comment on exported method Client.SynUpdate should be of the form "SynUpdate ..." (golint)
    • Line 624: warning: comment on exported method Client.SynDump should be of the form "SynDump ..." (golint)
    • Line 652: warning: comment on exported method Client.AddHash should be of the form "AddHash ..." (golint)
    • Line 670: warning: comment on exported method Client.List should be of the form "List ..." (golint)
    • redisearch-go/redisearch/spellcheck.go
    • Line 16: warning: exported function NewSpellCheckOptionsDefaults should have comment or be unexported (golint)
    • Line 24: warning: exported function NewSpellCheckOptions should have comment or be unexported (golint)
    • Line 36: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 89: warning: exported function NewMisspelledTerm should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign83%

IneffAssign detects ineffectual assignments in Go code.

    • redisearch-go/redisearch/client_test.go
    • Line 561: warning: ineffectual assignment to gId1 (ineffassign)
    • Line 563: warning: ineffectual assignment to gId2 (ineffassign)
    • Line 574: warning: ineffectual assignment to err (ineffassign)
    • Line 992: warning: ineffectual assignment to err (ineffassign)
    • Line 994: warning: ineffectual assignment to err (ineffassign)
    • Line 1015: warning: ineffectual assignment to err (ineffassign)
    • Line 1017: warning: ineffectual assignment to err (ineffassign)

misspell87%

Misspell Finds commonly misspelled English words

    • redisearch-go/redisearch/index.go
    • Line 49: warning: "defintion" is a misspelling of "definition" (misspell)
    • Line 50: warning: "defintion" is a misspelling of "definition" (misspell)
    • Line 56: warning: "defintion" is a misspelling of "definition" (misspell)
    • Line 57: warning: "defintion" is a misspelling of "definition" (misspell)
    • Line 62: warning: "defintion" is a misspelling of "definition" (misspell)
    • Line 63: warning: "defintion" is a misspelling of "definition" (misspell)
    • Line 69: warning: "defintion" is a misspelling of "definition" (misspell)
    • Line 70: warning: "defintion" is a misspelling of "definition" (misspell)
    • Line 76: warning: "defintion" is a misspelling of "definition" (misspell)
    • Line 77: warning: "defintion" is a misspelling of "definition" (misspell)
    • Line 83: warning: "defintion" is a misspelling of "definition" (misspell)
    • Line 84: warning: "defintion" is a misspelling of "definition" (misspell)
    • Line 90: warning: "defintion" is a misspelling of "definition" (misspell)
    • Line 91: warning: "defintion" is a misspelling of "definition" (misspell)
    • Line 97: warning: "defintion" is a misspelling of "definition" (misspell)
    • Line 98: warning: "defintion" is a misspelling of "definition" (misspell)
    • Line 104: warning: "defintion" is a misspelling of "definition" (misspell)