Preparing report...

Report for github.com/blevesearch/bleve

(v1.0.14)

A+    Excellent!    Found 98 issues across 584 files

Tweet

gofmt93%

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

    • doc.go
    • Line 1: warning: file is not gofmted with -s (gofmt)

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!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


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.

    • index_impl.go
    • Line 445: warning: cyclomatic complexity 34 of function (*indexImpl).SearchInContext() is high (> 15) (gocyclo)
    • Line 611: warning: cyclomatic complexity 26 of function LoadAndHighlightFields() is high (> 15) (gocyclo)
    • Line 139: warning: cyclomatic complexity 16 of function openIndexUsing() is high (> 15) (gocyclo)
    • index/store/test/iterator.go
    • Line 228: warning: cyclomatic complexity 22 of function CommonTestRangeIterator() is high (> 15) (gocyclo)
    • Line 148: warning: cyclomatic complexity 17 of function CommonTestPrefixIteratorSeek() is high (> 15) (gocyclo)
    • mapping/field.go
    • Line 277: warning: cyclomatic complexity 23 of function (*FieldMapping).UnmarshalJSON() is high (> 15) (gocyclo)
    • index/upsidedown/row.go
    • Line 927: warning: cyclomatic complexity 25 of function visitBackIndexRow() is high (> 15) (gocyclo)
    • Line 1048: warning: cyclomatic complexity 21 of function visitBackIndexRowFieldTerms() is high (> 15) (gocyclo)
    • index/scorch/merge.go
    • Line 242: warning: cyclomatic complexity 24 of function (*Scorch).planMergeAtSnapshot() is high (> 15) (gocyclo)
    • Line 31: warning: cyclomatic complexity 17 of function (*Scorch).mergerLoop() is high (> 15) (gocyclo)
    • search/sort.go
    • Line 46: warning: cyclomatic complexity 23 of function ParseSearchSortObj() is high (> 15) (gocyclo)
    • index/scorch/optimize.go
    • Line 305: warning: cyclomatic complexity 16 of function (*OptimizeTFRDisjunctionUnadorned).Finish() is high (> 15) (gocyclo)
    • Line 157: warning: cyclomatic complexity 16 of function (*OptimizeTFRConjunctionUnadorned).Finish() is high (> 15) (gocyclo)
    • index_test.go
    • Line 66: warning: cyclomatic complexity 36 of function TestCrud() is high (> 15) (gocyclo)
    • Line 1837: warning: cyclomatic complexity 29 of function TestBatchMerge() is high (> 15) (gocyclo)
    • Line 490: warning: cyclomatic complexity 23 of function TestDict() is high (> 15) (gocyclo)
    • Line 855: warning: cyclomatic complexity 23 of function TestDocumentFieldArrayPositions() is high (> 15) (gocyclo)
    • Line 960: warning: cyclomatic complexity 17 of function TestKeywordSearchBug207() is high (> 15) (gocyclo)
    • mapping/document.go
    • Line 406: warning: cyclomatic complexity 47 of function (*DocumentMapping).processProperty() is high (> 15) (gocyclo)
    • Line 328: warning: cyclomatic complexity 27 of function (*DocumentMapping).walkDocument() is high (> 15) (gocyclo)
    • Line 256: warning: cyclomatic complexity 17 of function (*DocumentMapping).UnmarshalJSON() is high (> 15) (gocyclo)
    • search/searcher/search_boolean.go
    • Line 209: warning: cyclomatic complexity 30 of function (*BooleanSearcher).Next() is high (> 15) (gocyclo)
    • Line 335: warning: cyclomatic complexity 21 of function (*BooleanSearcher).Advance() is high (> 15) (gocyclo)
    • search/search.go
    • Line 259: warning: cyclomatic complexity 16 of function (*DocumentMatch).Complete() is high (> 15) (gocyclo)
    • index/upsidedown/reader_test.go
    • Line 315: warning: cyclomatic complexity 42 of function TestIndexDocIdOnlyReader() is high (> 15) (gocyclo)
    • Line 26: warning: cyclomatic complexity 35 of function TestIndexReader() is high (> 15) (gocyclo)
    • Line 201: warning: cyclomatic complexity 19 of function TestIndexDocIdReader() is high (> 15) (gocyclo)
    • index/scorch/reader_test.go
    • Line 26: warning: cyclomatic complexity 39 of function TestIndexReader() is high (> 15) (gocyclo)
    • Line 337: warning: cyclomatic complexity 22 of function TestIndexDocIdOnlyReader() is high (> 15) (gocyclo)
    • Line 221: warning: cyclomatic complexity 21 of function TestIndexDocIdReader() is high (> 15) (gocyclo)
    • index/upsidedown/upsidedown.go
    • Line 803: warning: cyclomatic complexity 30 of function (*UpsideDownCouch).Batch() is high (> 15) (gocyclo)
    • Line 150: warning: cyclomatic complexity 27 of function (*UpsideDownCouch).batchRows() is high (> 15) (gocyclo)
    • Line 504: warning: cyclomatic complexity 20 of function (*UpsideDownCouch).mergeOldAndNew() is high (> 15) (gocyclo)
    • index/scorch/scorch_test.go
    • Line 350: warning: cyclomatic complexity 55 of function TestIndexInsertThenDelete() is high (> 15) (gocyclo)
    • Line 1094: warning: cyclomatic complexity 53 of function TestIndexInsertUpdateDeleteWithMultipleTypesStored() is high (> 15) (gocyclo)
    • Line 1831: warning: cyclomatic complexity 27 of function TestIndexDocumentVisitFieldTermsWithMultipleDocs() is high (> 15) (gocyclo)
    • Line 710: warning: cyclomatic complexity 24 of function TestIndexInsertWithStore() is high (> 15) (gocyclo)
    • Line 814: warning: cyclomatic complexity 23 of function TestIndexInternalCRUD() is high (> 15) (gocyclo)
    • Line 169: warning: cyclomatic complexity 22 of function TestIndexOpenReopenWithInsert() is high (> 15) (gocyclo)
    • Line 65: warning: cyclomatic complexity 22 of function TestIndexOpenReopen() is high (> 15) (gocyclo)
    • Line 925: warning: cyclomatic complexity 21 of function TestIndexBatch() is high (> 15) (gocyclo)
    • Line 2157: warning: cyclomatic complexity 18 of function TestIndexForceMerge() is high (> 15) (gocyclo)
    • Line 2267: warning: cyclomatic complexity 18 of function TestCancelIndexForceMerge() is high (> 15) (gocyclo)
    • Line 1391: warning: cyclomatic complexity 17 of function TestIndexUpdateComposites() is high (> 15) (gocyclo)
    • index_alias_impl_test.go
    • Line 32: warning: cyclomatic complexity 40 of function TestIndexAliasSingle() is high (> 15) (gocyclo)
    • Line 723: warning: cyclomatic complexity 24 of function TestMultiSearchTimeout() is high (> 15) (gocyclo)
    • http/doc_get.go
    • Line 37: warning: cyclomatic complexity 17 of function (*DocGetHandler).ServeHTTP() is high (> 15) (gocyclo)
    • mapping/index.go
    • Line 202: warning: cyclomatic complexity 28 of function (*IndexMappingImpl).UnmarshalJSON() is high (> 15) (gocyclo)
    • geo/parse.go
    • Line 38: warning: cyclomatic complexity 29 of function ExtractGeoPoint() is high (> 15) (gocyclo)
    • index/store/test/bytes.go
    • Line 131: warning: cyclomatic complexity 22 of function CommonTestWriterOwnsBytes() is high (> 15) (gocyclo)
    • Line 31: warning: cyclomatic complexity 18 of function CommonTestReaderOwnsGetBytes() is high (> 15) (gocyclo)
    • mapping/analysis.go
    • Line 26: warning: cyclomatic complexity 18 of function (*customAnalysis).registerAll() is high (> 15) (gocyclo)
    • index/upsidedown/upsidedown_test.go
    • Line 770: warning: cyclomatic complexity 45 of function TestIndexInsertUpdateDeleteWithMultipleTypesStored() is high (> 15) (gocyclo)
    • Line 184: warning: cyclomatic complexity 27 of function TestIndexInsertThenDelete() is high (> 15) (gocyclo)
    • Line 472: warning: cyclomatic complexity 22 of function TestIndexInsertWithStore() is high (> 15) (gocyclo)
    • Line 575: warning: cyclomatic complexity 19 of function TestIndexInternalCRUD() is high (> 15) (gocyclo)
    • Line 380: warning: cyclomatic complexity 17 of function TestIndexInsertMultiple() is high (> 15) (gocyclo)
    • Line 669: warning: cyclomatic complexity 17 of function TestIndexBatch() is high (> 15) (gocyclo)
    • Line 1050: warning: cyclomatic complexity 17 of function TestIndexUpdateComposites() is high (> 15) (gocyclo)
    • Line 108: warning: cyclomatic complexity 16 of function TestIndexInsert() is high (> 15) (gocyclo)
    • index/scorch/persister.go
    • Line 84: warning: cyclomatic complexity 25 of function (*Scorch).persisterLoop() is high (> 15) (gocyclo)
    • Line 431: warning: cyclomatic complexity 19 of function prepareBoltSnapshot() is high (> 15) (gocyclo)
    • Line 525: warning: cyclomatic complexity 16 of function (*Scorch).persistSnapshotDirect() is high (> 15) (gocyclo)

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!