Preparing report...

Report for github.com/d4l3k/go-pry

A+    Excellent!    Found 28 issues across 43 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!


gocyclo83%

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.

    • go-pry/pry/interpreter.go
    • Line 210: warning: cyclomatic complexity 233 of function (*Scope).Interpret() is high (> 15) (gocyclo)
    • Line 1093: warning: cyclomatic complexity 21 of function (*Scope).ExecuteFunc() is high (> 15) (gocyclo)
    • go-pry/generate/generate.go
    • Line 176: warning: cyclomatic complexity 25 of function (*Generator).GetExports() is high (> 15) (gocyclo)
    • Line 59: warning: cyclomatic complexity 23 of function (*Generator).InjectPry() is high (> 15) (gocyclo)
    • Line 423: warning: cyclomatic complexity 19 of function (*Generator).handleExpr() is high (> 15) (gocyclo)
    • go-pry/pry/pseudo_generics.go
    • Line 51: warning: cyclomatic complexity 267 of function ComputeBinaryOp() is high (> 15) (gocyclo)
    • Line 734: warning: cyclomatic complexity 56 of function (*Scope).ComputeUnaryOp() is high (> 15) (gocyclo)

golint76%

Golint is a linter for Go source code.

    • go-pry/example/file/file.go
    • Line 15: warning: exported function X should have comment or be unexported (golint)
    • Line 19: warning: exported type Banana should have comment or be unexported (golint)
    • Line 24: warning: exported method Banana.Ly should have comment or be unexported (golint)
    • go-pry/pry/interpreter.go
    • Line 52: warning: exported type Defer should have comment or be unexported (golint)
    • Line 58: warning: exported method Scope.Defer should have comment or be unexported (golint)
    • Line 1093: warning: exported method Scope.ExecuteFunc should have comment or be unexported (golint)
    • go-pry/main.go
    • Line 23: warning: should omit values from range; this loop is equivalent to `for range ...` (golint)
    • go-pry/generate/generate.go
    • Line 23: warning: exported type Generator should have comment or be unexported (golint)
    • Line 29: warning: exported function NewGenerator should have comment or be unexported (golint)
    • go-pry/pry/package.go
    • Line 9: warning: exported method Package.Keys should have comment or be unexported (golint)
    • Line 17: warning: exported method Package.Get should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign55%

IneffAssign detects ineffectual assignments in Go code.

    • go-pry/playground/genmeta/genmeta.go
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: could not import github.com/d4l3k/go-pry/pry (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/davecgh/go-spew/spew (invalid package name: "") (ineffassign)
    • go-pry/main.go
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: could not import github.com/d4l3k/go-pry/generate (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/d4l3k/go-pry/generate (invalid package name: "") (ineffassign)
    • go-pry/generate/generate.go
    • Line 19: warning: cannot find package "." in: (ineffassign)
    • Line 19: warning: could not import github.com/d4l3k/go-pry/pry (invalid package name: "") (ineffassign)
    • Line 16: warning: "reflect" imported but not used (ineffassign)
    • Line 19: warning: could not import github.com/d4l3k/go-pry/pry (invalid package name: "") (ineffassign)
    • Line 16: warning: "reflect" imported but not used (ineffassign)
    • go-pry/pry/tty_unix.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/mattn/go-tty (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/mattn/go-tty (invalid package name: "") (ineffassign)
    • go-pry/pry/pry_test.go
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 16: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: could not import github.com/cenkalti/backoff (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import github.com/d4l3k/go-pry/pry/safebuffer (invalid package name: "") (ineffassign)
    • go-pry/playground/server/server.go
    • Line 16: warning: cannot find package "." in: (ineffassign)
    • Line 17: warning: cannot find package "." in: (ineffassign)
    • Line 18: warning: cannot find package "." in: (ineffassign)
    • Line 16: warning: could not import github.com/d4l3k/go-pry/generate (invalid package name: "") (ineffassign)
    • Line 17: warning: could not import github.com/gorilla/handlers (invalid package name: "") (ineffassign)
    • Line 18: warning: could not import github.com/gorilla/mux (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import github.com/d4l3k/go-pry/generate (invalid package name: "") (ineffassign)
    • Line 17: warning: could not import github.com/gorilla/handlers (invalid package name: "") (ineffassign)
    • Line 18: warning: could not import github.com/gorilla/mux (invalid package name: "") (ineffassign)
    • go-pry/pry/highlighter.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/mgutz/ansi (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import github.com/mgutz/ansi (invalid package name: "") (ineffassign)
    • go-pry/pry/io_default.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: could not import github.com/mitchellh/go-homedir (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/mitchellh/go-homedir (invalid package name: "") (ineffassign)

misspell95%

Misspell Finds commonly misspelled English words