Preparing report...

Report for github.com/vmware-tanzu/buildkit-cli-for-kubectl

(v0.1.5)

A+    Excellent!    Found 39 issues across 62 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!


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.

    • pkg/build/build.go
    • Line 289: warning: cyclomatic complexity 66 of function toSolveOpt() is high (> 15) (gocyclo)
    • Line 556: warning: cyclomatic complexity 42 of function Build() is high (> 15) (gocyclo)
    • Line 179: warning: cyclomatic complexity 22 of function resolveDrivers() is high (> 15) (gocyclo)
    • Line 806: warning: cyclomatic complexity 18 of function LoadInputs() is high (> 15) (gocyclo)

golint38%

Golint is a linter for Go source code.

    • integration/common/runners.go
    • Line 1: warning: package comment should be of the form "Package common ..." (golint)
    • Line 27: warning: exported function RunBuild should have comment or be unexported (golint)
    • Line 52: warning: exported function RunBuildkit should have comment or be unexported (golint)
    • pkg/driver/kubernetes/authprovider.go
    • Line 1: warning: package comment should be of the form "Package kubernetes ..." (golint)
    • Line 26: warning: exported method Driver.GetAuthProvider should have comment or be unexported (golint)
    • Line 36: warning: exported method Driver.GetAuthHintMessage should have comment or be unexported (golint)
    • pkg/store/nodegroup.go
    • Line 1: warning: package comment should be of the form "Package store ..." (golint)
    • Line 9: warning: exported type Node should have comment or be unexported (golint)
    • pkg/cmd/utils.go
    • Line 1: warning: package comment should be of the form "Package commands ..." (golint)
    • Line 15: warning: exported function ExactArgs should have comment or be unexported (golint)
    • pkg/progress/multiwriter.go
    • Line 12: warning: exported type MultiWriter should have comment or be unexported (golint)
    • Line 19: warning: exported method MultiWriter.WithPrefix should have comment or be unexported (golint)
    • Line 51: warning: exported method MultiWriter.Done should have comment or be unexported (golint)
    • Line 55: warning: exported method MultiWriter.Err should have comment or be unexported (golint)
    • Line 59: warning: exported method MultiWriter.Status should have comment or be unexported (golint)
    • Line 80: warning: exported function NewMultiWriter should have comment or be unexported (golint)
    • pkg/driver/kubernetes/podchooser/podchooser.go
    • Line 1: warning: package comment should be of the form "Package podchooser ..." (golint)
    • Line 20: warning: exported type PodChooser should have comment or be unexported (golint)
    • Line 25: warning: exported type RandomPodChooser should have comment or be unexported (golint)
    • Line 31: warning: exported method RandomPodChooser.ChoosePod should have comment or be unexported (golint)
    • Line 49: warning: exported type StickyPodChooser should have comment or be unexported (golint)
    • Line 55: warning: exported method StickyPodChooser.ChoosePod should have comment or be unexported (golint)
    • Line 94: warning: exported function ListRunningPods should have comment or be unexported (golint)
    • pkg/imagetools/create.go
    • Line 20: warning: exported method Resolver.Combine should have comment or be unexported (golint)
    • Line 147: warning: exported method Resolver.Push should have comment or be unexported (golint)
    • pkg/cmd/ls.go
    • Line 1: warning: package comment should be of the form "Package commands ..." (golint)
    • pkg/cmd/rm.go
    • Line 1: warning: package comment should be of the form "Package commands ..." (golint)
    • pkg/progress/progress.go
    • Line 1: warning: package comment should be of the form "Package progress ..." (golint)
    • Line 13: warning: exported type Logger should have comment or be unexported (golint)
    • Line 15: warning: exported type SubLogger should have comment or be unexported (golint)
    • Line 20: warning: exported function Wrap should have comment or be unexported (golint)
    • pkg/driver/driver.go
    • Line 1: warning: package comment should be of the form "Package driver ..." (golint)
    • Line 28: warning: exported var ErrNotRunning should have comment or be unexported (golint)
    • Line 29: warning: exported var ErrNotConnecting should have comment or be unexported (golint)
    • Line 31: warning: exported type Status should have comment or be unexported (golint)
    • Line 34: warning: exported const Inactive should have comment (or a comment on this block) or be unexported (golint)
    • Line 68: warning: exported type Info should have comment or be unexported (golint)
    • Line 74: warning: exported type Driver should have comment or be unexported (golint)
    • Line 92: warning: exported type Builder should have comment or be unexported (golint)
    • Line 103: warning: exported type Node should have comment or be unexported (golint)
    • Line 109: warning: exported type BuilderClients should have comment or be unexported (golint)
    • Line 116: warning: exported type NodeClient should have comment or be unexported (golint)
    • Line 122: warning: exported function Boot should have comment or be unexported (golint)
    • pkg/progress/writer.go
    • Line 11: warning: exported type Writer should have comment or be unexported (golint)
    • Line 17: warning: exported function Write should have comment or be unexported (golint)
    • pkg/imagetools/inspect.go
    • Line 1: warning: package comment should be of the form "Package imagetools ..." (golint)
    • Line 18: warning: comment on exported type AuthConfig should be of the form "AuthConfig ..." (with optional leading article) (golint)
    • Line 40: warning: exported type Auth should have comment or be unexported (golint)
    • Line 44: warning: exported type Opt should have comment or be unexported (golint)
    • Line 48: warning: exported type Resolver should have comment or be unexported (golint)
    • Line 52: warning: exported function New should have comment or be unexported (golint)
    • Line 62: warning: exported method Resolver.Resolve should have comment or be unexported (golint)
    • Line 76: warning: exported method Resolver.Get should have comment or be unexported (golint)
    • Line 89: warning: exported method Resolver.GetDescriptor should have comment or be unexported (golint)
    • pkg/platformutil/parse.go
    • Line 10: warning: exported function Parse should have comment or be unexported (golint)
    • Line 41: warning: exported function Dedupe should have comment or be unexported (golint)
    • Line 56: warning: exported function FormatInGroups should have comment or be unexported (golint)
    • Line 77: warning: exported function Format should have comment or be unexported (golint)
    • pkg/driver/kubernetes/manifest/manifest.go
    • Line 1: warning: package comment should be of the form "Package manifest ..." (golint)
    • Line 14: warning: exported type DeploymentOpt should have comment or be unexported (golint)
    • Line 32: warning: exported const AnnotationKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 59: warning: exported function NewDeployment should have comment or be unexported (golint)
    • Line 356: warning: exported function NewConfigMap should have comment or be unexported (golint)
    • pkg/build/build.go
    • Line 1: warning: package comment should be of the form "Package build ..." (golint)
    • Line 46: warning: exported type Options should have comment or be unexported (golint)
    • Line 70: warning: exported type Inputs should have comment or be unexported (golint)
    • Line 76: warning: exported type DriverInfo should have comment or be unexported (golint)
    • Line 556: warning: exported function Build should have comment or be unexported (golint)
    • Line 806: warning: exported function LoadInputs should have comment or be unexported (golint)
    • pkg/driver/features.go
    • Line 1: warning: package comment should be of the form "Package driver ..." (golint)
    • Line 5: warning: exported type Feature should have comment or be unexported (golint)
    • Line 7: warning: exported const OCIExporter should have comment or be unexported (golint)
    • Line 8: warning: exported const DockerExporter should have comment or be unexported (golint)
    • Line 9: warning: exported const ContainerdExporter should have comment or be unexported (golint)
    • Line 11: warning: exported const CacheExport should have comment or be unexported (golint)
    • Line 12: warning: exported const MultiPlatform should have comment or be unexported (golint)
    • pkg/driver/manager.go
    • Line 1: warning: package comment should be of the form "Package driver ..." (golint)
    • Line 13: warning: exported type Factory should have comment or be unexported (golint)
    • Line 21: warning: exported type BuildkitConfig should have comment or be unexported (golint)
    • Line 26: warning: exported type InitConfig should have comment or be unexported (golint)
    • Line 40: warning: exported function Register should have comment or be unexported (golint)
    • Line 47: warning: exported function GetDefaultFactory should have comment or be unexported (golint)
    • Line 68: warning: exported function GetFactory should have comment or be unexported (golint)
    • Line 84: warning: exported function GetDriver should have comment or be unexported (golint)
    • Line 103: warning: exported function GetFactories should have comment or be unexported (golint)
    • pkg/progress/printer.go
    • Line 1: warning: package comment should be of the form "Package progress ..." (golint)
    • Line 35: warning: exported function NewPrinter should have comment or be unexported (golint)
    • pkg/driver/kubernetes/driver.go
    • Line 1: warning: package comment should be of the form "Package kubernetes ..." (golint)
    • Line 36: warning: exported const DriverName should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: comment on exported const LoadbalanceRandom should be of the form "LoadbalanceRandom ..." (golint)
    • Line 42: warning: exported const LoadbalanceSticky should have comment (or a comment on this block) or be unexported (golint)
    • Line 44: warning: comment on exported const WorkerContainerd should be of the form "WorkerContainerd ..." (golint)
    • Line 54: warning: comment on exported const DefaultConfigFileTemplate should be of the form "DefaultConfigFileTemplate ..." (golint)
    • Line 62: warning: exported type Driver should have comment or be unexported (golint)
    • Line 83: warning: exported method Driver.Bootstrap should have comment or be unexported (golint)
    • Line 117: warning: exported method Driver.Info should have comment or be unexported (golint)
    • Line 148: warning: exported method Driver.Stop should have comment or be unexported (golint)
    • Line 153: warning: exported method Driver.Rm should have comment or be unexported (golint)
    • Line 164: warning: exported method Driver.Clients should have comment or be unexported (golint)
    • Line 229: warning: exported method Driver.RuntimeSockProxy should have comment or be unexported (golint)
    • Line 270: warning: exported method Driver.GetVersion should have comment or be unexported (golint)
    • Line 319: warning: exported method Driver.List should have comment or be unexported (golint)
    • Line 354: warning: exported method Driver.Factory should have comment or be unexported (golint)
    • Line 367: warning: exported method Driver.Features should have comment or be unexported (golint)
    • Line 392: warning: exported method Driver.GetAuthWrapper should have comment or be unexported (golint)
    • pkg/build/output.go
    • Line 1: warning: package comment should be of the form "Package build ..." (golint)
    • Line 16: warning: exported function ParseOutputs should have comment or be unexported (golint)
    • version/version.go
    • Line 1: warning: package comment should be of the form "Package version ..." (golint)
    • Line 19: warning: exported function GetVersionString should have comment or be unexported (golint)
    • pkg/cmd/root.go
    • Line 1: warning: package comment should be of the form "Package commands ..." (golint)
    • Line 14: warning: exported function NewRootCmd should have comment or be unexported (golint)
    • Line 67: warning: exported function NewRootBuildCmd should have comment or be unexported (golint)
    • integration/common/basesuites.go
    • Line 1: warning: package comment should be of the form "Package common ..." (golint)
    • Line 20: warning: exported type BaseSuite should have comment or be unexported (golint)
    • Line 30: warning: exported method BaseSuite.SetupSuite should have comment or be unexported (golint)
    • Line 48: warning: exported method BaseSuite.TearDownSuite should have comment or be unexported (golint)
    • Line 61: warning: exported method BaseSuite.TestSimpleBuild should have comment or be unexported (golint)
    • Line 101: warning: exported method BaseSuite.TestLocalOutputTarBuild should have comment or be unexported (golint)
    • Line 125: warning: exported method BaseSuite.TestLs should have comment or be unexported (golint)
    • integration/common/kubeclient.go
    • Line 1: warning: package comment should be of the form "Package common ..." (golint)
    • Line 36: warning: exported function RunSimpleBuildImageAsPod should have comment or be unexported (golint)
    • pkg/cmd/create.go
    • Line 1: warning: package comment should be of the form "Package commands ..." (golint)
    • Line 25: warning: exported const DefaultDriver should have comment (or a comment on this block) 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!