Preparing report...

Report for github.com/apache/camel-k

(v1.8.0)

A+    Excellent!    Found 133 issues across 539 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!


golint83%

Golint is a linter for Go source code.

    • pkg/util/bindings/knative_uri.go
    • Line 34: warning: exported method KnativeURIBindingProvider.ID should have comment or be unexported (golint)
    • Line 38: warning: exported method KnativeURIBindingProvider.Translate should have comment or be unexported (golint)
    • Line 101: warning: exported method KnativeURIBindingProvider.Order should have comment or be unexported (golint)
    • pkg/util/maven/maven_types.go
    • Line 26: warning: exported type Mirror should have comment or be unexported (golint)
    • Line 33: warning: exported type Build should have comment or be unexported (golint)
    • Line 39: warning: exported type Plugin should have comment or be unexported (golint)
    • Line 47: warning: exported type Execution should have comment or be unexported (golint)
    • Line 53: warning: exported type Properties should have comment or be unexported (golint)
    • Line 107: warning: exported type Profile should have comment or be unexported (golint)
    • Line 115: warning: exported type Activation should have comment or be unexported (golint)
    • Line 120: warning: exported type PropertyActivation should have comment or be unexported (golint)
    • Line 125: warning: exported type Proxy should have comment or be unexported (golint)
    • pkg/util/bindings/api.go
    • Line 31: warning: exported const OrderFirst should have comment (or a comment on this block) or be unexported (golint)
    • Line 58: warning: exported type BindingContext should have comment or be unexported (golint)
    • Line 65: warning: exported type EndpointContext should have comment or be unexported (golint)
    • Line 70: warning: exported method EndpointContext.GenerateID should have comment or be unexported (golint)
    • pkg/util/source/inspector_kamelet.go
    • Line 26: warning: exported function ExtractKamelets should have comment or be unexported (golint)
    • Line 36: warning: exported function ExtractKamelet should have comment or be unexported (golint)
    • Line 44: warning: exported function AddKamelet should have comment or be unexported (golint)
    • pkg/util/camel/catalog.go
    • Line 37: warning: exported function DefaultCatalog should have comment or be unexported (golint)
    • Line 41: warning: exported function QuarkusCatalog should have comment or be unexported (golint)
    • Line 75: warning: exported function GenerateCatalog should have comment or be unexported (golint)
    • Line 107: warning: exported function GenerateCatalogCommon should have comment or be unexported (golint)
    • pkg/util/maven/maven_project.go
    • Line 28: warning: exported function NewProject should have comment or be unexported (golint)
    • Line 38: warning: exported function NewProjectWithGAV should have comment or be unexported (golint)
    • Line 49: warning: exported method Project.Command should have comment or be unexported (golint)
    • Line 56: warning: exported method Project.MarshalBytes should have comment or be unexported (golint)
    • Line 70: warning: exported method Project.LookupDependency should have comment or be unexported (golint)
    • Line 81: warning: exported method Project.ReplaceDependency should have comment or be unexported (golint)
    • Line 124: warning: exported method Project.AddDependencyExclusion should have comment or be unexported (golint)
    • Line 141: warning: exported method Project.AddDependencyExclusions should have comment or be unexported (golint)
    • Line 147: warning: exported method Project.AddEncodedDependencyExclusion should have comment or be unexported (golint)
    • Line 159: warning: exported method Properties.AddAll should have comment or be unexported (golint)
    • Line 165: warning: exported method Properties.MarshalXML should have comment or be unexported (golint)
    • Line 239: warning: exported function NewMirror should have comment or be unexported (golint)
    • pkg/util/test/cmd.go
    • Line 26: warning: exported function EmptyRun should have comment or be unexported (golint)
    • Line 28: warning: exported function ArbitraryArgs should have comment or be unexported (golint)
    • Line 32: warning: exported function ExecuteCommand should have comment or be unexported (golint)
    • Line 37: warning: exported function ExecuteCommandC should have comment or be unexported (golint)
    • pkg/util/label/label.go
    • Line 37: warning: exported var FixedLabels should have comment or be unexported (golint)
    • Line 55: warning: comment on exported function AddLabels should be of the form "AddLabels ..." (golint)
    • pkg/util/maven/maven_command.go
    • Line 37: warning: exported var Log should have comment or be unexported (golint)
    • Line 39: warning: exported type Command should have comment or be unexported (golint)
    • Line 44: warning: exported method Command.Do should have comment or be unexported (golint)
    • Line 127: warning: exported function NewContext should have comment or be unexported (golint)
    • Line 135: warning: exported type Context should have comment or be unexported (golint)
    • Line 145: warning: exported method Context.AddEntry should have comment or be unexported (golint)
    • Line 153: warning: exported method Context.AddArgument should have comment or be unexported (golint)
    • Line 157: warning: exported method Context.AddArgumentf should have comment or be unexported (golint)
    • Line 161: warning: exported method Context.AddArguments should have comment or be unexported (golint)
    • Line 165: warning: exported method Context.AddSystemProperty should have comment or be unexported (golint)
    • pkg/install/operator.go
    • Line 49: warning: exported type OperatorConfiguration should have comment or be unexported (golint)
    • Line 63: warning: exported type OperatorHealthConfiguration should have comment or be unexported (golint)
    • Line 67: warning: exported type OperatorMonitoringConfiguration should have comment or be unexported (golint)
    • Line 504: warning: exported function ExampleOrCollect should have comment or be unexported (golint)
    • pkg/util/bindings/camel_uri.go
    • Line 29: warning: exported method CamelURIBindingProvider.ID should have comment or be unexported (golint)
    • Line 33: warning: exported method CamelURIBindingProvider.Translate should have comment or be unexported (golint)
    • Line 51: warning: exported method CamelURIBindingProvider.Order should have comment or be unexported (golint)
    • pkg/platform/operator.go
    • Line 36: warning: exported const OperatorWatchNamespaceEnvVariable should have comment (or a comment on this block) or be unexported (golint)
    • Line 41: warning: exported const OperatorLockName should have comment or be unexported (golint)
    • Line 43: warning: exported var OperatorImage should have comment or be unexported (golint)
    • Line 109: warning: exported function IsOperatorHandler should have comment or be unexported (golint)
    • Line 135: warning: exported method FilteringFuncs.Create should have comment or be unexported (golint)
    • Line 145: warning: exported method FilteringFuncs.Delete should have comment or be unexported (golint)
    • Line 155: warning: exported method FilteringFuncs.Update should have comment or be unexported (golint)
    • Line 170: warning: exported method FilteringFuncs.Generic should have comment or be unexported (golint)
    • pkg/util/kubernetes/client.go
    • Line 35: warning: exported function GetIntegrationPlatform should have comment or be unexported (golint)
    • Line 44: warning: exported function GetIntegrationKit should have comment or be unexported (golint)
    • Line 53: warning: exported function GetBuild should have comment or be unexported (golint)
    • Line 73: warning: exported function GetConfigMap should have comment or be unexported (golint)
    • Line 92: warning: exported function GetSecret should have comment or be unexported (golint)
    • Line 148: warning: exported function ResolveValueSource should have comment or be unexported (golint)
    • pkg/builder/tasks.go
    • Line 27: warning: exported method Builder.Build should have comment or be unexported (golint)
    • Line 34: warning: exported method Build.Task should have comment or be unexported (golint)
    • Line 109: warning: exported method Build.TaskByName should have comment or be unexported (golint)
    • pkg/util/reference/reference.go
    • Line 36: warning: exported const KameletPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 64: warning: exported type Converter should have comment or be unexported (golint)
    • Line 68: warning: exported function NewConverter should have comment or be unexported (golint)
    • Line 74: warning: exported method Converter.FromString should have comment or be unexported (golint)
    • Line 87: warning: exported method Converter.PropertiesFromString should have comment or be unexported (golint)
    • Line 164: warning: exported method Converter.ToString should have comment or be unexported (golint)
    • pkg/builder/types.go
    • Line 43: warning: exported function New should have comment or be unexported (golint)
    • Line 50: warning: exported type Builder should have comment or be unexported (golint)
    • Line 55: warning: exported type Build should have comment or be unexported (golint)
    • Line 60: warning: exported type Task should have comment or be unexported (golint)
    • Line 64: warning: exported type Step should have comment or be unexported (golint)
    • pkg/platform/platform.go
    • Line 34: warning: exported function GetForResource should have comment or be unexported (golint)
    • Line 38: warning: exported function GetOrFindForResource should have comment or be unexported (golint)
    • Line 42: warning: exported function GetOrFindLocalForResource should have comment or be unexported (golint)
    • pkg/util/test/trait.go
    • Line 29: warning: exported function TraitSpecFromMap should have comment or be unexported (golint)
    • Line 43: warning: exported function TraitSpecToMap should have comment or be unexported (golint)
    • pkg/util/bindings/kamelet.go
    • Line 31: warning: exported method KameletBindingProvider.ID should have comment or be unexported (golint)
    • Line 35: warning: exported method KameletBindingProvider.Translate should have comment or be unexported (golint)
    • Line 84: warning: exported method KameletBindingProvider.Order should have comment or be unexported (golint)
    • pkg/controller/integration/health.go
    • Line 32: warning: exported type HealthCheckState should have comment or be unexported (golint)
    • Line 35: warning: exported const HealthCheckStateDown should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported type HealthCheck should have comment or be unexported (golint)
    • Line 44: warning: exported type HealthCheckResponse should have comment or be unexported (golint)
    • addons/strimzi/strimzi.go
    • Line 38: warning: exported method BindingProvider.ID should have comment or be unexported (golint)
    • Line 42: warning: exported method BindingProvider.Translate should have comment or be unexported (golint)
    • Line 121: warning: exported method BindingProvider.Order should have comment or be unexported (golint)
    • cmd/util/vfs-gen/main.go
    • Line 156: warning: exported function NamedFilesFilter should have comment or be unexported (golint)
    • Line 172: warning: comment on exported function BigFilesFilter should be of the form "BigFilesFilter ..." (golint)
    • pkg/trait/trait_types.go
    • Line 47: warning: exported const True should have comment (or a comment on this block) or be unexported (golint)
    • Line 86: warning: exported type Comparable should have comment or be unexported (golint)
    • Line 90: warning: exported type ComparableTrait should have comment or be unexported (golint)
    • Line 108: warning: exported function NewBaseTrait should have comment or be unexported (golint)
    • Line 213: warning: exported method Environment.GetTrait should have comment or be unexported (golint)
    • Line 223: warning: exported method Environment.IntegrationInPhase should have comment or be unexported (golint)
    • Line 237: warning: exported method Environment.IntegrationInRunningPhases should have comment or be unexported (golint)
    • Line 241: warning: exported method Environment.IntegrationKitInPhase should have comment or be unexported (golint)
    • Line 255: warning: exported method Environment.InPhase should have comment or be unexported (golint)
    • Line 339: warning: exported method Environment.DetermineCatalogNamespace should have comment or be unexported (golint)
    • Line 667: warning: exported method Environment.GetIntegrationContainerName should have comment or be unexported (golint)
    • Line 676: warning: exported method Environment.GetIntegrationContainer should have comment or be unexported (golint)
    • pkg/util/knative/knative.go
    • Line 46: warning: exported function CreateSubscription should have comment or be unexported (golint)
    • Line 76: warning: exported function CreateTrigger should have comment or be unexported (golint)
    • Line 113: warning: exported function CreateSinkBinding should have comment or be unexported (golint)
    • pkg/util/util.go
    • Line 104: warning: exported function StringSliceJoin should have comment or be unexported (golint)
    • Line 120: warning: exported function StringSliceContains should have comment or be unexported (golint)
    • Line 130: warning: exported function StringSliceExists should have comment or be unexported (golint)
    • Line 140: warning: exported function StringContainsPrefix should have comment or be unexported (golint)
    • Line 150: warning: exported function StringSliceContainsAnyOf should have comment or be unexported (golint)
    • Line 191: warning: exported function SubstringFrom should have comment or be unexported (golint)
    • Line 200: warning: exported function EncodeXML should have comment or be unexported (golint)
    • Line 214: warning: exported function CopyFile should have comment or be unexported (golint)
    • Line 257: warning: exported function WriteFileWithBytesMarshallerContent should have comment or be unexported (golint)
    • Line 266: warning: exported function FindAllDistinctStringSubmatch should have comment or be unexported (golint)
    • Line 282: warning: exported function FindNamedMatches should have comment or be unexported (golint)
    • Line 293: warning: exported function FileExists should have comment or be unexported (golint)
    • Line 302: warning: exported function DirectoryExists should have comment or be unexported (golint)
    • Line 315: warning: exported function DirectoryEmpty should have comment or be unexported (golint)
    • Line 333: warning: exported function CreateDirectory should have comment or be unexported (golint)
    • Line 353: warning: exported type BytesMarshaller should have comment or be unexported (golint)
    • Line 357: warning: exported function SortedMapKeys should have comment or be unexported (golint)
    • Line 368: warning: exported function SortedStringMapKeys should have comment or be unexported (golint)
    • Line 391: warning: exported function DependenciesToJSON should have comment or be unexported (golint)
    • Line 397: warning: exported function DependenciesToYAML should have comment or be unexported (golint)
    • Line 406: warning: exported function JSONToYAML should have comment or be unexported (golint)
    • Line 415: warning: exported function JSONToMap should have comment or be unexported (golint)
    • Line 425: warning: exported function MapToYAML should have comment or be unexported (golint)
    • Line 434: warning: exported function WriteToFile should have comment or be unexported (golint)
    • Line 475: warning: exported function CreateLocalPropertiesDirectory should have comment or be unexported (golint)
    • Line 495: warning: exported function CreateLocalDependenciesDirectory should have comment or be unexported (golint)
    • Line 515: warning: exported function CreateLocalRoutesDirectory should have comment or be unexported (golint)
    • Line 535: warning: exported function CreateLocalQuarkusDirectory should have comment or be unexported (golint)
    • Line 555: warning: exported function CreateLocalAppDirectory should have comment or be unexported (golint)
    • Line 575: warning: exported function CreateLocalLibDirectory should have comment or be unexported (golint)
    • Line 595: warning: exported function GetEnvironmentVariable should have comment or be unexported (golint)
    • Line 647: warning: exported function CopyIntegrationFilesToDirectory should have comment or be unexported (golint)
    • Line 668: warning: exported function CopyQuarkusAppFiles should have comment or be unexported (golint)
    • Line 713: warning: exported function CopyLibFiles should have comment or be unexported (golint)
    • Line 737: warning: exported function CopyAppFile should have comment or be unexported (golint)
    • Line 779: warning: exported function Close should have comment or be unexported (golint)
    • Line 860: warning: comment on exported function ConfigTreePropertySplit should be of the form "ConfigTreePropertySplit ..." (golint)
    • pkg/util/kubernetes/conditions.go
    • Line 29: warning: exported function GetPodCondition should have comment or be unexported (golint)
    • Line 39: warning: exported function GetDeploymentCondition should have comment or be unexported (golint)
    • Line 49: warning: exported function GetKnativeServiceCondition should have comment or be unexported (golint)
    • Line 59: warning: exported function GetJobCondition should have comment or be unexported (golint)
    • pkg/util/bindings/knative_ref.go
    • Line 35: warning: exported method KnativeRefBindingProvider.ID should have comment or be unexported (golint)
    • Line 39: warning: exported method KnativeRefBindingProvider.Translate should have comment or be unexported (golint)
    • Line 99: warning: exported method KnativeRefBindingProvider.Order should have comment or be unexported (golint)
    • pkg/util/test/client.go
    • Line 127: warning: exported method FakeClient.CamelV1 should have comment or be unexported (golint)
    • Line 131: warning: exported method FakeClient.CamelV1alpha1 should have comment or be unexported (golint)
    • Line 140: warning: exported method FakeClient.GetConfig should have comment or be unexported (golint)
    • Line 144: warning: exported method FakeClient.GetCurrentNamespace should have comment or be unexported (golint)
    • Line 153: warning: exported method FakeClient.Discovery should have comment or be unexported (golint)
    • Line 159: warning: exported method FakeClient.ServerOrClientSideApplier should have comment or be unexported (golint)
    • Line 165: warning: exported method FakeClient.ScalesClient should have comment or be unexported (golint)
    • Line 169: warning: exported type FakeDiscovery should have comment or be unexported (golint)
    • Line 173: warning: exported method FakeDiscovery.ServerResourcesForGroupVersion should have comment or be unexported (golint)
    • pkg/install/cluster.go
    • Line 41: warning: exported function SetupClusterWideResourcesOrCollect should have comment or be unexported (golint)
    • Line 199: warning: exported function WaitForAllCrdInstallation should have comment or be unexported (golint)
    • pkg/install/common.go
    • Line 46: warning: exported var RemoveIngressRoleCustomizer should have comment or be unexported (golint)
    • Line 67: warning: exported function ResourcesOrCollect should have comment or be unexported (golint)
    • Line 82: warning: exported function ResourceOrCollect should have comment or be unexported (golint)
    • Line 98: warning: exported function ObjectOrCollect should have comment or be unexported (golint)
    • pkg/builder/image.go
    • Line 36: warning: exported const ContextDir should have comment (or a comment on this block) or be unexported (golint)
    • Line 53: warning: exported var Image should have comment or be unexported (golint)
    • pkg/trait/trait_catalog.go
    • Line 65: warning: exported method Catalog.AllTraits should have comment or be unexported (golint)
    • Line 186: warning: exported type Finder should have comment or be unexported (golint)
    • addons/tracing/discovery/jaeger.go
    • Line 32: warning: exported type JaegerTracingLocator should have comment or be unexported (golint)
    • Line 40: warning: exported method JaegerTracingLocator.FindEndpoint should have comment or be unexported (golint)
    • pkg/builder/steps.go
    • Line 49: warning: exported type StepTask should have comment or be unexported (golint)
    • Line 51: warning: exported function NewStep should have comment or be unexported (golint)
    • Line 60: warning: exported function StepsFrom should have comment or be unexported (golint)
    • Line 72: warning: exported function StepIDsFor should have comment or be unexported (golint)
    • pkg/util/defaults/defaults_support.go
    • Line 27: warning: exported function BaseImage should have comment or be unexported (golint)
    • Line 31: warning: exported function InstallDefaultKamelets should have comment or be unexported (golint)
    • Line 35: warning: exported function OperatorID should have comment or be unexported (golint)
    • pkg/util/patch/patch.go
    • Line 30: warning: exported function MergePatch should have comment or be unexported (golint)
    • Line 65: warning: exported function ApplyPatch should have comment or be unexported (golint)
    • pkg/util/maven/maven_settings.go
    • Line 30: warning: exported method Settings.MarshalBytes should have comment or be unexported (golint)
    • Line 34: warning: exported type SettingsOption should have comment or be unexported (golint)
    • Line 38: warning: exported function NewSettings should have comment or be unexported (golint)
    • pkg/base/root.go
    • Line 1: warning: package comment should be of the form "Package base ..." (golint)
    • Line 24: warning: exported var GoModDirectory should have comment or be unexported (golint)
    • Line 26: warning: exported function FileExists should have comment or be unexported (golint)
    • pkg/util/kubernetes/collection.go
    • Line 479: warning: exported method Collection.VisitPodMonitor should have comment or be unexported (golint)
    • Line 487: warning: exported method Collection.GetPodMonitor should have comment or be unexported (golint)
    • pkg/client/apply.go
    • Line 38: warning: exported type ServerOrClientSideApplier should have comment or be unexported (golint)
    • Line 50: warning: exported method ServerOrClientSideApplier.Apply should have comment or be unexported (golint)
    • pkg/builder/quarkus.go
    • Line 56: warning: exported var Quarkus should have comment or be unexported (golint)
    • Line 97: warning: exported function GenerateQuarkusProjectCommon should have comment or be unexported (golint)
    • Line 174: warning: exported function BuildQuarkusRunnerCommon should have comment or be unexported (golint)
    • Line 216: warning: exported function ProcessQuarkusTransitiveDependencies should have comment or be unexported (golint)

gocyclo91%

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/cmd/uninstall.go
    • Line 189: warning: cyclomatic complexity 16 of function (*uninstallCmdOptions).uninstallClusterWideResources() is high (> 15) (gocyclo)
    • pkg/cmd/run.go
    • Line 483: warning: cyclomatic complexity 42 of function (*runCmdOptions).createOrUpdateIntegration() is high (> 15) (gocyclo)
    • Line 285: warning: cyclomatic complexity 29 of function (*runCmdOptions).run() is high (> 15) (gocyclo)
    • Line 219: warning: cyclomatic complexity 20 of function (*runCmdOptions).validate() is high (> 15) (gocyclo)
    • pkg/cmd/install.go
    • Line 203: warning: cyclomatic complexity 69 of function (*installCmdOptions).install() is high (> 15) (gocyclo)
    • Line 565: warning: cyclomatic complexity 23 of function (*installCmdOptions).validate() is high (> 15) (gocyclo)
    • pkg/cmd/dump.go
    • Line 76: warning: cyclomatic complexity 21 of function dumpNamespace() is high (> 15) (gocyclo)
    • pkg/cmd/bind.go
    • Line 134: warning: cyclomatic complexity 17 of function (*bindCmdOptions).run() is high (> 15) (gocyclo)
    • pkg/cmd/modeline.go
    • Line 89: warning: cyclomatic complexity 31 of function createKamelWithModelineCommand() is high (> 15) (gocyclo)
    • pkg/trait/cron.go
    • Line 124: warning: cyclomatic complexity 23 of function (*cronTrait).Configure() is high (> 15) (gocyclo)
    • pkg/trait/openapi.go
    • Line 226: warning: cyclomatic complexity 18 of function (*openAPITrait).createNewOpenAPIConfigMap() is high (> 15) (gocyclo)
    • pkg/controller/integration/monitor.go
    • Line 167: warning: cyclomatic complexity 74 of function (*monitorAction).updateIntegrationPhaseAndReadyCondition() is high (> 15) (gocyclo)
    • Line 68: warning: cyclomatic complexity 17 of function (*monitorAction).Handle() is high (> 15) (gocyclo)
    • pkg/trait/jvm.go
    • Line 91: warning: cyclomatic complexity 41 of function (*jvmTrait).Apply() is high (> 15) (gocyclo)
    • pkg/trait/knative.go
    • Line 106: warning: cyclomatic complexity 19 of function (*knativeTrait).Configure() is high (> 15) (gocyclo)
    • Line 207: warning: cyclomatic complexity 16 of function (*knativeTrait).Apply() is high (> 15) (gocyclo)
    • addons/keda/keda.go
    • Line 146: warning: cyclomatic complexity 17 of function (*kedaTrait).addScalingResources() is high (> 15) (gocyclo)

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!