Preparing report...

Report for github.com/gardener/landscaper

A+    Excellent!    Found 187 issues across 452 files

Tweet

gofmt98%

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!


gocyclo93%

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.


golint63%

Golint is a linter for Go source code.

    • landscaper/apis/core/v1alpha1/helper/helpers.go
    • Line 16: warning: exported type TimestampAnnotation should have comment or be unexported (golint)
    • Line 19: warning: exported const ReconcileTimestamp should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported function GetOperation should have comment or be unexported (golint)
    • Line 45: warning: exported function GetTimestampAnnotation should have comment or be unexported (golint)
    • landscaper/pkg/utils/tar/tar.go
    • Line 107: warning: exported method ToPath.ApplyOption should have comment or be unexported (golint)
    • Line 114: warning: exported method Overwrite.ApplyOption should have comment or be unexported (golint)
    • landscaper/hack/testcluster/cluster_delete.go
    • Line 47: warning: exported method DeleteClusterOptions.Complete should have comment or be unexported (golint)
    • Line 54: warning: exported method DeleteClusterOptions.Validate should have comment or be unexported (golint)
    • Line 58: warning: exported method DeleteClusterOptions.Run should have comment or be unexported (golint)
    • landscaper/hack/testcluster/cluster_create.go
    • Line 20: warning: exported function NewCreateClusterCommand should have comment or be unexported (golint)
    • Line 56: warning: exported method CreateClusterOptions.Complete should have comment or be unexported (golint)
    • Line 71: warning: exported method CreateClusterOptions.Validate should have comment or be unexported (golint)
    • Line 75: warning: exported method CreateClusterOptions.Run should have comment or be unexported (golint)
    • landscaper/pkg/deployer/helm/chartresolver/helmresolver.go
    • Line 18: warning: exported type HelmChartResolver should have comment or be unexported (golint)
    • Line 22: warning: comment on exported function NewHelmResolver should be of the form "NewHelmResolver ..." (golint)
    • Line 30: warning: exported method HelmChartResolver.CanResolve should have comment or be unexported (golint)
    • Line 37: warning: exported method HelmChartResolver.Info should have comment or be unexported (golint)
    • Line 41: warning: exported method HelmChartResolver.Resolve should have comment or be unexported (golint)
    • landscaper/pkg/logger/logger.go
    • Line 15: warning: exported var Log should have comment or be unexported (golint)
    • Line 80: warning: exported function New should have comment or be unexported (golint)
    • Line 96: warning: exported function SetLogger should have comment or be unexported (golint)
    • landscaper/pkg/deployer/manifest/manifest.go
    • Line 36: warning: exported const Type should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: exported var Scheme should have comment or be unexported (golint)
    • Line 106: warning: exported method Manifest.TargetClient should have comment or be unexported (golint)
    • landscaper/pkg/landscaper/jsonschema/loader.go
    • Line 35: warning: exported function NewWrappedLoader should have comment or be unexported (golint)
    • Line 45: warning: exported method LoaderWrapper.LoaderFactory should have comment or be unexported (golint)
    • Line 79: warning: exported method LoaderFactory.New should have comment or be unexported (golint)
    • Line 88: warning: exported method Loader.JsonSource should have comment or be unexported (golint)
    • Line 92: warning: exported method Loader.LoadJSON should have comment or be unexported (golint)
    • Line 130: warning: exported method Loader.JsonReference should have comment or be unexported (golint)
    • Line 134: warning: exported method Loader.LoaderFactory should have comment or be unexported (golint)
    • landscaper/apis/core/v1alpha1/types_shared.go
    • Line 39: warning: exported method JSONSchemaDefinition.OpenAPISchemaType should have comment or be unexported (golint)
    • Line 39: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 40: warning: exported method JSONSchemaDefinition.OpenAPISchemaFormat should have comment or be unexported (golint)
    • Line 40: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 73: warning: exported method Duration.OpenAPISchemaType should have comment or be unexported (golint)
    • Line 73: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 74: warning: exported method Duration.OpenAPISchemaFormat should have comment or be unexported (golint)
    • Line 74: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 105: warning: exported method AnyJSON.OpenAPISchemaType should have comment or be unexported (golint)
    • Line 105: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 114: warning: exported method AnyJSON.OpenAPISchemaFormat should have comment or be unexported (golint)
    • Line 114: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 199: warning: exported type Operation should have comment or be unexported (golint)
    • Line 292: warning: error var UnknownComponentDescriptorKindKindError should have name of the form ErrFoo (golint)
    • Line 292: warning: exported var UnknownComponentDescriptorKindKindError should have comment or be unexported (golint)
    • landscaper/pkg/deployer/container/reconciler_pod.go
    • Line 37: warning: exported function NewPodReconciler should have comment or be unexported (golint)
    • Line 54: warning: exported method PodReconciler.Reconcile should have comment or be unexported (golint)
    • Line 91: warning: exported method PodEventHandler.Create should have comment or be unexported (golint)
    • Line 97: warning: exported method PodEventHandler.Update should have comment or be unexported (golint)
    • Line 103: warning: exported method PodEventHandler.Delete should have comment or be unexported (golint)
    • Line 109: warning: exported method PodEventHandler.Generic should have comment or be unexported (golint)
    • landscaper/hack/testcluster/app.go
    • Line 55: warning: exported method CommonOptions.Complete should have comment or be unexported (golint)
    • Line 81: warning: exported method CommonOptions.Validate should have comment or be unexported (golint)
    • Line 92: warning: exported function NewTestClusterCommand should have comment or be unexported (golint)
    • landscaper/pkg/deployermanagement/controller/controller.go
    • Line 43: warning: exported type EnvironmentController should have comment or be unexported (golint)
    • Line 51: warning: exported method EnvironmentController.Reconcile should have comment or be unexported (golint)
    • Line 146: warning: exported type DeployerRegistrationController should have comment or be unexported (golint)
    • Line 152: warning: exported method DeployerRegistrationController.Reconcile should have comment or be unexported (golint)
    • Line 215: warning: exported type InstallationController should have comment or be unexported (golint)
    • Line 238: warning: exported method InstallationController.Reconcile should have comment or be unexported (golint)
    • landscaper/hack/testcluster/pkg/registry.go
    • Line 39: warning: exported const AddressFormatHostname should have comment (or a comment on this block) or be unexported (golint)
    • Line 114: warning: comment on exported function CreateRegistry should be of the form "CreateRegistry ..." (golint)
    • landscaper/test/integration/deployitems/timeouts.go
    • Line 13: warning: should not use dot imports (golint)
    • Line 14: warning: should not use dot imports (golint)
    • Line 15: warning: should not use dot imports (golint)
    • Line 49: warning: exported function TimeoutTests should have comment or be unexported (golint)
    • Line 71: warning: don't use underscores in Go names; var dummy_inst should be dummyInst (golint)
    • Line 72: warning: don't use underscores in Go names; var mock_inst should be mockInst (golint)
    • Line 73: warning: don't use underscores in Go names; var mock_di_prog should be mockDiProg (golint)
    • Line 89: warning: don't use underscores in Go names; var dummy_inst_di should be dummyInstDi (golint)
    • Line 90: warning: don't use underscores in Go names; var mock_inst_di should be mockInstDi (golint)
    • Line 102: warning: don't use underscores in Go names; var dummy_exec should be dummyExec (golint)
    • Line 103: warning: don't use underscores in Go names; var mock_exec should be mockExec (golint)
    • landscaper/apis/config/v1alpha1/defaults.go
    • Line 22: warning: don't use underscores in Go names; func SetDefaults_LandscaperConfiguration should be SetDefaultsLandscaperConfiguration (golint)
    • Line 65: warning: don't use underscores in Go names; func SetDefaults_CrdManagementConfiguration should be SetDefaultsCrdManagementConfiguration (golint)
    • Line 75: warning: don't use underscores in Go names; func SetDefaults_AgentConfiguration should be SetDefaultsAgentConfiguration (golint)
    • Line 82: warning: don't use underscores in Go names; func SetDefaults_BlueprintStore should be SetDefaultsBlueprintStore (golint)
    • landscaper/hack/testcluster/registry_delete.go
    • Line 47: warning: exported method DeleteRegistryOptions.Complete should have comment or be unexported (golint)
    • Line 54: warning: exported method DeleteRegistryOptions.Validate should have comment or be unexported (golint)
    • Line 58: warning: exported method DeleteRegistryOptions.Run should have comment or be unexported (golint)
    • landscaper/pkg/utils/ociconfig.go
    • Line 17: warning: comment on exported type WithConfigurationStruct should be of the form "WithConfigurationStruct ..." (with optional leading article) (golint)
    • Line 20: warning: exported method WithConfigurationStruct.ApplyOption should have comment or be unexported (golint)
    • landscaper/apis/deployer/manifest/v1alpha1/conversions.go
    • Line 19: warning: don't use underscores in Go names; func Convert_v1alpha1_ProviderConfiguration_To_manifest_ProviderConfiguration should be ConvertV1alpha1ProviderConfigurationToManifestProviderConfiguration (golint)
    • Line 47: warning: don't use underscores in Go names; func Convert_manifest_ProviderConfiguration_To_v1alpha1_ProviderConfiguration should be ConvertManifestProviderConfigurationToV1alpha1ProviderConfiguration (golint)
    • Line 72: warning: don't use underscores in Go names; func Convert_v1alpha1_ProviderStatus_To_manifest_ProviderStatus should be ConvertV1alpha1ProviderStatusToManifestProviderStatus (golint)
    • Line 93: warning: don't use underscores in Go names; func Convert_manifest_ProviderStatus_To_v1alpha1_ProviderStatus should be ConvertManifestProviderStatusToV1alpha1ProviderStatus (golint)
    • landscaper/test/utils/envtest/state.go
    • Line 49: warning: comment on exported method State.AddResources should be of the form "AddResources ..." (golint)
    • Line 82: warning: exported type CreateOptions should have comment or be unexported (golint)
    • Line 97: warning: exported type CreateOption should have comment or be unexported (golint)
    • Line 101: warning: exported type UpdateStatus should have comment or be unexported (golint)
    • Line 103: warning: exported method UpdateStatus.ApplyOption should have comment or be unexported (golint)
    • landscaper/pkg/landscaper/blueprints/store.go
    • Line 63: warning: error var NotFoundError should have name of the form ErrFoo (golint)
    • Line 63: warning: exported var NotFoundError should have comment or be unexported (golint)
    • Line 64: warning: error var StoreClosedError should have name of the form ErrFoo (golint)
    • Line 64: warning: exported var StoreClosedError should have comment or be unexported (golint)
    • Line 150: warning: exported method Store.Close should have comment or be unexported (golint)
    • landscaper/pkg/landscaper/installations/error.go
    • Line 13: warning: exported const ImportNotFound should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type Error should have comment or be unexported (golint)
    • Line 49: warning: comment on exported function NewErrorWrap should be of the form "NewErrorWrap ..." (golint)
    • Line 81: warning: comment on exported function NewImportNotSatisfiedError should be of the form "NewImportNotSatisfiedError ..." (golint)
    • Line 91: warning: comment on exported function IsImportNotSatisfiedError should be of the form "IsImportNotSatisfiedError ..." (golint)
    • landscaper/pkg/utils/landscaper/blueprint.go
    • Line 33: warning: exported type BlueprintRenderArgs should have comment or be unexported (golint)
    • Line 203: warning: exported function RenderBlueprintDeployItems should have comment or be unexported (golint)
    • Line 236: warning: exported function RenderBlueprintSubInstallations should have comment or be unexported (golint)
    • landscaper/pkg/landscaper/installations/executions/template/state.go
    • Line 25: warning: error var StateNotFoundErr should have name of the form ErrFoo (golint)
    • Line 25: warning: exported var StateNotFoundErr should have comment or be unexported (golint)
    • Line 27: warning: exported type GenericStateHandler should have comment or be unexported (golint)
    • Line 41: warning: exported method KubernetesStateHandler.Store should have comment or be unexported (golint)
    • Line 67: warning: exported method KubernetesStateHandler.Get should have comment or be unexported (golint)
    • Line 102: warning: exported type MemoryStateHandler should have comment or be unexported (golint)
    • Line 106: warning: exported function NewMemoryStateHandler should have comment or be unexported (golint)
    • Line 110: warning: exported method MemoryStateHandler.Store should have comment or be unexported (golint)
    • Line 115: warning: exported method MemoryStateHandler.Get should have comment or be unexported (golint)
    • landscaper/pkg/deployermanagement/config/types.go
    • Line 18: warning: error var NoConfigError should have name of the form ErrFoo (golint)
    • Line 18: warning: exported var NoConfigError should have comment or be unexported (golint)
    • Line 38: warning: exported type DeployerApplyFunc should have comment or be unexported (golint)
    • Line 40: warning: exported var DefaultDeployerConfiguration should have comment or be unexported (golint)
    • Line 72: warning: exported const ValuesType should have comment (or a comment on this block) or be unexported (golint)
    • Line 94: warning: exported method DeployerConfiguration.UnmarshalJSON should have comment or be unexported (golint)
    • Line 125: warning: exported method DeployerConfiguration.MarshalJSON should have comment or be unexported (golint)
    • landscaper/test/utils/utils.go
    • Line 11: warning: exported function ExpectNoError should have comment or be unexported (golint)
    • Line 15: warning: exported function ExpectNoErrorWithOffset should have comment or be unexported (golint)
    • landscaper/pkg/landscaper/installations/installation.go
    • Line 16: warning: comment on exported type InstallationBase should be of the form "InstallationBase ..." (with optional leading article) (golint)
    • Line 52: warning: exported method InstallationBase.GetImports should have comment or be unexported (golint)
    • Line 56: warning: exported method InstallationBase.SetImports should have comment or be unexported (golint)
    • Line 60: warning: exported method InstallationBase.GetInfo should have comment or be unexported (golint)
    • landscaper/apis/core/v1alpha1/types_installation.go
    • Line 26: warning: comment on exported const KeepChildrenAnnotation should be of the form "KeepChildrenAnnotation ..." (golint)
    • Line 53: warning: exported type ComponentInstallationPhase should have comment or be unexported (golint)
    • Line 56: warning: exported const ComponentPhaseInit should have comment (or a comment on this block) or be unexported (golint)
    • Line 377: warning: comment on exported type TargetImportStatus should be of the form "TargetImportStatus ..." (with optional leading article) (golint)
    • landscaper/apis/core/types_shared.go
    • Line 38: warning: exported method JSONSchemaDefinition.OpenAPISchemaType should have comment or be unexported (golint)
    • Line 38: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 39: warning: exported method JSONSchemaDefinition.OpenAPISchemaFormat should have comment or be unexported (golint)
    • Line 39: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 72: warning: exported method Duration.OpenAPISchemaType should have comment or be unexported (golint)
    • Line 72: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 73: warning: exported method Duration.OpenAPISchemaFormat should have comment or be unexported (golint)
    • Line 73: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 103: warning: exported method AnyJSON.OpenAPISchemaType should have comment or be unexported (golint)
    • Line 103: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 112: warning: exported method AnyJSON.OpenAPISchemaFormat should have comment or be unexported (golint)
    • Line 112: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 189: warning: exported type Operation should have comment or be unexported (golint)
    • Line 282: warning: error var UnknownComponentDescriptorKindKindError should have name of the form ErrFoo (golint)
    • Line 282: warning: exported var UnknownComponentDescriptorKindKindError should have comment or be unexported (golint)
    • landscaper/apis/core/v1alpha1/defaults.go
    • Line 17: warning: don't use underscores in Go names; func SetDefaults_Blueprint should be SetDefaultsBlueprint (golint)
    • Line 27: warning: don't use underscores in Go names; func SetDefaults_DefinitionImport should be SetDefaultsDefinitionImport (golint)
    • Line 54: warning: don't use underscores in Go names; func SetDefaults_DefinitionExport should be SetDefaultsDefinitionExport (golint)
    • Line 77: warning: don't use underscores in Go names; func SetDefaults_Installation should be SetDefaultsInstallation (golint)
    • landscaper/pkg/deployer/helm/helm.go
    • Line 43: warning: exported const Type should have comment (or a comment on this block) or be unexported (golint)
    • Line 47: warning: exported var HelmScheme should have comment or be unexported (golint)
    • Line 171: warning: exported method Helm.TargetClient should have comment or be unexported (golint)
    • landscaper/apis/mediatype/mediatype.go
    • Line 13: warning: error var InvalidTypeError should have name of the form ErrFoo (golint)
    • Line 13: warning: exported var InvalidTypeError should have comment or be unexported (golint)
    • Line 15: warning: exported type MediaTypeFormat should have comment or be unexported (golint)
    • Line 18: warning: exported const DefaultFormat should have comment (or a comment on this block) or be unexported (golint)
    • landscaper/pkg/landscaper/registry/components/local.go
    • Line 69: warning: exported method FilesystemBlobAccess.GetData should have comment or be unexported (golint)
    • Line 73: warning: exported method FilesystemBlobAccess.SetData should have comment or be unexported (golint)
    • Line 197: warning: exported method FilesystemBlobResolver.CanResolve should have comment or be unexported (golint)
    • Line 201: warning: exported method FilesystemBlobResolver.Info should have comment or be unexported (golint)
    • Line 259: warning: exported method LocalFilesystemBlobResolver.CanResolve should have comment or be unexported (golint)
    • Line 263: warning: exported method LocalFilesystemBlobResolver.Info should have comment or be unexported (golint)
    • landscaper/pkg/utils/simplelogger/iologger.go
    • Line 31: warning: exported method IOLogger.Enabled should have comment or be unexported (golint)
    • Line 35: warning: exported method IOLogger.Info should have comment or be unexported (golint)
    • Line 43: warning: exported method IOLogger.V should have comment or be unexported (golint)
    • Line 47: warning: exported method IOLogger.WithValues should have comment or be unexported (golint)
    • Line 51: warning: exported method IOLogger.WithName should have comment or be unexported (golint)
    • landscaper/apis/core/v1alpha1/conversion.go
    • Line 43: warning: don't use underscores in Go names; func Convert_v1alpha1_ExecutionSpec_To_core_ExecutionSpec should be ConvertV1alpha1ExecutionSpecToCoreExecutionSpec (golint)
    • Line 52: warning: don't use underscores in Go names; func Convert_core_ExecutionSpec_To_v1alpha1_ExecutionSpec should be ConvertCoreExecutionSpecToV1alpha1ExecutionSpec (golint)
    • Line 61: warning: don't use underscores in Go names; func Convert_v1alpha1_DeployItemTemplateList_To_core_DeployItemTemplateList should be ConvertV1alpha1DeployItemTemplateListToCoreDeployItemTemplateList (golint)
    • Line 80: warning: don't use underscores in Go names; func Convert_core_DeployItemTemplateList_To_v1alpha1_DeployItemTemplateList should be ConvertCoreDeployItemTemplateListToV1alpha1DeployItemTemplateList (golint)
    • landscaper/pkg/landscaper/jsonschema/validate.go
    • Line 12: warning: exported type Validator should have comment or be unexported (golint)
    • Line 25: warning: exported method Validator.ValidateGoStruct should have comment or be unexported (golint)
    • Line 29: warning: exported method Validator.ValidateBytes should have comment or be unexported (golint)
    • landscaper/test/framework/framework.go
    • Line 45: warning: exported type Options should have comment or be unexported (golint)
    • Line 70: warning: exported method Options.Complete should have comment or be unexported (golint)
    • Line 116: warning: exported function New should have comment or be unexported (golint)
    • landscaper/test/framework/dump.go
    • Line 113: warning: exported method Dumper.DumpInstallationsInNamespace should have comment or be unexported (golint)
    • Line 492: warning: comment on exported function FormatContainersStatus should be of the form "FormatContainersStatus ..." (golint)
    • landscaper/hack/testcluster/registry_create.go
    • Line 20: warning: exported function NewCreateRegistryCommand should have comment or be unexported (golint)
    • Line 63: warning: exported method CreateRegistryOptions.Complete should have comment or be unexported (golint)
    • Line 81: warning: exported method CreateRegistryOptions.Validate should have comment or be unexported (golint)
    • Line 85: warning: exported method CreateRegistryOptions.Run 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!