Preparing report...

Report for github.com/instana/go-sensor

(v1.41.0)

A+    Excellent!    Found 21 issues across 132 files

Tweet

gofmt90%

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!


gocyclo94%

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.

    • json_span.go
    • Line 306: warning: cyclomatic complexity 30 of function readBoolTag() is high (> 15) (gocyclo)
    • autoprofile/internal/pprof/profile/legacy_profile.go
    • Line 715: warning: cyclomatic complexity 28 of function parseCppContention() is high (> 15) (gocyclo)
    • Line 471: warning: cyclomatic complexity 23 of function parseHeap() is high (> 15) (gocyclo)
    • Line 869: warning: cyclomatic complexity 21 of function parseThread() is high (> 15) (gocyclo)
    • Line 57: warning: cyclomatic complexity 16 of function parseGoCount() is high (> 15) (gocyclo)
    • autoprofile/internal/pprof/profile/profile.go
    • Line 336: warning: cyclomatic complexity 23 of function (*Profile).String() is high (> 15) (gocyclo)
    • Line 231: warning: cyclomatic complexity 21 of function (*Profile).CheckValid() is high (> 15) (gocyclo)
    • Line 293: warning: cyclomatic complexity 20 of function (*Profile).Aggregate() is high (> 15) (gocyclo)
    • propagation.go
    • Line 259: warning: cyclomatic complexity 23 of function parseLevel() is high (> 15) (gocyclo)
    • Line 120: warning: cyclomatic complexity 18 of function extractTraceContext() is high (> 15) (gocyclo)

golint98%

Golint is a linter for Go source code.

    • w3ctrace/version.go
    • Line 17: warning: don't use underscores in Go names; const Version_Invalid should be VersionInvalid (golint)
    • Line 19: warning: don't use underscores in Go names; const Version_0 should be Version0 (golint)
    • Line 21: warning: don't use underscores in Go names; const Version_Max should be VersionMax (golint)
    • fsm.go
    • Line 142: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

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!


misspell99%

Misspell Finds commonly misspelled English words