Preparing report...

Report for github.com/siglens/siglens

(v0.0.0-20231221230247-84603841f55c)

A+    Excellent!    Found 81 issues across 260 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!


gofmt98%

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


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo78%

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.

    • pkg/segment/writer/rawchecker.go
    • Line 294: warning: cyclomatic complexity 22 of function compareNumberDte() is high (> 15) (gocyclo)
    • Line 81: warning: cyclomatic complexity 18 of function ApplySearchToDictArrayFilter() is high (> 15) (gocyclo)
    • Line 231: warning: cyclomatic complexity 17 of function fopOnNumber() is high (> 15) (gocyclo)
    • pkg/segment/utils/aggutils.go
    • Line 24: warning: cyclomatic complexity 33 of function Reduce() is high (> 15) (gocyclo)
    • Line 117: warning: cyclomatic complexity 26 of function (*NumTypeEnclosure).ReduceFast() is high (> 15) (gocyclo)
    • pkg/segment/query/segquery.go
    • Line 453: warning: cyclomatic complexity 28 of function applyFopAllRequests() is high (> 15) (gocyclo)
    • Line 722: warning: cyclomatic complexity 18 of function applyAggOpOnSegments() is high (> 15) (gocyclo)
    • pkg/segment/aggregations/segaggs.go
    • Line 589: warning: cyclomatic complexity 32 of function performStatisticColRequestOnMeasureResults() is high (> 15) (gocyclo)
    • Line 476: warning: cyclomatic complexity 30 of function performStatisticColRequestOnHistogram() is high (> 15) (gocyclo)
    • Line 903: warning: cyclomatic complexity 22 of function performValueColRequestOnHistogram() is high (> 15) (gocyclo)
    • Line 293: warning: cyclomatic complexity 19 of function performRenameColRequestOnHistogram() is high (> 15) (gocyclo)
    • Line 391: warning: cyclomatic complexity 16 of function performRenameColRequestOnMeasureResults() is high (> 15) (gocyclo)
    • pkg/es/query/queryparser.go
    • Line 145: warning: cyclomatic complexity 37 of function ParseOpenDistroRequest() is high (> 15) (gocyclo)
    • Line 43: warning: cyclomatic complexity 36 of function ParseRequest() is high (> 15) (gocyclo)
    • Line 1148: warning: cyclomatic complexity 36 of function parseLeafNodes() is high (> 15) (gocyclo)
    • Line 1376: warning: cyclomatic complexity 31 of function convertAndParseQuerystring() is high (> 15) (gocyclo)
    • Line 929: warning: cyclomatic complexity 28 of function parseNestedDictArray() is high (> 15) (gocyclo)
    • Line 1591: warning: cyclomatic complexity 26 of function parseRange() is high (> 15) (gocyclo)
    • Line 1712: warning: cyclomatic complexity 18 of function parseMatch() is high (> 15) (gocyclo)
    • Line 529: warning: cyclomatic complexity 18 of function getIntervalForDateHistogram() is high (> 15) (gocyclo)
    • Line 2283: warning: cyclomatic complexity 17 of function parseMultiMatch_nested() is high (> 15) (gocyclo)
    • Line 706: warning: cyclomatic complexity 16 of function parseBool() is high (> 15) (gocyclo)
    • Line 640: warning: cyclomatic complexity 16 of function parseQuery() is high (> 15) (gocyclo)
    • pkg/common/dtypeutils/dtypeutils.go
    • Line 111: warning: cyclomatic complexity 25 of function ConvertExpToType() is high (> 15) (gocyclo)
    • Line 285: warning: cyclomatic complexity 22 of function Add() is high (> 15) (gocyclo)
    • Line 418: warning: cyclomatic complexity 21 of function Divide() is high (> 15) (gocyclo)
    • Line 354: warning: cyclomatic complexity 20 of function Subtract() is high (> 15) (gocyclo)
    • Line 477: warning: cyclomatic complexity 17 of function Modulo() is high (> 15) (gocyclo)
    • Line 213: warning: cyclomatic complexity 16 of function Multiply() is high (> 15) (gocyclo)
    • pkg/segment/writer/segstore.go
    • Line 385: warning: cyclomatic complexity 25 of function (*SegStore).appendWipToSegfile() is high (> 15) (gocyclo)
    • Line 568: warning: cyclomatic complexity 18 of function (*SegStore).checkAndRotateColFiles() is high (> 15) (gocyclo)
    • pkg/segment/search/conditioncheck.go
    • Line 30: warning: cyclomatic complexity 34 of function ApplyColumnarSearchQuery() is high (> 15) (gocyclo)
    • Line 197: warning: cyclomatic complexity 31 of function applyColumnarSearchUsingDictEnc() is high (> 15) (gocyclo)
    • pkg/integrations/loki/loki.go
    • Line 89: warning: cyclomatic complexity 16 of function ProcessLokiLogsIngestRequest() is high (> 15) (gocyclo)
    • Line 254: warning: cyclomatic complexity 16 of function ProcessQueryRequest() is high (> 15) (gocyclo)
    • pkg/segment/structs/evaluationstructs.go
    • Line 203: warning: cyclomatic complexity 53 of function (*BoolExpr).Evaluate() is high (> 15) (gocyclo)
    • Line 1095: warning: cyclomatic complexity 42 of function (*TextExpr).EvaluateText() is high (> 15) (gocyclo)
    • Line 979: warning: cyclomatic complexity 36 of function (*NumericExpr).Evaluate() is high (> 15) (gocyclo)
    • Line 678: warning: cyclomatic complexity 18 of function (*StatisticExpr).SortBucketResult() is high (> 15) (gocyclo)
    • Line 769: warning: cyclomatic complexity 16 of function (*StatisticExpr).RemoveFieldsNotInExprForBucketRes() is high (> 15) (gocyclo)
    • pkg/ast/logql/logql.go
    • Line 3187: warning: cyclomatic complexity 23 of function (*parser).parseExpr() is high (> 15) (gocyclo)
    • Line 3325: warning: cyclomatic complexity 16 of function (*parser).parseCharClassMatcher() is high (> 15) (gocyclo)
    • pkg/segment/tracing/handler/tracehandler.go
    • Line 587: warning: cyclomatic complexity 22 of function ProcessGanttChartRequest() is high (> 15) (gocyclo)
    • Line 23: warning: cyclomatic complexity 22 of function ProcessSearchTracesRequest() is high (> 15) (gocyclo)
    • Line 265: warning: cyclomatic complexity 22 of function ProcessRedTracesIngest() is high (> 15) (gocyclo)
    • pkg/ast/common.go
    • Line 41: warning: cyclomatic complexity 21 of function ProcessSingleFilter() is high (> 15) (gocyclo)
    • pkg/ast/pipesearch/searchHandler.go
    • Line 58: warning: cyclomatic complexity 51 of function ParseSearchBody() is high (> 15) (gocyclo)
    • Line 214: warning: cyclomatic complexity 24 of function ProcessAlertsPipeSearchRequest() is high (> 15) (gocyclo)
    • Line 318: warning: cyclomatic complexity 17 of function ProcessPipeSearchRequest() is high (> 15) (gocyclo)
    • pkg/segment/writer/packer.go
    • Line 691: warning: cyclomatic complexity 23 of function GetCvalFromRec() is high (> 15) (gocyclo)
    • Line 106: warning: cyclomatic complexity 18 of function (*SegStore).encodeRawJsonObject() is high (> 15) (gocyclo)
    • Line 196: warning: cyclomatic complexity 18 of function (*SegStore).encodeNonJaegerRawJsonArray() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell87%

Misspell Finds commonly misspelled English words

    • pkg/segment/search/segsearch.go
    • Line 197: warning: "recieved" is a misspelling of "received" (misspell)
    • Line 208: warning: "recieved" is a misspelling of "received" (misspell)
    • Line 623: warning: "recieved" is a misspelling of "received" (misspell)
    • Line 634: warning: "recieved" is a misspelling of "received" (misspell)
    • Line 695: warning: "recieved" is a misspelling of "received" (misspell)
    • Line 696: warning: "recieved" is a misspelling of "received" (misspell)
    • Line 704: warning: "recieved" is a misspelling of "received" (misspell)
    • pkg/segment/writer/packer.go
    • Line 168: warning: "recieved" is a misspelling of "received" (misspell)
    • Line 263: warning: "recieved" is a misspelling of "received" (misspell)
    • Line 352: warning: "recieved" is a misspelling of "received" (misspell)
    • Line 363: warning: "recieved" is a misspelling of "received" (misspell)
    • Line 390: warning: "recieved" is a misspelling of "received" (misspell)
    • Line 1481: warning: "comparision" is a misspelling of "comparison" (misspell)