Preparing report...

Report for github.com/jamesTGrant/kubectl-debug

(v0.1.1)

A    Great!    Found 11 issues across 14 files

Tweet

gofmt92%

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!


gocyclo85%

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.

    • pkg/plugin/cmd.go
    • Line 322: warning: cyclomatic complexity 32 of function (*DebugOptions).Run() is high (> 15) (gocyclo)
    • Line 185: warning: cyclomatic complexity 28 of function (*DebugOptions).Complete() is high (> 15) (gocyclo)
    • pkg/util/jsonstream.go
    • Line 230: warning: cyclomatic complexity 19 of function DisplayJSONMessagesStream() is high (> 15) (gocyclo)
    • Line 46: warning: cyclomatic complexity 17 of function (*JSONProgress).String() is high (> 15) (gocyclo)
    • Line 190: warning: cyclomatic complexity 16 of function (*JSONMessage).Display() is high (> 15) (gocyclo)

golint28%

Golint is a linter for Go source code.

    • pkg/agent/resize.go
    • Line 24: warning: comment on exported function HandleResizing should be of the form "HandleResizing ..." (golint)
    • pkg/plugin/config.go
    • Line 9: warning: exported type Config should have comment or be unexported (golint)
    • Line 25: warning: exported function Load should have comment or be unexported (golint)
    • Line 38: warning: exported function LoadFile should have comment or be unexported (golint)
    • pkg/agent/config.go
    • Line 10: warning: exported var DefaultConfig should have comment or be unexported (golint)
    • Line 20: warning: exported type Config should have comment or be unexported (golint)
    • Line 29: warning: exported function Load should have comment or be unexported (golint)
    • Line 43: warning: exported function LoadFile should have comment or be unexported (golint)
    • pkg/agent/runtime.go
    • Line 28: warning: exported function NewRuntimeManager should have comment or be unexported (golint)
    • Line 53: warning: exported method DebugAttacher.AttachContainer should have comment or be unexported (golint)
    • Line 58: warning: context.Context should be the first parameter of a function (golint)
    • Line 71: warning: receiver name m should be consistent with previous receiver name a for DebugAttacher (golint)
    • Line 128: warning: comment on exported method DebugAttacher.RunDebugContainer should be of the form "RunDebugContainer ..." (golint)
    • Line 130: warning: receiver name m should be consistent with previous receiver name a for DebugAttacher (golint)
    • Line 142: warning: exported method DebugAttacher.StartContainer should have comment or be unexported (golint)
    • Line 142: warning: receiver name m should be consistent with previous receiver name a for DebugAttacher (golint)
    • Line 152: warning: exported method DebugAttacher.CreateContainer should have comment or be unexported (golint)
    • Line 152: warning: receiver name m should be consistent with previous receiver name a for DebugAttacher (golint)
    • Line 177: warning: exported method DebugAttacher.PullImage should have comment or be unexported (golint)
    • Line 177: warning: receiver name m should be consistent with previous receiver name a for DebugAttacher (golint)
    • Line 189: warning: exported method DebugAttacher.CleanContainer should have comment or be unexported (golint)
    • Line 189: warning: receiver name m should be consistent with previous receiver name a for DebugAttacher (golint)
    • Line 213: warning: exported method DebugAttacher.RmContainer should have comment or be unexported (golint)
    • Line 213: warning: receiver name m should be consistent with previous receiver name a for DebugAttacher (golint)
    • Line 228: warning: receiver name m should be consistent with previous receiver name a for DebugAttacher (golint)
    • Line 258: warning: receiver name m should be consistent with previous receiver name a for DebugAttacher (golint)
    • Line 286: warning: receiver name m should be consistent with previous receiver name a for DebugAttacher (golint)
    • Line 302: warning: receiver name m should be consistent with previous receiver name a for DebugAttacher (golint)
    • Line 311: warning: receiver name m should be consistent with previous receiver name a for DebugAttacher (golint)
    • Line 315: warning: receiver name m should be consistent with previous receiver name a for DebugAttacher (golint)
    • pkg/agent/server.go
    • Line 20: warning: exported type Server should have comment or be unexported (golint)
    • Line 25: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 33: warning: exported method Server.Run should have comment or be unexported (golint)
    • Line 117: warning: exported method Server.Healthz should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!