Preparing report...

Report for kubepack.dev/kubepack

A+    Excellent!    Found 58 issues across 126 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!


gocyclo92%

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.

    • /kubepack.dev/kubepack/pkg/lib/executors.go
    • Line 588: warning: cyclomatic complexity 42 of function (*YAMLPrinter).Do() is high (> 15) (gocyclo)
    • Line 821: warning: cyclomatic complexity 26 of function (*PermissionChecker).Do() is high (> 15) (gocyclo)
    • Line 460: warning: cyclomatic complexity 25 of function (*Helm2CommandPrinter).Do() is high (> 15) (gocyclo)
    • Line 336: warning: cyclomatic complexity 25 of function (*Helm3CommandPrinter).Do() is high (> 15) (gocyclo)
    • Line 1102: warning: cyclomatic complexity 20 of function (*ApplicationGenerator).Do() is high (> 15) (gocyclo)

golint57%

Golint is a linter for Go source code.

    • /kubepack.dev/kubepack/pkg/server/server.go
    • Line 40: warning: exported var Scheme should have comment or be unexported (golint)
    • Line 62: warning: exported type KubepackOperatorConfig should have comment or be unexported (golint)
    • Line 73: warning: exported method KubepackOperator.Run should have comment or be unexported (golint)
    • Line 83: warning: exported type CompletedConfig should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/crds/lib.go
    • Line 38: warning: exported function CustomResourceDefinition should have comment or be unexported (golint)
    • Line 58: warning: exported function MustCustomResourceDefinition should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/pkg/cmds/server/options.go
    • Line 35: warning: exported type ExtraOptions should have comment or be unexported (golint)
    • Line 46: warning: exported function NewExtraOptions should have comment or be unexported (golint)
    • Line 57: warning: exported method ExtraOptions.AddGoFlags should have comment or be unexported (golint)
    • Line 70: warning: exported method ExtraOptions.AddFlags should have comment or be unexported (golint)
    • Line 76: warning: exported method ExtraOptions.ApplyTo should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/pkg/controller/controller.go
    • Line 45: warning: exported type KubepackController should have comment or be unexported (golint)
    • Line 77: warning: exported method KubepackController.Run should have comment or be unexported (golint)
    • Line 92: warning: exported method KubepackController.RunInformers should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/apis/kubepack/v1alpha1/bundle_ui_types.go
    • Line 23: warning: comment on exported type BundleView should be of the form "BundleView ..." (with optional leading article) (golint)
    • Line 30: warning: exported type BundleOptionView should have comment or be unexported (golint)
    • Line 37: warning: exported type PackageCard should have comment or be unexported (golint)
    • Line 43: warning: exported type OneOfBundleOptionView should have comment or be unexported (golint)
    • Line 48: warning: exported type ChartCard should have comment or be unexported (golint)
    • Line 59: warning: exported type FeatureTable should have comment or be unexported (golint)
    • Line 64: warning: exported type Row should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/apis/kubepack/v1alpha1/product_helpers.go
    • Line 29: warning: exported method Product.CustomResourceDefinition should have comment or be unexported (golint)
    • Line 29: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 33: warning: exported method Product.SetLabels should have comment or be unexported (golint)
    • Line 43: warning: exported method Product.FormatLabels should have comment or be unexported (golint)
    • Line 43: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • /kubepack.dev/kubepack/apis/kubepack/v1alpha1/plan_helpers.go
    • Line 27: warning: exported method Plan.CustomResourceDefinition should have comment or be unexported (golint)
    • Line 27: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 31: warning: exported method Plan.SetLabels should have comment or be unexported (golint)
    • Line 41: warning: exported method Plan.FormatLabels should have comment or be unexported (golint)
    • Line 41: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • /kubepack.dev/kubepack/pkg/cmds/server/start.go
    • Line 36: warning: exported type AppOptions should have comment or be unexported (golint)
    • Line 44: warning: exported function NewAppOptions should have comment or be unexported (golint)
    • Line 61: warning: exported method AppOptions.AddFlags should have comment or be unexported (golint)
    • Line 66: warning: exported method AppOptions.Validate should have comment or be unexported (golint)
    • Line 70: warning: exported method AppOptions.Complete should have comment or be unexported (golint)
    • Line 74: warning: exported method AppOptions.Config should have comment or be unexported (golint)
    • Line 100: warning: exported method AppOptions.Run should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/apis/constants.go
    • Line 20: warning: exported const BundleRepoURL should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported const LabelPlanName should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: exported const LabelChartURL should have comment (or a comment on this block) or be unexported (golint)
    • Line 46: warning: exported const YAMLHost should have comment (or a comment on this block) or be unexported (golint)
    • /kubepack.dev/kubepack/pkg/lib/executors.go
    • Line 43: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 78: warning: exported type DoFn should have comment or be unexported (golint)
    • Line 80: warning: exported type NamespacePrinter should have comment or be unexported (golint)
    • Line 85: warning: exported method NamespacePrinter.Do should have comment or be unexported (golint)
    • Line 94: warning: exported type NamespaceCreator should have comment or be unexported (golint)
    • Line 99: warning: exported method NamespaceCreator.Do should have comment or be unexported (golint)
    • Line 111: warning: exported type WaitForPrinter should have comment or be unexported (golint)
    • Line 118: warning: exported method WaitForPrinter.Do should have comment or be unexported (golint)
    • Line 179: warning: exported type WaitForChecker should have comment or be unexported (golint)
    • Line 186: warning: exported method WaitForChecker.Do should have comment or be unexported (golint)
    • Line 264: warning: exported type CRDReadinessPrinter should have comment or be unexported (golint)
    • Line 269: warning: exported method CRDReadinessPrinter.Do should have comment or be unexported (golint)
    • Line 289: warning: exported type CRDReadinessChecker should have comment or be unexported (golint)
    • Line 294: warning: exported method CRDReadinessChecker.Do should have comment or be unexported (golint)
    • Line 322: warning: exported type Helm3CommandPrinter should have comment or be unexported (golint)
    • Line 336: warning: exported method Helm3CommandPrinter.Do should have comment or be unexported (golint)
    • Line 448: warning: exported type Helm2CommandPrinter should have comment or be unexported (golint)
    • Line 460: warning: exported method Helm2CommandPrinter.Do should have comment or be unexported (golint)
    • Line 572: warning: exported type YAMLPrinter should have comment or be unexported (golint)
    • Line 588: warning: exported method YAMLPrinter.Do should have comment or be unexported (golint)
    • Line 800: warning: exported type ResourcePermission should have comment or be unexported (golint)
    • Line 805: warning: exported type PermissionChecker should have comment or be unexported (golint)
    • Line 821: warning: exported method PermissionChecker.Do should have comment or be unexported (golint)
    • Line 998: warning: exported method PermissionChecker.Result should have comment or be unexported (golint)
    • Line 1007: warning: exported type ApplicationCRDRegPrinter should have comment or be unexported (golint)
    • Line 1011: warning: exported method ApplicationCRDRegPrinter.Do should have comment or be unexported (golint)
    • Line 1023: warning: exported type ApplicationCRDRegistrar should have comment or be unexported (golint)
    • Line 1027: warning: exported method ApplicationCRDRegistrar.Do should have comment or be unexported (golint)
    • Line 1037: warning: exported type ApplicationUploader should have comment or be unexported (golint)
    • Line 1045: warning: exported method ApplicationUploader.Do should have comment or be unexported (golint)
    • Line 1081: warning: exported type ApplicationCreator should have comment or be unexported (golint)
    • Line 1086: warning: exported method ApplicationCreator.Do should have comment or be unexported (golint)
    • Line 1091: warning: exported type ApplicationGenerator should have comment or be unexported (golint)
    • Line 1102: warning: exported method ApplicationGenerator.Do should have comment or be unexported (golint)
    • Line 1252: warning: exported method ApplicationGenerator.Result should have comment or be unexported (golint)
    • Line 1308: warning: exported function ExtractResourceAttributes should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/apis/kubepack/v1alpha1/bundle_types.go
    • Line 25: warning: exported const ResourceKindBundle should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: comment on exported type Bundle should be of the form "Bundle ..." (with optional leading article) (golint)
    • Line 45: warning: exported type BundleSpec should have comment or be unexported (golint)
    • Line 53: warning: exported type PackageRef should have comment or be unexported (golint)
    • Line 59: warning: exported type OneOfBundleOption should have comment or be unexported (golint)
    • Line 64: warning: exported type ChartRef should have comment or be unexported (golint)
    • Line 69: warning: exported type SelectionMode should have comment or be unexported (golint)
    • Line 71: warning: exported type ChartOption should have comment or be unexported (golint)
    • Line 80: warning: exported type BundleRef should have comment or be unexported (golint)
    • Line 85: warning: exported type BundleOption should have comment or be unexported (golint)
    • Line 90: warning: exported type VersionOption should have comment or be unexported (golint)
    • Line 100: warning: exported type VersionDetail should have comment or be unexported (golint)
    • Line 112: warning: exported type BundleList should have comment or be unexported (golint)
    • Line 118: warning: exported type BundleStatus should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/apis/kubepack/v1alpha1/package_ui_types.go
    • Line 25: warning: exported type PackageDescriptor should have comment or be unexported (golint)
    • Line 51: warning: exported type PackageMeta should have comment or be unexported (golint)
    • Line 60: warning: comment on exported type PackageView should be of the form "PackageView ..." (with optional leading article) (golint)
    • Line 73: warning: exported type ValuesFile should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/apis/kubepack/v1alpha1/plan_types.go
    • Line 25: warning: exported const ResourceKindPlan should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: comment on exported type Plan should be of the form "Plan ..." (with optional leading article) (golint)
    • Line 45: warning: exported type PlanSpec should have comment or be unexported (golint)
    • Line 76: warning: exported type ResourceGroup should have comment or be unexported (golint)
    • Line 78: warning: exported type PricingPattern should have comment or be unexported (golint)
    • Line 85: warning: exported type Expression should have comment or be unexported (golint)
    • Line 87: warning: exported type SizedPrice should have comment or be unexported (golint)
    • Line 108: warning: exported method Plan.BundledPlans should have comment or be unexported (golint)
    • Line 117: warning: exported type PlanList should have comment or be unexported (golint)
    • Line 123: warning: exported type PlanStatus should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/pkg/lib/blob.go
    • Line 26: warning: exported const GoogleApplicationCredentials should have comment or be unexported (golint)
    • Line 28: warning: exported type BlobStore should have comment or be unexported (golint)
    • Line 34: warning: exported function NewTestBlobStore should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/pkg/admission/bundle_validator.go
    • Line 42: warning: exported type BundleValidator should have comment or be unexported (golint)
    • Line 51: warning: exported method BundleValidator.Resource should have comment or be unexported (golint)
    • Line 60: warning: exported method BundleValidator.Initialize should have comment or be unexported (golint)
    • Line 76: warning: exported method BundleValidator.Admit should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/test/e2e/framework/framework.go
    • Line 28: warning: exported type Framework should have comment or be unexported (golint)
    • Line 37: warning: exported function New should have comment or be unexported (golint)
    • Line 53: warning: exported method Framework.Invoke should have comment or be unexported (golint)
    • Line 60: warning: exported method Invocation.KubeClient should have comment or be unexported (golint)
    • Line 64: warning: exported method Invocation.RestConfig should have comment or be unexported (golint)
    • Line 68: warning: exported method Invocation.KubeformClient should have comment or be unexported (golint)
    • Line 72: warning: exported type Invocation should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/apis/kubepack/v1alpha1/product_types.go
    • Line 24: warning: exported const ResourceKindProduct should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: comment on exported type Product should be of the form "Product ..." (with optional leading article) (golint)
    • Line 44: warning: exported type ProductSpec should have comment or be unexported (golint)
    • Line 76: warning: exported type Phase should have comment or be unexported (golint)
    • Line 79: warning: exported const PhaseDraft should have comment (or a comment on this block) or be unexported (golint)
    • Line 84: warning: exported type ProductVersion should have comment or be unexported (golint)
    • Line 90: warning: exported type MediaType should have comment or be unexported (golint)
    • Line 93: warning: exported const MediaLogo should have comment (or a comment on this block) or be unexported (golint)
    • Line 101: warning: exported type LinkType should have comment or be unexported (golint)
    • Line 104: warning: exported const LinkWebsite should have comment (or a comment on this block) or be unexported (golint)
    • Line 117: warning: exported type Badge should have comment or be unexported (golint)
    • Line 126: warning: exported type ProductList should have comment or be unexported (golint)
    • Line 132: warning: exported type ProductStatus should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/pkg/lib/order.go
    • Line 41: warning: exported function CreateOrder should have comment or be unexported (golint)
    • Line 155: warning: exported function FindChartData should have comment or be unexported (golint)
    • Line 171: warning: exported function InstallOrder should have comment or be unexported (golint)
    • Line 284: warning: exported function UninstallOrder should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/apis/kubepack/v1alpha1/order_types.go
    • Line 25: warning: exported const ResourceKindOrder should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: comment on exported type Order should be of the form "Order ..." (with optional leading article) (golint)
    • Line 45: warning: exported type OrderSpec should have comment or be unexported (golint)
    • Line 51: warning: exported type PackageSelection should have comment or be unexported (golint)
    • Line 55: warning: exported type ChartSelection should have comment or be unexported (golint)
    • Line 77: warning: exported type OrderList should have comment or be unexported (golint)
    • Line 83: warning: exported type OrderStatus should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/pkg/lib/chart.go
    • Line 37: warning: exported function GetPackageDescriptor should have comment or be unexported (golint)
    • Line 78: warning: exported var DefaultRegistry should have comment or be unexported (golint)
    • Line 80: warning: exported function CreatePackageView should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/pkg/admission/bundle_mutator.go
    • Line 36: warning: exported type BundleMutator should have comment or be unexported (golint)
    • Line 43: warning: exported method BundleMutator.Resource should have comment or be unexported (golint)
    • Line 52: warning: exported method BundleMutator.Initialize should have comment or be unexported (golint)
    • Line 60: warning: exported method BundleMutator.Admit should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/pkg/lib/types.go
    • Line 19: warning: exported type OS should have comment or be unexported (golint)
    • Line 22: warning: exported const Linux should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported type ScriptRef should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/pkg/docker/checks.go
    • Line 20: warning: exported const ACRegistry should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: exported type Docker should have comment or be unexported (golint)
    • Line 28: warning: exported method Docker.ToContainerImage should have comment or be unexported (golint)
    • /kubepack.dev/kubepack/pkg/eventer/recorder.go
    • Line 35: warning: exported const EventReasonInvalidRestic should have comment (or a comment on this block) or be unexported (golint)
    • Line 59: warning: exported function NewEventRecorder should have comment or be unexported (golint)
    • Line 73: warning: exported function CreateEvent should have comment or be unexported (golint)
    • Line 97: warning: exported function CreateEventWithLog 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!