Preparing report...

Report for github.com/vmware-tanzu/crash-diagnostics

A+    Excellent!    Found 31 issues across 99 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!


golint78%

Golint is a linter for Go source code.

    • crash-diagnostics/k8s/search_params.go
    • Line 12: warning: exported type SearchParams should have comment or be unexported (golint)
    • Line 23: warning: exported method SearchParams.ContainsGroup should have comment or be unexported (golint)
    • Line 27: warning: exported method SearchParams.ContainsVersion should have comment or be unexported (golint)
    • Line 31: warning: exported method SearchParams.ContainsKind should have comment or be unexported (golint)
    • Line 35: warning: exported method SearchParams.ContainsContainer should have comment or be unexported (golint)
    • Line 39: warning: exported method SearchParams.ContainsName should have comment or be unexported (golint)
    • Line 56: warning: comment on exported function NewSearchParams should be of the form "NewSearchParams ..." (golint)
    • crash-diagnostics/testing/sshserver.go
    • Line 15: warning: exported type SSHServer should have comment or be unexported (golint)
    • Line 23: warning: exported function NewSSHServer should have comment or be unexported (golint)
    • Line 33: warning: comment on exported method SSHServer.Start should be of the form "Start ..." (golint)
    • Line 77: warning: exported method SSHServer.Stop should have comment or be unexported (golint)
    • Line 111: warning: exported method SSHServer.MountedDir should have comment or be unexported (golint)
    • Line 115: warning: exported method SSHServer.PrivateKey should have comment or be unexported (golint)
    • crash-diagnostics/testing/key.go
    • Line 96: warning: exported function AddKeyToAgent should have comment or be unexported (golint)
    • Line 134: warning: exported function RemoveKeyFromAgent should have comment or be unexported (golint)
    • Line 149: warning: exported function WriteKeys should have comment or be unexported (golint)
    • crash-diagnostics/testing/kindcluster.go
    • Line 20: warning: exported type KindCluster should have comment or be unexported (golint)
    • Line 26: warning: exported function NewKindCluster should have comment or be unexported (golint)
    • Line 30: warning: exported method KindCluster.Create should have comment or be unexported (golint)
    • Line 55: warning: exported method KindCluster.GetKubeConfig should have comment or be unexported (golint)
    • Line 64: warning: exported method KindCluster.MakeKubeConfigFile should have comment or be unexported (golint)
    • Line 82: warning: exported method KindCluster.GetKubeCtlContext should have comment or be unexported (golint)
    • Line 86: warning: exported method KindCluster.Destroy should have comment or be unexported (golint)
    • crash-diagnostics/k8s/cluster.go
    • Line 13: warning: exported type Config should have comment or be unexported (golint)
    • Line 18: warning: exported type KubeConfig should have comment or be unexported (golint)
    • Line 22: warning: exported method KubeConfig.GetClusterName should have comment or be unexported (golint)
    • Line 26: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 31: warning: exported method KubeConfig.GetCurrentContext should have comment or be unexported (golint)
    • Line 35: warning: exported function LoadKubeCfg should have comment or be unexported (golint)
    • crash-diagnostics/cmd/defaults.go
    • Line 9: warning: comment on exported var CrashdDir should be of the form "CrashdDir ..." (golint)
    • Line 11: warning: comment on exported var ArgsFile should be of the form "ArgsFile ..." (golint)
    • Line 15: warning: comment on exported function CreateCrashdDir should be of the form "CreateCrashdDir ..." (golint)
    • crash-diagnostics/k8s/result_writer.go
    • Line 12: warning: exported type ResultWriter should have comment or be unexported (golint)
    • Line 18: warning: exported function NewResultWriter should have comment or be unexported (golint)
    • Line 33: warning: exported method ResultWriter.GetResultDir should have comment or be unexported (golint)
    • crash-diagnostics/exec/executor.go
    • Line 14: warning: exported type ArgMap should have comment or be unexported (golint)
    • Line 16: warning: exported function Execute should have comment or be unexported (golint)
    • Line 36: warning: exported function ExecuteFile should have comment or be unexported (golint)
    • crash-diagnostics/testing/setup.go
    • Line 19: warning: exported var InfraSetupWait should have comment or be unexported (golint)
    • Line 23: warning: exported type TestSupport should have comment or be unexported (golint)
    • Line 116: warning: exported method TestSupport.WorkDirRoot should have comment or be unexported (golint)
    • Line 120: warning: exported method TestSupport.TmpDirRoot should have comment or be unexported (golint)
    • Line 124: warning: exported method TestSupport.PrivateKeyPath should have comment or be unexported (golint)
    • Line 128: warning: exported method TestSupport.MaxConnectionRetries should have comment or be unexported (golint)
    • Line 132: warning: exported method TestSupport.SetupSSHServer should have comment or be unexported (golint)
    • Line 159: warning: exported method TestSupport.SetupKindCluster should have comment or be unexported (golint)
    • Line 182: warning: exported method TestSupport.SetupKindKubeConfig should have comment or be unexported (golint)
    • Line 199: warning: exported method TestSupport.KindKubeConfigFile should have comment or be unexported (golint)
    • Line 203: warning: exported method TestSupport.TearDown should have comment or be unexported (golint)
    • crash-diagnostics/k8s/client.go
    • Line 24: warning: exported const LegacyGroupName should have comment (or a comment on this block) or be unexported (golint)
    • Line 70: warning: exported method Client.Search should have comment or be unexported (golint)
    • crash-diagnostics/k8s/container_logger.go
    • Line 17: warning: exported type ContainerLogsImpl should have comment or be unexported (golint)
    • Line 23: warning: exported function NewContainerLogger should have comment or be unexported (golint)
    • Line 31: warning: exported method ContainerLogsImpl.Fetch should have comment or be unexported (golint)

gocyclo88%

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.


ineffassign0%

IneffAssign detects ineffectual assignments in Go code.

An error occurred while running this test (exit status 2)


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!