Preparing report...

Report for github.xingqwq.cn/elastic/beats

(v6.8.23+incompatible)

A+    Excellent!    Found 526 issues across 1989 files

Tweet

gofmt76%

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


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!


gocyclo96%

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.

    • libbeat/cmd/instance/beat.go
    • Line 435: warning: cyclomatic complexity 24 of function (*Beat).Setup() is high (> 15) (gocyclo)
    • Line 745: warning: cyclomatic complexity 23 of function (*Beat).registerTemplateLoading() is high (> 15) (gocyclo)
    • filebeat/beater/filebeat.go
    • Line 69: warning: cyclomatic complexity 24 of function New() is high (> 15) (gocyclo)
    • Line 199: warning: cyclomatic complexity 17 of function (*Filebeat).loadModulesML() is high (> 15) (gocyclo)
    • Line 286: warning: cyclomatic complexity 16 of function (*Filebeat).Run() is high (> 15) (gocyclo)
    • libbeat/outputs/outil/select.go
    • Line 217: warning: cyclomatic complexity 22 of function buildSingle() is high (> 15) (gocyclo)
    • Line 111: warning: cyclomatic complexity 17 of function BuildSelectorFromConfig() is high (> 15) (gocyclo)
    • packetbeat/protos/cassandra/internal/gocql/marshal.go
    • Line 217: warning: cyclomatic complexity 26 of function (Type).String() is high (> 15) (gocyclo)
    • Line 279: warning: cyclomatic complexity 22 of function getApacheCassandraType() is high (> 15) (gocyclo)
    • Line 352: warning: cyclomatic complexity 19 of function (ErrType).String() is high (> 15) (gocyclo)
    • Line 480: warning: cyclomatic complexity 17 of function (FrameOp).String() is high (> 15) (gocyclo)
    • Line 82: warning: cyclomatic complexity 16 of function goType() is high (> 15) (gocyclo)
    • packetbeat/protos/thrift/thrift_test.go
    • Line 158: warning: cyclomatic complexity 127 of function TestThrift_thriftReadField() is high (> 15) (gocyclo)
    • Line 417: warning: cyclomatic complexity 74 of function TestThrift_thriftMessageParser() is high (> 15) (gocyclo)
    • Line 74: warning: cyclomatic complexity 31 of function TestThrift_readMessageBegin() is high (> 15) (gocyclo)
    • Line 39: warning: cyclomatic complexity 17 of function TestThrift_thriftReadString() is high (> 15) (gocyclo)
    • packetbeat/protos/http/http_parser.go
    • Line 265: warning: cyclomatic complexity 21 of function (*parser).parseHeaders() is high (> 15) (gocyclo)
    • Line 325: warning: cyclomatic complexity 21 of function (*parser).parseHeader() is high (> 15) (gocyclo)
    • Line 155: warning: cyclomatic complexity 17 of function (*parser).parseHTTPLine() is high (> 15) (gocyclo)
    • packetbeat/protos/mysql/mysql.go
    • Line 215: warning: cyclomatic complexity 41 of function mysqlMessageParser() is high (> 15) (gocyclo)
    • Line 682: warning: cyclomatic complexity 34 of function (*mysqlPlugin).parseMysqlResponse() is high (> 15) (gocyclo)
    • packetbeat/protos/dns/dns.go
    • Line 601: warning: cyclomatic complexity 21 of function rrToMapStr() is high (> 15) (gocyclo)
    • Line 361: warning: cyclomatic complexity 16 of function (*dnsPlugin).publishTransaction() 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!