Preparing report...

Report for github.com/kubeoperator/webkubectl

A+    Excellent!    Found 16 issues across 35 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


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!


gocyclo91%

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.

    • webkubectl/gotty/webtty/webtty.go
    • Line 69: warning: cyclomatic complexity 19 of function (*WebTTY).Run() is high (> 15) (gocyclo)
    • Line 201: warning: cyclomatic complexity 16 of function (*WebTTY).handleMasterReadEvent() is high (> 15) (gocyclo)

golint60%

Golint is a linter for Go source code.

    • webkubectl/gotty/version.go
    • Line 3: warning: exported var Version should have comment or be unexported (golint)
    • Line 4: warning: exported var CommitID should have comment or be unexported (golint)
    • webkubectl/gotty/utils/default.go
    • Line 10: warning: exported function ApplyDefaultValues should have comment or be unexported (golint)
    • Line 10: warning: don't use underscores in Go names; func parameter struct_ should be struct (golint)
    • webkubectl/gotty/backend/localcommand/local_command.go
    • Line 15: warning: exported const DefaultCloseSignal should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type LocalCommand should have comment or be unexported (golint)
    • Line 31: warning: exported function New should have comment or be unexported (golint)
    • Line 79: warning: exported method LocalCommand.Close should have comment or be unexported (golint)
    • Line 93: warning: exported method LocalCommand.WindowTitleVariables should have comment or be unexported (golint)
    • Line 101: warning: exported method LocalCommand.ResizeTerminal should have comment or be unexported (golint)
    • Line 121: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • webkubectl/gotty/webtty/message_types.go
    • Line 8: warning: comment on exported const UnknownInput should be of the form "UnknownInput ..." (golint)
    • Line 10: warning: comment on exported const Input should be of the form "Input ..." (golint)
    • Line 14: warning: comment on exported const ResizeTerminal should be of the form "ResizeTerminal ..." (golint)
    • Line 19: warning: comment on exported const UnknownOutput should be of the form "UnknownOutput ..." (golint)
    • Line 21: warning: comment on exported const Output should be of the form "Output ..." (golint)
    • Line 25: warning: comment on exported const SetWindowTitle should be of the form "SetWindowTitle ..." (golint)
    • Line 27: warning: comment on exported const SetPreferences should be of the form "SetPreferences ..." (golint)
    • Line 29: warning: comment on exported const SetReconnect should be of the form "SetReconnect ..." (golint)
    • webkubectl/gotty/utils/flags.go
    • Line 11: warning: exported function GenerateFlags should have comment or be unexported (golint)
    • Line 14: warning: don't use underscores in Go names; range var struct_ should be struct (golint)
    • Line 59: warning: exported function ApplyFlags should have comment or be unexported (golint)
    • Line 66: warning: don't use underscores in Go names; range var struct_ should be struct (golint)
    • webkubectl/gotty/server/api_structs.go
    • Line 3: warning: exported type ApiResponse should have comment or be unexported (golint)
    • Line 9: warning: exported type KubeConfigRequest should have comment or be unexported (golint)
    • Line 14: warning: exported type KubeTokenRequest should have comment or be unexported (golint)
    • webkubectl/gotty/server/options.go
    • Line 10: warning: exported type Options should have comment or be unexported (golint)
    • Line 41: warning: exported method Options.Validate should have comment or be unexported (golint)
    • Line 48: warning: exported type HtermPrefernces should have comment or be unexported (golint)
    • Line 147: warning: exported method RedisOptions.Validate 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!