Preparing report...

Report for go.elastic.co/apm/v2

(v2.0.0-20220125052152-dbce0fc5646c)

A+    Excellent!    Found 12 issues across 143 files

Tweet

gofmt97%

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!


gocyclo93%

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.

    • tracer.go
    • Line 842: warning: cyclomatic complexity 106 of function (*Tracer).loop() is high (> 15) (gocyclo)
    • Line 146: warning: cyclomatic complexity 37 of function (*TracerOptions).initDefaults() is high (> 15) (gocyclo)
    • gofuzz.go
    • Line 43: warning: cyclomatic complexity 33 of function Fuzz() is high (> 15) (gocyclo)
    • model/marshal_fastjson.go
    • Line 600: warning: cyclomatic complexity 28 of function (*Span).MarshalFastJSON() is high (> 15) (gocyclo)
    • Line 1033: warning: cyclomatic complexity 27 of function (*Error).MarshalFastJSON() is high (> 15) (gocyclo)
    • Line 26: warning: cyclomatic complexity 27 of function (*Service).MarshalFastJSON() is high (> 15) (gocyclo)
    • Line 916: warning: cyclomatic complexity 25 of function (*Context).MarshalFastJSON() is high (> 15) (gocyclo)
    • Line 484: warning: cyclomatic complexity 24 of function (*Transaction).MarshalFastJSON() is high (> 15) (gocyclo)
    • Line 678: warning: cyclomatic complexity 21 of function (*SpanContext).MarshalFastJSON() is high (> 15) (gocyclo)
    • Line 1131: warning: cyclomatic complexity 21 of function (*Exception).MarshalFastJSON() is high (> 15) (gocyclo)
    • Line 1202: warning: cyclomatic complexity 19 of function (*StacktraceFrame).MarshalFastJSON() is high (> 15) (gocyclo)
    • Line 1317: warning: cyclomatic complexity 19 of function (*Request).MarshalFastJSON() is high (> 15) (gocyclo)
    • Line 1453: warning: cyclomatic complexity 17 of function (*Metrics).MarshalFastJSON() is high (> 15) (gocyclo)
    • error.go
    • Line 402: warning: cyclomatic complexity 19 of function (*exceptionDataBuilder).init() is high (> 15) (gocyclo)
    • transaction.go
    • Line 44: warning: cyclomatic complexity 16 of function (*Tracer).StartTransactionOptions() is high (> 15) (gocyclo)
    • config.go
    • Line 390: warning: cyclomatic complexity 37 of function (*Tracer).updateRemoteConfig() is high (> 15) (gocyclo)
    • model/marshal.go
    • Line 126: warning: cyclomatic complexity 18 of function (*URL).MarshalFastJSON() is high (> 15) (gocyclo)
    • span.go
    • Line 335: warning: cyclomatic complexity 18 of function (*Span).End() is high (> 15) (gocyclo)
    • Line 67: warning: cyclomatic complexity 16 of function (*Transaction).StartSpanOptions() is high (> 15) (gocyclo)

golint100%

Golint is a linter for Go source code.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


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!