Preparing report...

Report for github.com/wrfly/container-web-tty

A+    Excellent!    Found 20 issues across 38 files

Tweet

gofmt89%

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.


golint65%

Golint is a linter for Go source code.

    • container-web-tty/config/config.go
    • Line 5: warning: exported var SHELL_LIST should have comment or be unexported (golint)
    • Line 11: warning: exported type DockerConfig should have comment or be unexported (golint)
    • Line 16: warning: exported type KubeConfig should have comment or be unexported (golint)
    • Line 20: warning: exported type GRPCConfig should have comment or be unexported (golint)
    • Line 26: warning: exported type BackendConfig should have comment or be unexported (golint)
    • Line 33: warning: exported type ControlConfig should have comment or be unexported (golint)
    • Line 41: warning: exported type ServerConfig should have comment or be unexported (golint)
    • Line 67: warning: exported type Config should have comment or be unexported (golint)
    • Line 73: warning: exported function New should have comment or be unexported (golint)
    • container-web-tty/types/types.go
    • Line 34: warning: exported type InitMessage should have comment or be unexported (golint)
    • Line 39: warning: exported type LogOptions should have comment or be unexported (golint)
    • Line 45: warning: exported type ContainerAct should have comment or be unexported (golint)
    • Line 48: warning: exported const EXEC should have comment (or a comment on this block) or be unexported (golint)
    • Line 52: warning: exported type ExecOptions should have comment or be unexported (golint)
    • container-web-tty/container/docker/docker.go
    • Line 20: warning: exported type DockerCli should have comment or be unexported (golint)
    • Line 27: warning: exported function NewCli should have comment or be unexported (golint)
    • Line 142: warning: exported method DockerCli.GetInfo should have comment or be unexported (golint)
    • Line 241: warning: exported method DockerCli.List should have comment or be unexported (golint)
    • Line 264: warning: exported method DockerCli.Start should have comment or be unexported (golint)
    • Line 268: warning: exported method DockerCli.Stop should have comment or be unexported (golint)
    • Line 274: warning: exported method DockerCli.Restart should have comment or be unexported (golint)
    • Line 316: warning: exported method DockerCli.Exec should have comment or be unexported (golint)
    • Line 371: warning: exported method DockerCli.Close should have comment or be unexported (golint)
    • Line 375: warning: exported method DockerCli.Logs should have comment or be unexported (golint)
    • container-web-tty/container/grpc/grpc.go
    • Line 120: warning: exported method GrpcCli.GetInfo should have comment or be unexported (golint)
    • Line 152: warning: exported method GrpcCli.List should have comment or be unexported (golint)
    • Line 216: warning: exported method GrpcCli.Start should have comment or be unexported (golint)
    • Line 220: warning: exported method GrpcCli.Stop should have comment or be unexported (golint)
    • Line 224: warning: exported method GrpcCli.Restart should have comment or be unexported (golint)
    • Line 228: warning: exported method GrpcCli.Exec should have comment or be unexported (golint)
    • Line 261: warning: exported method GrpcCli.Close should have comment or be unexported (golint)
    • Line 270: warning: exported method GrpcCli.Logs should have comment or be unexported (golint)
    • container-web-tty/types/containers.go
    • Line 8: warning: exported type Containers should have comment or be unexported (golint)
    • Line 15: warning: exported method Containers.List should have comment or be unexported (golint)
    • Line 20: warning: exported method Containers.Len should have comment or be unexported (golint)
    • Line 26: warning: exported method Containers.Set should have comment or be unexported (golint)
    • Line 42: warning: exported method Containers.Append should have comment or be unexported (golint)
    • Line 57: warning: exported method Containers.Find should have comment or be unexported (golint)
    • Line 82: warning: exported method Containers.SetShell should have comment or be unexported (golint)
    • container-web-tty/types/tty.go
    • Line 23: warning: exported type SlaveTTY should have comment or be unexported (golint)
    • Line 62: warning: exported method SlaveTTY.Close should have comment or be unexported (golint)
    • Line 67: warning: exported type MasterTTY should have comment or be unexported (golint)
    • Line 99: warning: exported method MasterTTY.Close should have comment or be unexported (golint)
    • Line 104: warning: exported method MasterTTY.Fork should have comment or be unexported (golint)
    • Line 123: warning: exported function NewMasterTTY should have comment or be unexported (golint)
    • container-web-tty/container/kube/kubectl.go
    • Line 25: warning: exported type KubeCli should have comment or be unexported (golint)
    • Line 31: warning: exported function NewCli should have comment or be unexported (golint)
    • Line 69: warning: exported method KubeCli.GetInfo should have comment or be unexported (golint)
    • Line 108: warning: exported method KubeCli.List should have comment or be unexported (golint)
    • Line 225: warning: exported method KubeCli.Start should have comment or be unexported (golint)
    • Line 229: warning: exported method KubeCli.Stop should have comment or be unexported (golint)
    • Line 233: warning: exported method KubeCli.Restart should have comment or be unexported (golint)
    • Line 237: warning: exported method KubeCli.Exec should have comment or be unexported (golint)
    • Line 306: warning: exported method KubeCli.Close should have comment or be unexported (golint)
    • Line 311: warning: exported method KubeCli.Logs should have comment or be unexported (golint)
    • container-web-tty/util/util.go
    • Line 17: warning: comment on exported function ConvertPbContainer should be of the form "ConvertPbContainer ..." (golint)
    • Line 63: warning: exported function HomeDIR should have comment or be unexported (golint)
    • Line 70: warning: exported function DockerCliPath should have comment or be unexported (golint)
    • Line 77: warning: exported function KubeConfigPath should have comment or be unexported (golint)
    • Line 85: warning: exported function EnvVars should have comment or be unexported (golint)
    • Line 90: warning: exported function WaitSignals should have comment or be unexported (golint)
    • container-web-tty/route/asset/asset.go
    • Line 28: warning: don't use underscores in Go names; var _compress_bytes_0 should be _compressBytes0 (golint)
    • Line 30: warning: don't use underscores in Go names; var _file_0 should be _file0 (golint)
    • Line 46: warning: don't use underscores in Go names; var _compress_bytes_1 should be _compressBytes1 (golint)
    • Line 48: warning: don't use underscores in Go names; var _file_1 should be _file1 (golint)
    • Line 64: warning: don't use underscores in Go names; var _compress_bytes_2 should be _compressBytes2 (golint)
    • Line 73: warning: don't use underscores in Go names; var _file_2 should be _file2 (golint)
    • Line 89: warning: don't use underscores in Go names; var _compress_bytes_3 should be _compressBytes3 (golint)
    • Line 155: warning: don't use underscores in Go names; var _file_3 should be _file3 (golint)
    • Line 171: warning: don't use underscores in Go names; var _compress_bytes_4 should be _compressBytes4 (golint)
    • Line 291: warning: don't use underscores in Go names; var _file_4 should be _file4 (golint)
    • Line 307: warning: don't use underscores in Go names; var _compress_bytes_5 should be _compressBytes5 (golint)
    • Line 329: warning: don't use underscores in Go names; var _file_5 should be _file5 (golint)
    • Line 345: warning: don't use underscores in Go names; var _compress_bytes_6 should be _compressBytes6 (golint)
    • Line 406: warning: don't use underscores in Go names; var _file_6 should be _file6 (golint)
    • Line 422: warning: don't use underscores in Go names; var _compress_bytes_7 should be _compressBytes7 (golint)
    • Line 445: warning: don't use underscores in Go names; var _file_7 should be _file7 (golint)
    • Line 461: warning: don't use underscores in Go names; var _compress_bytes_8 should be _compressBytes8 (golint)
    • Line 463: warning: don't use underscores in Go names; var _file_8 should be _file8 (golint)
    • Line 479: warning: don't use underscores in Go names; var _compress_bytes_9 should be _compressBytes9 (golint)
    • Line 510: warning: don't use underscores in Go names; var _file_9 should be _file9 (golint)
    • Line 526: warning: don't use underscores in Go names; var _compress_bytes_10 should be _compressBytes10 (golint)
    • Line 9690: warning: don't use underscores in Go names; var _file_10 should be _file10 (golint)
    • Line 9706: warning: don't use underscores in Go names; var _compress_bytes_11 should be _compressBytes11 (golint)
    • Line 9759: warning: don't use underscores in Go names; var _file_11 should be _file11 (golint)

ineffassign78%

IneffAssign detects ineffectual assignments in Go code.

    • container-web-tty/proxy/server.go
    • Line 25: warning: ContainerServerServer not declared by package grpc (ineffassign)
    • Line 39: warning: Container not declared by package grpc (ineffassign)
    • Line 54: warning: Empty not declared by package grpc (ineffassign)
    • Line 54: warning: Pong not declared by package grpc (ineffassign)
    • Line 67: warning: ContainerID not declared by package grpc (ineffassign)
    • Line 67: warning: Container not declared by package grpc (ineffassign)
    • Line 81: warning: Empty not declared by package grpc (ineffassign)
    • Line 81: warning: Containers not declared by package grpc (ineffassign)
    • Line 95: warning: ContainerID not declared by package grpc (ineffassign)
    • Line 95: warning: Err not declared by package grpc (ineffassign)
    • Line 114: warning: ContainerID not declared by package grpc (ineffassign)
    • Line 114: warning: Err not declared by package grpc (ineffassign)
    • Line 133: warning: ContainerID not declared by package grpc (ineffassign)
    • Line 133: warning: Err not declared by package grpc (ineffassign)
    • Line 152: warning: ContainerServer_ExecServer not declared by package grpc (ineffassign)
    • Line 236: warning: LogOpts not declared by package grpc (ineffassign)
    • Line 236: warning: ContainerServer_LogsServer not declared by package grpc (ineffassign)
    • Line 40: warning: Container not declared by package grpc (ineffassign)
    • Line 62: warning: Pong not declared by package grpc (ineffassign)
    • Line 90: warning: Containers not declared by package grpc (ineffassign)
    • Line 109: warning: Err not declared by package grpc (ineffassign)
    • Line 128: warning: Err not declared by package grpc (ineffassign)
    • Line 147: warning: Err not declared by package grpc (ineffassign)
    • Line 215: warning: ExecOptions not declared by package grpc (ineffassign)
    • Line 216: warning: Io not declared by package grpc (ineffassign)
    • Line 265: warning: Io not declared by package grpc (ineffassign)
    • container-web-tty/route/asset/asset.go
    • Line 30: warning: undeclared name: file (ineffassign)
    • Line 31: warning: undeclared name: fileInfo (ineffassign)
    • Line 48: warning: undeclared name: file (ineffassign)
    • Line 49: warning: undeclared name: fileInfo (ineffassign)
    • Line 73: warning: undeclared name: file (ineffassign)
    • Line 74: warning: undeclared name: fileInfo (ineffassign)
    • Line 155: warning: undeclared name: file (ineffassign)
    • Line 156: warning: undeclared name: fileInfo (ineffassign)
    • Line 291: warning: undeclared name: file (ineffassign)
    • Line 292: warning: undeclared name: fileInfo (ineffassign)
    • Line 329: warning: undeclared name: file (ineffassign)
    • Line 330: warning: undeclared name: fileInfo (ineffassign)
    • Line 406: warning: undeclared name: file (ineffassign)
    • Line 407: warning: undeclared name: fileInfo (ineffassign)
    • Line 445: warning: undeclared name: file (ineffassign)
    • Line 446: warning: undeclared name: fileInfo (ineffassign)
    • Line 463: warning: undeclared name: file (ineffassign)
    • Line 464: warning: undeclared name: fileInfo (ineffassign)
    • Line 510: warning: undeclared name: file (ineffassign)
    • Line 511: warning: undeclared name: fileInfo (ineffassign)
    • Line 9690: warning: undeclared name: file (ineffassign)
    • Line 9691: warning: undeclared name: fileInfo (ineffassign)
    • Line 9759: warning: undeclared name: file (ineffassign)
    • Line 9760: warning: undeclared name: fileInfo (ineffassign)
    • Line 9776: warning: undeclared name: file (ineffassign)
    • Line 9776: warning: undeclared name: fs (ineffassign)
    • Line 9782: warning: undeclared name: data (ineffassign)
    • Line 9784: warning: undeclared name: file (ineffassign)
    • Line 9784: warning: undeclared name: fs (ineffassign)
    • Line 9782: warning: undeclared name: root (ineffassign)
    • Line 30: warning: undeclared name: file (ineffassign)
    • Line 31: warning: undeclared name: fileInfo (ineffassign)
    • Line 48: warning: undeclared name: file (ineffassign)
    • Line 49: warning: undeclared name: fileInfo (ineffassign)
    • Line 73: warning: undeclared name: file (ineffassign)
    • Line 74: warning: undeclared name: fileInfo (ineffassign)
    • Line 155: warning: undeclared name: file (ineffassign)
    • Line 156: warning: undeclared name: fileInfo (ineffassign)
    • Line 291: warning: undeclared name: file (ineffassign)
    • Line 292: warning: undeclared name: fileInfo (ineffassign)
    • Line 329: warning: undeclared name: file (ineffassign)
    • Line 330: warning: undeclared name: fileInfo (ineffassign)
    • Line 406: warning: undeclared name: file (ineffassign)
    • Line 407: warning: undeclared name: fileInfo (ineffassign)
    • Line 445: warning: undeclared name: file (ineffassign)
    • Line 446: warning: undeclared name: fileInfo (ineffassign)
    • Line 463: warning: undeclared name: file (ineffassign)
    • Line 464: warning: undeclared name: fileInfo (ineffassign)
    • Line 510: warning: undeclared name: file (ineffassign)
    • Line 511: warning: undeclared name: fileInfo (ineffassign)
    • Line 9690: warning: undeclared name: file (ineffassign)
    • Line 9691: warning: undeclared name: fileInfo (ineffassign)
    • Line 9759: warning: undeclared name: file (ineffassign)
    • Line 9760: warning: undeclared name: fileInfo (ineffassign)
    • container-web-tty/util/util.go
    • Line 13: warning: no required module provides package github.com/wrfly/container-web-tty/proxy/pb; to add it: (ineffassign)
    • Line 13: warning: could not import github.com/wrfly/container-web-tty/proxy/pb (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/wrfly/container-web-tty/proxy/pb (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/wrfly/container-web-tty/proxy/pb (invalid package name: "") (ineffassign)
    • container-web-tty/container/grpc/grpc.go
    • Line 13: warning: no required module provides package github.com/wrfly/container-web-tty/proxy/pb; to add it: (ineffassign)
    • Line 13: warning: could not import github.com/wrfly/container-web-tty/proxy/pb (invalid package name: "") (ineffassign)
    • Line 13: warning: no required module provides package github.com/wrfly/container-web-tty/proxy/pb; to add it: (ineffassign)
    • Line 13: warning: could not import github.com/wrfly/container-web-tty/proxy/pb (invalid package name: "") (ineffassign)
    • Line 13: warning: no required module provides package github.com/wrfly/container-web-tty/proxy/pb; to add it: (ineffassign)
    • Line 13: warning: could not import github.com/wrfly/container-web-tty/proxy/pb (invalid package name: "") (ineffassign)
    • container-web-tty/proxy/proxy.go
    • Line 12: warning: could not import github.com/wrfly/container-web-tty/proxy/pb (invalid package name: "") (ineffassign)
    • Line 45: warning: RegisterContainerServerServer not declared by package grpc (ineffassign)
    • /home/shawn/mygo/src/github.com/gojp/goreportcard/_repos/src/github.com/wrfly/container-web-tty/container/grpc/grpc.go
    • Line 13: warning: no required module provides package github.com/wrfly/container-web-tty/proxy/pb; to add it: (ineffassign)
    • Line 4: warning: could not import context (no metadata for context) (ineffassign)
    • Line 5: warning: could not import fmt (no metadata for fmt) (ineffassign)
    • Line 6: warning: could not import io (no metadata for io) (ineffassign)
    • Line 8: warning: could not import github.com/sirupsen/logrus (no metadata for github.com/sirupsen/logrus) (ineffassign)
    • Line 9: warning: could not import google.golang.org/grpc (no metadata for google.golang.org/grpc) (ineffassign)
    • Line 10: warning: could not import google.golang.org/grpc/connectivity (no metadata for google.golang.org/grpc/connectivity) (ineffassign)
    • Line 12: warning: could not import github.com/wrfly/container-web-tty/config (no metadata for github.com/wrfly/container-web-tty/config) (ineffassign)
    • Line 13: warning: could not import github.com/wrfly/container-web-tty/proxy/pb (no metadata for github.com/wrfly/container-web-tty/proxy/pb) (ineffassign)
    • Line 14: warning: could not import github.com/wrfly/container-web-tty/types (no metadata for github.com/wrfly/container-web-tty/types) (ineffassign)
    • Line 15: warning: could not import github.com/wrfly/container-web-tty/util (no metadata for github.com/wrfly/container-web-tty/util) (ineffassign)
    • Line 22: warning: ContainerServerClient not declared by package grpc (ineffassign)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell97%

Misspell Finds commonly misspelled English words