Preparing report...

Report for github.com/knative-sandbox/eventing-rabbitmq

A+    Excellent!    Found 57 issues across 192 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!


gocyclo96%

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.


golint71%

Golint is a linter for Go source code.

    • eventing-rabbitmq/pkg/reconciler/source/rabbitmqsource.go
    • Line 69: warning: exported type Reconciler should have comment or be unexported (golint)
    • Line 88: warning: exported method Reconciler.ReconcileKind should have comment or be unexported (golint)
    • Line 189: warning: exported method Reconciler.UpdateFromLoggingConfigMap should have comment or be unexported (golint)
    • Line 204: warning: exported method Reconciler.UpdateFromMetricsConfigMap should have comment or be unexported (golint)
    • eventing-rabbitmq/pkg/reconciler/trigger/resources/queue.go
    • Line 33: warning: exported const TriggerLabelKey should have comment or be unexported (golint)
    • Line 46: warning: exported function NewQueue should have comment or be unexported (golint)
    • Line 92: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 100: warning: exported function CreateBrokerDeadLetterQueueName should have comment or be unexported (golint)
    • Line 106: warning: exported function CreateTriggerQueueName should have comment or be unexported (golint)
    • eventing-rabbitmq/pkg/reconciler/brokerstandalone/broker.go
    • Line 54: warning: exported type Reconciler should have comment or be unexported (golint)
    • Line 103: warning: exported const BrokerConditionExchange should have comment (or a comment on this block) or be unexported (golint)
    • Line 129: warning: exported method Reconciler.ReconcileKind should have comment or be unexported (golint)
    • Line 144: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 149: warning: exported method Reconciler.FinalizeKind should have comment or be unexported (golint)
    • eventing-rabbitmq/pkg/reconciler/testing/listers.go
    • Line 72: warning: exported type Listers should have comment or be unexported (golint)
    • Line 76: warning: exported function NewScheme should have comment or be unexported (golint)
    • Line 85: warning: exported function NewListers should have comment or be unexported (golint)
    • Line 105: warning: exported method Listers.GetKubeObjects should have comment or be unexported (golint)
    • Line 109: warning: exported method Listers.GetEventingObjects should have comment or be unexported (golint)
    • Line 113: warning: exported method Listers.GetSubscriberObjects should have comment or be unexported (golint)
    • Line 117: warning: exported method Listers.GetAllObjects should have comment or be unexported (golint)
    • Line 125: warning: exported method Listers.GetSubscriptionLister should have comment or be unexported (golint)
    • Line 129: warning: exported method Listers.GetSequenceLister should have comment or be unexported (golint)
    • Line 133: warning: exported method Listers.GetTriggerLister should have comment or be unexported (golint)
    • Line 137: warning: exported method Listers.GetBrokerLister should have comment or be unexported (golint)
    • Line 141: warning: exported method Listers.GetInMemoryChannelLister should have comment or be unexported (golint)
    • Line 145: warning: exported method Listers.GetMessagingChannelLister should have comment or be unexported (golint)
    • Line 149: warning: exported method Listers.GetParallelLister should have comment or be unexported (golint)
    • Line 153: warning: exported method Listers.GetApiServerSourceLister should have comment or be unexported (golint)
    • Line 157: warning: exported method Listers.GetSinkBindingLister should have comment or be unexported (golint)
    • Line 161: warning: exported method Listers.GetContainerSourceLister should have comment or be unexported (golint)
    • Line 165: warning: exported method Listers.GetDeploymentLister should have comment or be unexported (golint)
    • Line 169: warning: exported method Listers.GetK8sServiceLister should have comment or be unexported (golint)
    • Line 173: warning: exported method Listers.GetSecretLister should have comment or be unexported (golint)
    • Line 177: warning: exported method Listers.GetNamespaceLister should have comment or be unexported (golint)
    • Line 181: warning: exported method Listers.GetServiceAccountLister should have comment or be unexported (golint)
    • Line 185: warning: exported method Listers.GetServiceLister should have comment or be unexported (golint)
    • Line 189: warning: exported method Listers.GetRoleBindingLister should have comment or be unexported (golint)
    • Line 193: warning: exported method Listers.GetEndpointsLister should have comment or be unexported (golint)
    • Line 197: warning: exported method Listers.GetConfigMapLister should have comment or be unexported (golint)
    • Line 201: warning: exported method Listers.GetCustomResourceDefinitionLister should have comment or be unexported (golint)
    • Line 205: warning: exported method Listers.GetRabbitObjects should have comment or be unexported (golint)
    • Line 209: warning: exported method Listers.GetExchangeLister should have comment or be unexported (golint)
    • Line 212: warning: exported method Listers.GetQueueLister should have comment or be unexported (golint)
    • Line 215: warning: exported method Listers.GetBindingLister should have comment or be unexported (golint)
    • eventing-rabbitmq/cmd/webhook/main.go
    • Line 47: warning: exported function NewDefaultingAdmissionController should have comment or be unexported (golint)
    • Line 72: warning: exported function NewValidationAdmissionController should have comment or be unexported (golint)
    • Line 99: warning: exported function NewConfigValidationController should have comment or be unexported (golint)
    • eventing-rabbitmq/pkg/reconciler/triggerstandalone/resources/queue.go
    • Line 32: warning: exported const TriggerLabelKey should have comment or be unexported (golint)
    • Line 52: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 60: warning: exported function CreateBrokerDeadLetterQueueName should have comment or be unexported (golint)
    • Line 66: warning: exported function CreateTriggerQueueName should have comment or be unexported (golint)
    • eventing-rabbitmq/pkg/reconciler/brokerstandalone/broker_lifecycle.go
    • Line 27: warning: exported function MarkIngressFailed should have comment or be unexported (golint)
    • Line 31: warning: exported function PropagateIngressAvailability should have comment or be unexported (golint)
    • Line 39: warning: exported function MarkSecretFailed should have comment or be unexported (golint)
    • Line 43: warning: exported function MarkSecretReady should have comment or be unexported (golint)
    • Line 47: warning: exported function MarkExchangeFailed should have comment or be unexported (golint)
    • Line 51: warning: exported function MarkExchangeReady should have comment or be unexported (golint)
    • Line 55: warning: exported function MarkDLXFailed should have comment or be unexported (golint)
    • Line 59: warning: exported function MarkDLXReady should have comment or be unexported (golint)
    • Line 63: warning: exported function MarkDeadLetterSinkFailed should have comment or be unexported (golint)
    • Line 67: warning: exported function MarkDeadLetterSinkReady should have comment or be unexported (golint)
    • eventing-rabbitmq/pkg/reconciler/broker/broker_lifecycle.go
    • Line 27: warning: exported function MarkIngressFailed should have comment or be unexported (golint)
    • Line 31: warning: exported function PropagateIngressAvailability should have comment or be unexported (golint)
    • Line 39: warning: exported function MarkSecretFailed should have comment or be unexported (golint)
    • Line 43: warning: exported function MarkSecretReady should have comment or be unexported (golint)
    • Line 47: warning: exported function MarkExchangeFailed should have comment or be unexported (golint)
    • Line 51: warning: exported function MarkExchangeReady should have comment or be unexported (golint)
    • Line 55: warning: exported function MarkDLXFailed should have comment or be unexported (golint)
    • Line 59: warning: exported function MarkDLXReady should have comment or be unexported (golint)
    • Line 63: warning: exported function MarkDeadLetterSinkFailed should have comment or be unexported (golint)
    • Line 67: warning: exported function MarkDeadLetterSinkReady should have comment or be unexported (golint)
    • eventing-rabbitmq/pkg/reconciler/testrabbit/rabbit_container.go
    • Line 21: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 25: warning: exported const RabbitVersion should have comment or be unexported (golint)
    • Line 26: warning: exported const RabbitUsername should have comment or be unexported (golint)
    • Line 27: warning: exported const RabbitPassword should have comment or be unexported (golint)
    • Line 28: warning: exported const BrokerPort should have comment or be unexported (golint)
    • Line 31: warning: context.Context should be the first parameter of a function (golint)
    • Line 31: warning: exported function AutoStartRabbit should have comment or be unexported (golint)
    • Line 48: warning: context.Context should be the first parameter of a function (golint)
    • Line 48: warning: exported function TerminateContainer should have comment or be unexported (golint)
    • Line 52: warning: context.Context should be the first parameter of a function (golint)
    • Line 52: warning: exported function BrokerUrl should have comment or be unexported (golint)
    • Line 57: warning: context.Context should be the first parameter of a function (golint)
    • Line 57: warning: exported function ManagementUrl should have comment or be unexported (golint)
    • Line 61: warning: context.Context should be the first parameter of a function (golint)
    • Line 61: warning: exported function CreateDurableQueue should have comment or be unexported (golint)
    • Line 66: warning: context.Context should be the first parameter of a function (golint)
    • Line 66: warning: exported function CreateNonDurableQueue should have comment or be unexported (golint)
    • Line 71: warning: context.Context should be the first parameter of a function (golint)
    • Line 71: warning: exported function CreateExchange should have comment or be unexported (golint)
    • Line 76: warning: exported type Binding should have comment or be unexported (golint)
    • Line 78: warning: context.Context should be the first parameter of a function (golint)
    • Line 78: warning: exported function FindBindings should have comment or be unexported (golint)
    • Line 90: warning: exported type Exchange should have comment or be unexported (golint)
    • Line 92: warning: context.Context should be the first parameter of a function (golint)
    • Line 92: warning: exported function FindOwnedExchanges should have comment or be unexported (golint)
    • Line 104: warning: exported type Queue should have comment or be unexported (golint)
    • Line 106: warning: context.Context should be the first parameter of a function (golint)
    • Line 106: warning: exported function FindQueues should have comment or be unexported (golint)
    • Line 128: warning: context.Context should be the first parameter of a function (golint)
    • Line 128: warning: exported function Host should have comment or be unexported (golint)
    • Line 134: warning: context.Context should be the first parameter of a function (golint)
    • Line 134: warning: exported function ManagementPort should have comment or be unexported (golint)
    • Line 144: warning: context.Context should be the first parameter of a function (golint)
    • Line 151: warning: context.Context should be the first parameter of a function (golint)
    • eventing-rabbitmq/pkg/dispatcher/dispatcher.go
    • Line 39: warning: exported type Dispatcher should have comment or be unexported (golint)
    • Line 52: warning: exported function NewDispatcher should have comment or be unexported (golint)
    • Line 171: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • eventing-rabbitmq/pkg/amqp/amqp.go
    • Line 25: warning: exported type DialerFunc should have comment or be unexported (golint)
    • Line 27: warning: exported function RealDialer should have comment or be unexported (golint)
    • Line 32: warning: exported function TestDialer should have comment or be unexported (golint)
    • Line 37: warning: exported type FakeFixedConnection should have comment or be unexported (golint)
    • Line 41: warning: exported function NewFakeFixedConnection should have comment or be unexported (golint)
    • Line 45: warning: exported method FakeFixedConnection.TestFixedConnection should have comment or be unexported (golint)
    • eventing-rabbitmq/pkg/apis/duck/v1beta1/rabbit.go
    • Line 48: warning: comment on exported type RabbitSpec should be of the form "RabbitSpec ..." (with optional leading article) (golint)
    • Line 51: warning: comment on exported type RabbitStatus should be of the form "RabbitStatus ..." (with optional leading article) (golint)
    • Line 58: warning: exported type RabbitDefaultUser should have comment or be unexported (golint)
    • Line 63: warning: exported type RabbitReference should have comment or be unexported (golint)
    • Line 81: warning: receiver name c should be consistent with previous receiver name s for Rabbit (golint)
    • Line 86: warning: receiver name c should be consistent with previous receiver name s for Rabbit (golint)
    • eventing-rabbitmq/pkg/apis/sources/v1alpha1/rabbitmq_types.go
    • Line 53: warning: exported type RabbitmqChannelConfigSpec should have comment or be unexported (golint)
    • Line 62: warning: exported type RabbitmqSourceExchangeConfigSpec should have comment or be unexported (golint)
    • Line 85: warning: exported type RabbitmqSourceQueueConfigSpec should have comment or be unexported (golint)
    • Line 109: warning: exported type RabbitmqSourceSpec should have comment or be unexported (golint)
    • Line 146: warning: exported const RabbitmqEventType should have comment (or a comment on this block) or be unexported (golint)
    • Line 149: warning: exported function RabbitmqEventSource should have comment or be unexported (golint)
    • Line 153: warning: exported type RabbitmqSourceStatus should have comment or be unexported (golint)
    • Line 160: warning: exported method RabbitmqSource.GetGroupVersionKind should have comment or be unexported (golint)
    • eventing-rabbitmq/pkg/adapter/adapter.go
    • Line 44: warning: exported type ExchangeConfig should have comment or be unexported (golint)
    • Line 53: warning: exported type ChannelConfig should have comment or be unexported (golint)
    • Line 58: warning: exported type QueueConfig should have comment or be unexported (golint)
    • Line 79: warning: exported function NewEnvConfig should have comment or be unexported (golint)
    • Line 83: warning: exported type Adapter should have comment or be unexported (golint)
    • Line 94: warning: exported function NewAdapter should have comment or be unexported (golint)
    • Line 107: warning: exported method Adapter.CreateConn should have comment or be unexported (golint)
    • Line 118: warning: exported method Adapter.CreateChannel should have comment or be unexported (golint)
    • Line 140: warning: exported method Adapter.Start should have comment or be unexported (golint)
    • Line 172: warning: exported method Adapter.StartAmqpClient should have comment or be unexported (golint)
    • Line 236: warning: exported method Adapter.ConsumeMessages should have comment or be unexported (golint)
    • Line 254: warning: exported method Adapter.PollForMessages should have comment or be unexported (golint)
    • eventing-rabbitmq/pkg/reconciler/broker/broker.go
    • Line 55: warning: exported type Reconciler should have comment or be unexported (golint)
    • Line 99: warning: exported const BrokerConditionExchange should have comment (or a comment on this block) or be unexported (golint)
    • Line 125: warning: exported method Reconciler.ReconcileKind should have comment or be unexported (golint)
    • eventing-rabbitmq/pkg/reconciler/broker/broker_test_helper.go
    • Line 53: warning: exported function WithBrokerFinalizers should have comment or be unexported (golint)
    • Line 59: warning: exported function WithBrokerResourceVersion should have comment or be unexported (golint)
    • Line 65: warning: exported function WithBrokerGeneration should have comment or be unexported (golint)
    • Line 78: warning: exported function WithBrokerStatusObservedGeneration should have comment or be unexported (golint)
    • Line 84: warning: exported function WithBrokerDelivery should have comment or be unexported (golint)
    • Line 90: warning: exported function WithBrokerDeletionTimestamp should have comment or be unexported (golint)
    • Line 95: warning: comment on exported function WithBrokerConfig should be of the form "WithBrokerConfig ..." (golint)
    • Line 138: warning: comment on exported function WithDLXFailed should be of the form "WithDLXFailed ..." (golint)
    • Line 145: warning: comment on exported function WithDLXReady should be of the form "WithDLXReady ..." (golint)
    • Line 152: warning: comment on exported function WithDeadLetterSinkReady should be of the form "WithDeadLetterSinkReady ..." (golint)
    • Line 187: warning: exported function WithIngressAvailable should have comment or be unexported (golint)
    • Line 193: warning: exported function WithBrokerClass should have comment or be unexported (golint)
    • eventing-rabbitmq/pkg/apis/sources/v1alpha1/rabbitmq_lifecycle.go
    • Line 27: warning: exported const RabbitmqConditionReady should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported var RabbitmqSourceCondSet should have comment or be unexported (golint)
    • Line 40: warning: exported method RabbitmqSourceStatus.GetCondition should have comment or be unexported (golint)
    • Line 44: warning: exported method RabbitmqSourceStatus.GetTopLevelCondition should have comment or be unexported (golint)
    • Line 48: warning: exported method RabbitmqSource.GetStatus should have comment or be unexported (golint)
    • Line 52: warning: exported method RabbitmqSource.GetConditionSet should have comment or be unexported (golint)
    • Line 56: warning: exported method RabbitmqSourceStatus.IsReady should have comment or be unexported (golint)
    • Line 60: warning: exported method RabbitmqSourceStatus.InitializeConditions should have comment or be unexported (golint)
    • Line 64: warning: exported method RabbitmqSourceStatus.MarkSink should have comment or be unexported (golint)
    • Line 73: warning: exported method RabbitmqSourceStatus.MarkNoSink should have comment or be unexported (golint)
    • Line 77: warning: exported function DeploymentIsAvailable should have comment or be unexported (golint)
    • Line 86: warning: exported method RabbitmqSourceStatus.MarkDeployed should have comment or be unexported (golint)
    • Line 94: warning: exported method RabbitmqSourceStatus.MarkDeploying should have comment or be unexported (golint)
    • Line 98: warning: exported method RabbitmqSourceStatus.MarkNotDeployed should have comment or be unexported (golint)
    • Line 102: warning: exported method RabbitmqSourceStatus.MarkResourcesCorrect should have comment or be unexported (golint)
    • Line 106: warning: exported method RabbitmqSourceStatus.MarkResourcesIncorrect should have comment or be unexported (golint)
    • eventing-rabbitmq/pkg/reconciler/brokerstandalone/broker_test_helper.go
    • Line 56: warning: exported function WithBrokerFinalizers should have comment or be unexported (golint)
    • Line 62: warning: exported function WithBrokerResourceVersion should have comment or be unexported (golint)
    • Line 68: warning: exported function WithBrokerGeneration should have comment or be unexported (golint)
    • Line 81: warning: exported function WithBrokerStatusObservedGeneration should have comment or be unexported (golint)
    • Line 87: warning: exported function WithBrokerDelivery should have comment or be unexported (golint)
    • Line 93: warning: exported function WithBrokerDeletionTimestamp should have comment or be unexported (golint)
    • Line 98: warning: comment on exported function WithBrokerConfig should be of the form "WithBrokerConfig ..." (golint)
    • Line 141: warning: comment on exported function WithDLXFailed should be of the form "WithDLXFailed ..." (golint)
    • Line 148: warning: comment on exported function WithDLXReady should be of the form "WithDLXReady ..." (golint)
    • Line 155: warning: comment on exported function WithDeadLetterSinkReady should be of the form "WithDeadLetterSinkReady ..." (golint)
    • Line 190: warning: exported function WithIngressAvailable should have comment or be unexported (golint)
    • Line 196: warning: exported function WithBrokerClass 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!