Preparing report...

Report for github.com/divan/gotrace

A+    Excellent!    Found 24 issues across 28 files

Tweet

gofmt96%

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!


gocyclo89%

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.

    • gotrace/trace/parser.go
    • Line 358: warning: cyclomatic complexity 60 of function postProcessTrace() is high (> 15) (gocyclo)
    • Line 153: warning: cyclomatic complexity 39 of function parseEvents() is high (> 15) (gocyclo)

golint71%

Golint is a linter for Go source code.

    • gotrace/trace/parser.go
    • Line 53: warning: comment on exported const FakeP should be of the form "FakeP ..." (golint)
    • Line 55: warning: exported const TimerP should have comment (or a comment on this block) or be unexported (golint)
    • Line 583: warning: comment on exported function Symbolize should be of the form "Symbolize ..." (golint)
    • Line 746: warning: exported var EventDescriptions should have comment or be unexported (golint)
    • gotrace/commands.go
    • Line 8: warning: exported type Commands should have comment or be unexported (golint)
    • Line 13: warning: exported function NewCommands should have comment or be unexported (golint)
    • Line 20: warning: exported const CmdCreate should have comment (or a comment on this block) or be unexported (golint)
    • Line 55: warning: exported method Commands.StartGoroutine should have comment or be unexported (golint)
    • Line 80: warning: exported method Commands.StopGoroutine should have comment or be unexported (golint)
    • Line 89: warning: exported method Commands.ChanSend should have comment or be unexported (golint)
    • Line 89: warning: don't use underscores in Go names; method parameter send_ts should be sendTs (golint)
    • Line 89: warning: don't use underscores in Go names; method parameter recv_ts should be recvTs (golint)
    • Line 102: warning: exported method Commands.BlockGoroutine should have comment or be unexported (golint)
    • Line 111: warning: exported method Commands.UnblockGoroutine should have comment or be unexported (golint)
    • Line 120: warning: exported method Commands.SleepGoroutine should have comment or be unexported (golint)
    • gotrace/rewrite.go
    • Line 17: warning: exported var ErrImported should have comment or be unexported (golint)
    • Line 59: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign32%

IneffAssign detects ineffectual assignments in Go code.

    • gotrace/examples/workers1.go
    • Line 11: warning: worker redeclared in this block (ineffassign)
    • Line 23: warning: pool redeclared in this block (ineffassign)
    • Line 39: warning: main redeclared in this block (ineffassign)
    • Line 28: warning: cannot use wg (variable of type *sync.WaitGroup) as chan int value in argument to worker (ineffassign)
    • Line 43: warning: cannot use &wg (value of type *sync.WaitGroup) as chan int value in argument to pool (ineffassign)
    • Line 43: warning: too many arguments (ineffassign)
    • gotrace/web.go
    • Line 29: warning: undeclared name: Asset (ineffassign)
    • Line 64: warning: undeclared name: assetFS (ineffassign)
    • Line 29: warning: undeclared name: Asset (ineffassign)
    • Line 64: warning: undeclared name: assetFS (ineffassign)
    • gotrace/examples/serverworker.go
    • Line 11: warning: handler redeclared in this block (ineffassign)
    • Line 46: warning: server redeclared in this block (ineffassign)
    • Line 56: warning: main redeclared in this block (ineffassign)
    • Line 18: warning: other declaration of worker (ineffassign)
    • Line 32: warning: other declaration of pool (ineffassign)
    • Line 18: warning: other declaration of worker (ineffassign)
    • Line 52: warning: too many arguments (ineffassign)
    • gotrace/examples/workers2.go
    • Line 30: warning: worker redeclared in this block (ineffassign)
    • Line 54: warning: main redeclared in this block (ineffassign)
    • Line 62: warning: cannot use &wg (value of type *sync.WaitGroup) as chan int value in argument to worker (ineffassign)
    • gotrace/examples/block.go
    • Line 11: warning: other declaration of main (ineffassign)
    • Line 11: warning: other declaration of main (ineffassign)
    • Line 11: warning: other declaration of main (ineffassign)
    • Line 11: warning: other declaration of main (ineffassign)
    • Line 11: warning: other declaration of main (ineffassign)
    • Line 11: warning: other declaration of main (ineffassign)
    • Line 11: warning: other declaration of main (ineffassign)
    • Line 11: warning: other declaration of main (ineffassign)
    • Line 11: warning: other declaration of main (ineffassign)
    • Line 11: warning: other declaration of main (ineffassign)
    • Line 11: warning: other declaration of main (ineffassign)
    • Line 11: warning: other declaration of main (ineffassign)
    • Line 11: warning: other declaration of main (ineffassign)
    • Line 11: warning: other declaration of main (ineffassign)
    • Line 11: warning: other declaration of main (ineffassign)
    • Line 11: warning: other declaration of main (ineffassign)
    • gotrace/convert.go
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: could not import github.com/divan/gotrace/trace (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/divan/gotrace/trace (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!