Preparing report...

Report for github.com/monimesl/pulsar-operator

A+    Excellent!    Found 15 issues across 21 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!


gocyclo100%

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.

No problems detected. Good job!


golint95%

Golint is a linter for Go source code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign33%

IneffAssign detects ineffectual assignments in Go code.

    • pulsar-operator/controllers/pulsarmanager_controller.go
    • Line 45: warning: cannot use &(pulsarv1alpha1.PulsarManager literal) (value of type *v1alpha1.PulsarManager) as client.Object value in argument to ctx.NewControllerBuilder().For: missing method DeepCopyObject (ineffassign)
    • Line 56: warning: cannot use cluster (variable of type *v1alpha1.PulsarManager) as reconciler.KubeRuntimeObject value in argument to r.Run: missing method DeepCopyObject (ineffassign)
    • Line 45: warning: cannot use &(pulsarv1alpha1.PulsarManager literal) (value of type *v1alpha1.PulsarManager) as client.Object value in argument to ctx.NewControllerBuilder().For: missing method DeepCopyObject (ineffassign)
    • Line 56: warning: cannot use cluster (variable of type *v1alpha1.PulsarManager) as reconciler.KubeRuntimeObject value in argument to r.Run: missing method DeepCopyObject (ineffassign)
    • pulsar-operator/controllers/pulsarcluster_controller.go
    • Line 45: warning: cannot use &(pulsarv1alpha1.PulsarCluster literal) (value of type *v1alpha1.PulsarCluster) as client.Object value in argument to ctx.NewControllerBuilder().For: missing method DeepCopyObject (ineffassign)
    • Line 56: warning: cannot use cluster (variable of type *v1alpha1.PulsarCluster) as reconciler.KubeRuntimeObject value in argument to r.Run: missing method DeepCopyObject (ineffassign)
    • Line 45: warning: cannot use &(pulsarv1alpha1.PulsarCluster literal) (value of type *v1alpha1.PulsarCluster) as client.Object value in argument to ctx.NewControllerBuilder().For: missing method DeepCopyObject (ineffassign)
    • Line 56: warning: cannot use cluster (variable of type *v1alpha1.PulsarCluster) as reconciler.KubeRuntimeObject value in argument to r.Run: missing method DeepCopyObject (ineffassign)
    • pulsar-operator/api/v1alpha1/pulsarmanager_types.go
    • Line 36: warning: cannot use &(PulsarManager literal) (value of type *PulsarManager) as runtime.Object value in argument to SchemeBuilder.Register: missing method DeepCopyObject (ineffassign)
    • Line 36: warning: cannot use &(PulsarManagerList literal) (value of type *PulsarManagerList) as runtime.Object value in argument to SchemeBuilder.Register: missing method DeepCopyObject (ineffassign)
    • Line 36: warning: cannot use &(PulsarManager literal) (value of type *PulsarManager) as runtime.Object value in argument to SchemeBuilder.Register: missing method DeepCopyObject (ineffassign)
    • Line 36: warning: cannot use &(PulsarManagerList literal) (value of type *PulsarManagerList) as runtime.Object value in argument to SchemeBuilder.Register: missing method DeepCopyObject (ineffassign)
    • pulsar-operator/main.go
    • Line 58: warning: cannot use &(pulsarv1alpha1.PulsarProxy literal) (value of type *v1alpha1.PulsarProxy) as "k8s.io/apimachinery/pkg/runtime".Object value in argument to webhook.Configure: missing method DeepCopyObject (ineffassign)
    • Line 59: warning: cannot use &(pulsarv1alpha1.PulsarCluster literal) (value of type *v1alpha1.PulsarCluster) as "k8s.io/apimachinery/pkg/runtime".Object value in argument to webhook.Configure: missing method DeepCopyObject (ineffassign)
    • Line 60: warning: cannot use &(pulsarv1alpha1.PulsarManager literal) (value of type *v1alpha1.PulsarManager) as "k8s.io/apimachinery/pkg/runtime".Object value in argument to webhook.Configure: missing method DeepCopyObject (ineffassign)
    • pulsar-operator/controllers/pulsarproxy_controller.go
    • Line 45: warning: cannot use &(pulsarv1alpha1.PulsarProxy literal) (value of type *v1alpha1.PulsarProxy) as client.Object value in argument to ctx.NewControllerBuilder().For: missing method DeepCopyObject (ineffassign)
    • Line 56: warning: cannot use cluster (variable of type *v1alpha1.PulsarProxy) as reconciler.KubeRuntimeObject value in argument to r.Run: missing method DeepCopyObject (ineffassign)
    • Line 45: warning: cannot use &(pulsarv1alpha1.PulsarProxy literal) (value of type *v1alpha1.PulsarProxy) as client.Object value in argument to ctx.NewControllerBuilder().For: missing method DeepCopyObject (ineffassign)
    • Line 56: warning: cannot use cluster (variable of type *v1alpha1.PulsarProxy) as reconciler.KubeRuntimeObject value in argument to r.Run: missing method DeepCopyObject (ineffassign)
    • pulsar-operator/api/v1alpha1/pulsarcluster_webhook.go
    • Line 37: warning: cannot use &(PulsarCluster literal) (value of type *PulsarCluster) as admission.Defaulter value in variable declaration: missing method DeepCopyObject (ineffassign)
    • Line 49: warning: cannot use &(PulsarCluster literal) (value of type *PulsarCluster) as admission.Validator value in variable declaration: missing method DeepCopyObject (ineffassign)
    • Line 29: warning: cannot use in (variable of type *PulsarCluster) as runtime.Object value in argument to ctrl.NewWebhookManagedBy(mgr).For: missing method DeepCopyObject (ineffassign)
    • Line 37: warning: cannot use &(PulsarCluster literal) (value of type *PulsarCluster) as admission.Defaulter value in variable declaration: missing method DeepCopyObject (ineffassign)
    • Line 49: warning: cannot use &(PulsarCluster literal) (value of type *PulsarCluster) as admission.Validator value in variable declaration: missing method DeepCopyObject (ineffassign)
    • Line 29: warning: cannot use in (variable of type *PulsarCluster) as runtime.Object value in argument to ctrl.NewWebhookManagedBy(mgr).For: missing method DeepCopyObject (ineffassign)
    • Line 37: warning: cannot use &(PulsarCluster literal) (value of type *PulsarCluster) as admission.Defaulter value in variable declaration: missing method DeepCopyObject (ineffassign)
    • Line 49: warning: cannot use &(PulsarCluster literal) (value of type *PulsarCluster) as admission.Validator value in variable declaration: missing method DeepCopyObject (ineffassign)
    • pulsar-operator/api/v1alpha1/pulsarproxy_webhook.go
    • Line 37: warning: cannot use &(PulsarProxy literal) (value of type *PulsarProxy) as admission.Defaulter value in variable declaration: missing method DeepCopyObject (ineffassign)
    • Line 49: warning: cannot use &(PulsarProxy literal) (value of type *PulsarProxy) as admission.Validator value in variable declaration: missing method DeepCopyObject (ineffassign)
    • Line 29: warning: cannot use in (variable of type *PulsarProxy) as runtime.Object value in argument to ctrl.NewWebhookManagedBy(mgr).For: missing method DeepCopyObject (ineffassign)
    • Line 37: warning: cannot use &(PulsarProxy literal) (value of type *PulsarProxy) as admission.Defaulter value in variable declaration: missing method DeepCopyObject (ineffassign)
    • Line 49: warning: cannot use &(PulsarProxy literal) (value of type *PulsarProxy) as admission.Validator value in variable declaration: missing method DeepCopyObject (ineffassign)
    • Line 29: warning: cannot use in (variable of type *PulsarProxy) as runtime.Object value in argument to ctrl.NewWebhookManagedBy(mgr).For: missing method DeepCopyObject (ineffassign)
    • Line 37: warning: cannot use &(PulsarProxy literal) (value of type *PulsarProxy) as admission.Defaulter value in variable declaration: missing method DeepCopyObject (ineffassign)
    • Line 49: warning: cannot use &(PulsarProxy literal) (value of type *PulsarProxy) as admission.Validator value in variable declaration: missing method DeepCopyObject (ineffassign)
    • pulsar-operator/api/v1alpha1/pulsarproxy_types.go
    • Line 48: warning: cannot use &(PulsarProxy literal) (value of type *PulsarProxy) as runtime.Object value in argument to SchemeBuilder.Register: missing method DeepCopyObject (ineffassign)
    • Line 48: warning: cannot use &(PulsarProxyList literal) (value of type *PulsarProxyList) as runtime.Object value in argument to SchemeBuilder.Register: missing method DeepCopyObject (ineffassign)
    • Line 48: warning: cannot use &(PulsarProxy literal) (value of type *PulsarProxy) as runtime.Object value in argument to SchemeBuilder.Register: missing method DeepCopyObject (ineffassign)
    • Line 48: warning: cannot use &(PulsarProxyList literal) (value of type *PulsarProxyList) as runtime.Object value in argument to SchemeBuilder.Register: missing method DeepCopyObject (ineffassign)
    • pulsar-operator/api/v1alpha1/pulsarcluster_types.go
    • Line 28: warning: cannot use &(PulsarCluster literal) (value of type *PulsarCluster) as reconciler.Defaulting value in variable declaration: missing method DeepCopyObject (ineffassign)
    • Line 41: warning: cannot use &(PulsarCluster literal) (value of type *PulsarCluster) as runtime.Object value in argument to SchemeBuilder.Register: missing method DeepCopyObject (ineffassign)
    • Line 41: warning: cannot use &(PulsarClusterList literal) (value of type *PulsarClusterList) as runtime.Object value in argument to SchemeBuilder.Register: missing method DeepCopyObject (ineffassign)
    • Line 28: warning: cannot use &(PulsarCluster literal) (value of type *PulsarCluster) as reconciler.Defaulting value in variable declaration: missing method DeepCopyObject (ineffassign)
    • Line 41: warning: cannot use &(PulsarCluster literal) (value of type *PulsarCluster) as runtime.Object value in argument to SchemeBuilder.Register: missing method DeepCopyObject (ineffassign)
    • Line 41: warning: cannot use &(PulsarClusterList literal) (value of type *PulsarClusterList) as runtime.Object value in argument to SchemeBuilder.Register: missing method DeepCopyObject (ineffassign)
    • Line 28: warning: cannot use &(PulsarCluster literal) (value of type *PulsarCluster) as reconciler.Defaulting value in variable declaration: missing method DeepCopyObject (ineffassign)
    • pulsar-operator/api/v1alpha1/pulsarmanager_webhook.go
    • Line 37: warning: cannot use &(PulsarManager literal) (value of type *PulsarManager) as admission.Defaulter value in variable declaration: missing method DeepCopyObject (ineffassign)
    • Line 49: warning: cannot use &(PulsarManager literal) (value of type *PulsarManager) as admission.Validator value in variable declaration: missing method DeepCopyObject (ineffassign)
    • Line 29: warning: cannot use in (variable of type *PulsarManager) as runtime.Object value in argument to ctrl.NewWebhookManagedBy(mgr).For: missing method DeepCopyObject (ineffassign)
    • Line 37: warning: cannot use &(PulsarManager literal) (value of type *PulsarManager) as admission.Defaulter value in variable declaration: missing method DeepCopyObject (ineffassign)
    • Line 49: warning: cannot use &(PulsarManager literal) (value of type *PulsarManager) as admission.Validator value in variable declaration: missing method DeepCopyObject (ineffassign)
    • Line 29: warning: cannot use in (variable of type *PulsarManager) as runtime.Object value in argument to ctrl.NewWebhookManagedBy(mgr).For: missing method DeepCopyObject (ineffassign)
    • Line 37: warning: cannot use &(PulsarManager literal) (value of type *PulsarManager) as admission.Defaulter value in variable declaration: missing method DeepCopyObject (ineffassign)
    • Line 49: warning: cannot use &(PulsarManager literal) (value of type *PulsarManager) as admission.Validator value in variable declaration: missing method DeepCopyObject (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!