Preparing report...

Report for github.com/blevesearch/bleve/v2

(v2.5.2)

A+    Excellent!    Found 79 issues across 638 files

Tweet

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!


gofmt100%

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

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo87%

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.

    • mapping/analysis.go
    • Line 27: warning: cyclomatic complexity 20 of function (*customAnalysis).registerAll() is high (> 15) (gocyclo)
    • search/query/query.go
    • Line 128: warning: cyclomatic complexity 62 of function ParseQuery() is high (> 15) (gocyclo)
    • Line 518: warning: cyclomatic complexity 54 of function ExtractSynonyms() is high (> 15) (gocyclo)
    • Line 459: warning: cyclomatic complexity 18 of function ExtractFields() is high (> 15) (gocyclo)
    • Line 683: warning: cyclomatic complexity 18 of function addSynonymsForTermWithMatchType() is high (> 15) (gocyclo)
    • index/scorch/introducer.go
    • Line 337: warning: cyclomatic complexity 23 of function (*Scorch).introduceMerge() is high (> 15) (gocyclo)
    • Line 106: warning: cyclomatic complexity 18 of function (*Scorch).introduceSegment() is high (> 15) (gocyclo)
    • index/scorch/scorch_test.go
    • Line 352: warning: cyclomatic complexity 55 of function TestIndexInsertThenDelete() is high (> 15) (gocyclo)
    • Line 1098: warning: cyclomatic complexity 54 of function TestIndexInsertUpdateDeleteWithMultipleTypesStored() is high (> 15) (gocyclo)
    • Line 1862: warning: cyclomatic complexity 31 of function TestIndexDocValueReaderWithMultipleDocs() is high (> 15) (gocyclo)
    • Line 712: warning: cyclomatic complexity 24 of function TestIndexInsertWithStore() is high (> 15) (gocyclo)
    • Line 818: warning: cyclomatic complexity 23 of function TestIndexInternalCRUD() is high (> 15) (gocyclo)
    • Line 171: warning: cyclomatic complexity 22 of function TestIndexOpenReopenWithInsert() is high (> 15) (gocyclo)
    • Line 67: warning: cyclomatic complexity 22 of function TestIndexOpenReopen() is high (> 15) (gocyclo)
    • Line 929: warning: cyclomatic complexity 21 of function TestIndexBatch() is high (> 15) (gocyclo)
    • Line 2335: warning: cyclomatic complexity 18 of function TestCancelIndexForceMerge() is high (> 15) (gocyclo)
    • Line 2216: warning: cyclomatic complexity 18 of function TestIndexForceMerge() is high (> 15) (gocyclo)
    • Line 1399: warning: cyclomatic complexity 17 of function TestIndexUpdateComposites() is high (> 15) (gocyclo)
    • Line 2600: warning: cyclomatic complexity 17 of function TestReadOnlyIndex() is high (> 15) (gocyclo)
    • Line 1482: warning: cyclomatic complexity 16 of function TestIndexTermReaderCompositeFields() is high (> 15) (gocyclo)
    • search_test.go
    • Line 3984: warning: cyclomatic complexity 47 of function TestSynonymSearchQueries() is high (> 15) (gocyclo)
    • Line 1249: warning: cyclomatic complexity 38 of function TestMatchQueryPartialMatch() is high (> 15) (gocyclo)
    • Line 2889: warning: cyclomatic complexity 26 of function TestDateRangeFacetQueriesWithCustomDateTimeParser() is high (> 15) (gocyclo)
    • Line 3795: warning: cyclomatic complexity 22 of function TestThesaurusTermReader() is high (> 15) (gocyclo)
    • Line 3114: warning: cyclomatic complexity 17 of function TestDateRangeTimestampQueries() is high (> 15) (gocyclo)
    • Line 2597: warning: cyclomatic complexity 16 of function TestDateRangeStringQuery() is high (> 15) (gocyclo)
    • index_alias_impl_test.go
    • Line 31: warning: cyclomatic complexity 40 of function TestIndexAliasSingle() is high (> 15) (gocyclo)
    • Line 721: warning: cyclomatic complexity 24 of function TestMultiSearchTimeout() is high (> 15) (gocyclo)
    • index/scorch/persister.go
    • Line 608: warning: cyclomatic complexity 28 of function prepareBoltSnapshot() is high (> 15) (gocyclo)
    • Line 95: warning: cyclomatic complexity 27 of function (*Scorch).persisterLoop() is high (> 15) (gocyclo)
    • Line 405: warning: cyclomatic complexity 20 of function (*Scorch).persistSnapshotMaybeMerge() is high (> 15) (gocyclo)
    • Line 746: warning: cyclomatic complexity 16 of function (*Scorch).persistSnapshotDirect() is high (> 15) (gocyclo)
    • mapping/document.go
    • Line 465: warning: cyclomatic complexity 56 of function (*DocumentMapping).processProperty() is high (> 15) (gocyclo)
    • Line 388: warning: cyclomatic complexity 27 of function (*DocumentMapping).walkDocument() is high (> 15) (gocyclo)
    • Line 295: warning: cyclomatic complexity 19 of function (*DocumentMapping).UnmarshalJSON() is high (> 15) (gocyclo)
    • Line 54: warning: cyclomatic complexity 16 of function (*DocumentMapping).Validate() is high (> 15) (gocyclo)
    • search_knn_test.go
    • Line 437: warning: cyclomatic complexity 42 of function TestVectorBase64Index() is high (> 15) (gocyclo)
    • Line 50: warning: cyclomatic complexity 28 of function TestSimilaritySearchPartitionedIndex() is high (> 15) (gocyclo)
    • Line 870: warning: cyclomatic complexity 22 of function verifyResult() is high (> 15) (gocyclo)
    • Line 1418: warning: cyclomatic complexity 20 of function TestKNNFiltering() is high (> 15) (gocyclo)
    • index/upsidedown/upsidedown.go
    • Line 794: warning: cyclomatic complexity 30 of function (*UpsideDownCouch).Batch() is high (> 15) (gocyclo)
    • Line 156: warning: cyclomatic complexity 27 of function (*UpsideDownCouch).batchRows() is high (> 15) (gocyclo)
    • Line 512: warning: cyclomatic complexity 20 of function (*UpsideDownCouch).mergeOldAndNew() is high (> 15) (gocyclo)
    • index_alias_impl.go
    • Line 178: warning: cyclomatic complexity 18 of function (*indexAliasImpl).SearchInContext() is high (> 15) (gocyclo)
    • index/scorch/optimize.go
    • Line 306: warning: cyclomatic complexity 16 of function (*OptimizeTFRDisjunctionUnadorned).Finish() is high (> 15) (gocyclo)
    • Line 158: warning: cyclomatic complexity 16 of function (*OptimizeTFRConjunctionUnadorned).Finish() is high (> 15) (gocyclo)
    • index/upsidedown/upsidedown_test.go
    • Line 772: warning: cyclomatic complexity 46 of function TestIndexInsertUpdateDeleteWithMultipleTypesStored() is high (> 15) (gocyclo)
    • Line 185: warning: cyclomatic complexity 27 of function TestIndexInsertThenDelete() is high (> 15) (gocyclo)
    • Line 473: warning: cyclomatic complexity 22 of function TestIndexInsertWithStore() is high (> 15) (gocyclo)
    • Line 577: warning: cyclomatic complexity 19 of function TestIndexInternalCRUD() is high (> 15) (gocyclo)
    • Line 671: warning: cyclomatic complexity 17 of function TestIndexBatch() is high (> 15) (gocyclo)
    • Line 1057: warning: cyclomatic complexity 17 of function TestIndexUpdateComposites() is high (> 15) (gocyclo)
    • Line 381: warning: cyclomatic complexity 17 of function TestIndexInsertMultiple() is high (> 15) (gocyclo)
    • Line 109: warning: cyclomatic complexity 16 of function TestIndexInsert() is high (> 15) (gocyclo)
    • index/upsidedown/reader_test.go
    • Line 321: warning: cyclomatic complexity 46 of function TestIndexDocIdOnlyReader() is high (> 15) (gocyclo)
    • Line 27: warning: cyclomatic complexity 35 of function TestIndexReader() is high (> 15) (gocyclo)
    • Line 200: warning: cyclomatic complexity 21 of function TestIndexDocIdReader() is high (> 15) (gocyclo)
    • search/searcher/search_phrase.go
    • Line 80: warning: cyclomatic complexity 35 of function NewMultiPhraseSearcher() is high (> 15) (gocyclo)
    • Line 439: warning: cyclomatic complexity 17 of function findPhrasePaths() is high (> 15) (gocyclo)
    • geo/parse.go
    • Line 50: warning: cyclomatic complexity 29 of function ExtractGeoPoint() is high (> 15) (gocyclo)
    • Line 391: warning: cyclomatic complexity 22 of function ExtractGeoShapeCoordinates() is high (> 15) (gocyclo)
    • mapping/field.go
    • Line 402: warning: cyclomatic complexity 33 of function (*FieldMapping).UnmarshalJSON() is high (> 15) (gocyclo)
    • search/searcher/search_boolean.go
    • Line 210: warning: cyclomatic complexity 30 of function (*BooleanSearcher).Next() is high (> 15) (gocyclo)
    • Line 336: warning: cyclomatic complexity 21 of function (*BooleanSearcher).Advance() is high (> 15) (gocyclo)
    • search/search.go
    • Line 283: warning: cyclomatic complexity 17 of function (*DocumentMatch).Complete() is high (> 15) (gocyclo)
    • index_test.go
    • Line 2966: warning: cyclomatic complexity 47 of function TestCopyIndex() is high (> 15) (gocyclo)
    • Line 66: warning: cyclomatic complexity 34 of function TestCrud() is high (> 15) (gocyclo)
    • Line 723: warning: cyclomatic complexity 28 of function TestBytesReadStored() is high (> 15) (gocyclo)
    • Line 563: warning: cyclomatic complexity 27 of function TestBytesRead() is high (> 15) (gocyclo)
    • Line 2530: warning: cyclomatic complexity 27 of function TestBatchMerge() is high (> 15) (gocyclo)
    • Line 1172: warning: cyclomatic complexity 23 of function TestDict() is high (> 15) (gocyclo)
    • Line 1547: warning: cyclomatic complexity 21 of function TestDocumentFieldArrayPositions() is high (> 15) (gocyclo)
    • Line 447: warning: cyclomatic complexity 20 of function TestBM25GlobalScoring() is high (> 15) (gocyclo)
    • Line 1652: warning: cyclomatic complexity 17 of function TestKeywordSearchBug207() is high (> 15) (gocyclo)
    • search/sort.go
    • Line 53: warning: cyclomatic complexity 24 of function ParseSearchSortObj() is high (> 15) (gocyclo)
    • index/scorch/reader_test.go
    • Line 27: warning: cyclomatic complexity 39 of function TestIndexReader() is high (> 15) (gocyclo)
    • Line 344: warning: cyclomatic complexity 25 of function TestIndexDocIdOnlyReader() is high (> 15) (gocyclo)
    • Line 221: warning: cyclomatic complexity 23 of function TestIndexDocIdReader() is high (> 15) (gocyclo)
    • mapping/index.go
    • Line 227: warning: cyclomatic complexity 32 of function (*IndexMappingImpl).UnmarshalJSON() is high (> 15) (gocyclo)
    • search/searcher/search_fuzzy.go
    • Line 148: warning: cyclomatic complexity 28 of function findFuzzyCandidateTerms() is high (> 15) (gocyclo)
    • Line 41: warning: cyclomatic complexity 17 of function NewFuzzySearcher() is high (> 15) (gocyclo)
    • index/upsidedown/row.go
    • Line 930: warning: cyclomatic complexity 25 of function visitBackIndexRow() is high (> 15) (gocyclo)
    • Line 1051: warning: cyclomatic complexity 21 of function visitBackIndexRowFieldTerms() is high (> 15) (gocyclo)
    • index/scorch/merge.go
    • Line 277: warning: cyclomatic complexity 25 of function (*Scorch).planMergeAtSnapshot() is high (> 15) (gocyclo)
    • Line 32: warning: cyclomatic complexity 19 of function (*Scorch).mergerLoop() is high (> 15) (gocyclo)
    • index_impl.go
    • Line 544: warning: cyclomatic complexity 70 of function (*indexImpl).SearchInContext() is high (> 15) (gocyclo)
    • Line 869: warning: cyclomatic complexity 35 of function LoadAndHighlightFields() 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!