Preparing report...

Report for github.com/knative-sandbox/eventing-kafka-broker

A+    Excellent!    Found 49 issues across 150 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.


golint68%

Golint is a linter for Go source code.

    • eventing-kafka-broker/control-plane/pkg/apis/eventing/v1alpha1/kafka_sink_validation.go
    • Line 26: warning: exported method KafkaSink.Validate should have comment or be unexported (golint)
    • Line 41: warning: exported method KafkaSinkSpec.Validate should have comment or be unexported (golint)
    • Line 72: warning: exported method KafkaSink.CheckImmutableFields should have comment or be unexported (golint)
    • Line 81: warning: exported method KafkaSinkSpec.CheckImmutableFields should have comment or be unexported (golint)
    • Line 100: warning: exported function ErrImmutableField should have comment or be unexported (golint)
    • eventing-kafka-broker/control-plane/pkg/reconciler/kafka/testing/admin_mock.go
    • Line 12: warning: exported type MockKafkaClusterAdmin should have comment or be unexported (golint)
    • Line 34: warning: exported method MockKafkaClusterAdmin.CreateTopic should have comment or be unexported (golint)
    • Line 46: warning: exported method MockKafkaClusterAdmin.ListTopics should have comment or be unexported (golint)
    • Line 50: warning: exported method MockKafkaClusterAdmin.DescribeTopics should have comment or be unexported (golint)
    • Line 59: warning: exported method MockKafkaClusterAdmin.DeleteTopic should have comment or be unexported (golint)
    • Line 67: warning: exported method MockKafkaClusterAdmin.CreatePartitions should have comment or be unexported (golint)
    • Line 71: warning: exported method MockKafkaClusterAdmin.AlterPartitionReassignments should have comment or be unexported (golint)
    • Line 75: warning: exported method MockKafkaClusterAdmin.ListPartitionReassignments should have comment or be unexported (golint)
    • Line 79: warning: exported method MockKafkaClusterAdmin.DeleteRecords should have comment or be unexported (golint)
    • Line 83: warning: exported method MockKafkaClusterAdmin.DescribeConfig should have comment or be unexported (golint)
    • Line 87: warning: exported method MockKafkaClusterAdmin.AlterConfig should have comment or be unexported (golint)
    • Line 91: warning: exported method MockKafkaClusterAdmin.CreateACL should have comment or be unexported (golint)
    • Line 95: warning: exported method MockKafkaClusterAdmin.ListAcls should have comment or be unexported (golint)
    • Line 99: warning: exported method MockKafkaClusterAdmin.DeleteACL should have comment or be unexported (golint)
    • Line 103: warning: exported method MockKafkaClusterAdmin.ListConsumerGroups should have comment or be unexported (golint)
    • Line 107: warning: exported method MockKafkaClusterAdmin.DescribeConsumerGroups should have comment or be unexported (golint)
    • Line 111: warning: exported method MockKafkaClusterAdmin.ListConsumerGroupOffsets should have comment or be unexported (golint)
    • Line 115: warning: exported method MockKafkaClusterAdmin.DeleteConsumerGroup should have comment or be unexported (golint)
    • Line 119: warning: exported method MockKafkaClusterAdmin.DescribeCluster should have comment or be unexported (golint)
    • Line 123: warning: exported method MockKafkaClusterAdmin.DescribeLogDirs should have comment or be unexported (golint)
    • Line 127: warning: exported method MockKafkaClusterAdmin.Close should have comment or be unexported (golint)
    • eventing-kafka-broker/control-plane/pkg/contract/log_marshaller.go
    • Line 23: warning: exported method Contract.MarshalLogObject should have comment or be unexported (golint)
    • Line 36: warning: exported method Resource.MarshalLogObject should have comment or be unexported (golint)
    • Line 69: warning: exported method Ingress.MarshalLogObject should have comment or be unexported (golint)
    • Line 81: warning: exported method Egress.MarshalLogObject should have comment or be unexported (golint)
    • Line 99: warning: exported method Filter.MarshalLogObject should have comment or be unexported (golint)
    • Line 103: warning: exported method EgressConfig.MarshalLogObject should have comment or be unexported (golint)
    • eventing-kafka-broker/control-plane/pkg/reconciler/base/reconciler.go
    • Line 40: warning: comment on exported const ContractLogKey should be of the form "ContractLogKey ..." (golint)
    • Line 43: warning: comment on exported const ConfigMapDataKey should be of the form "ConfigMapDataKey ..." (golint)
    • Line 46: warning: comment on exported const BrokerDispatcherLabel should be of the form "BrokerDispatcherLabel ..." (golint)
    • Line 48: warning: comment on exported const BrokerReceiverLabel should be of the form "BrokerReceiverLabel ..." (golint)
    • Line 50: warning: comment on exported const SinkReceiverLabel should be of the form "SinkReceiverLabel ..." (golint)
    • Line 53: warning: comment on exported const VolumeGenerationAnnotationKey should be of the form "VolumeGenerationAnnotationKey ..." (golint)
    • Line 56: warning: exported const Protobuf should have comment (or a comment on this block) or be unexported (golint)
    • Line 60: warning: comment on exported type Reconciler should be of the form "Reconciler ..." (with optional leading article) (golint)
    • Line 79: warning: exported method Reconciler.IsReceiverRunning should have comment or be unexported (golint)
    • Line 84: warning: exported method Reconciler.IsDispatcherRunning should have comment or be unexported (golint)
    • Line 98: warning: exported method Reconciler.GetOrCreateDataPlaneConfigMap should have comment or be unexported (golint)
    • Line 130: warning: exported function GetDataPlaneConfigMapData should have comment or be unexported (golint)
    • Line 172: warning: exported method Reconciler.UpdateDataPlaneConfigMap should have comment or be unexported (golint)
    • Line 198: warning: exported method Reconciler.UpdateDispatcherPodsAnnotation should have comment or be unexported (golint)
    • Line 206: warning: exported method Reconciler.UpdateReceiverPodsAnnotation should have comment or be unexported (golint)
    • Line 262: warning: exported method Reconciler.SecretProviderFunc should have comment or be unexported (golint)
    • Line 266: warning: exported method Reconciler.TrackSecret should have comment or be unexported (golint)
    • Line 280: warning: exported method Reconciler.TrackConfigMap should have comment or be unexported (golint)
    • Line 294: warning: exported method Reconciler.OnDeleteObserver should have comment or be unexported (golint)
    • eventing-kafka-broker/control-plane/pkg/reconciler/broker/broker.go
    • Line 51: warning: exported type Configs should have comment or be unexported (golint)
    • Line 57: warning: exported type Reconciler should have comment or be unexported (golint)
    • Line 75: warning: exported method Reconciler.ReconcileKind should have comment or be unexported (golint)
    • Line 215: warning: exported method Reconciler.FinalizeKind should have comment or be unexported (golint)
    • Line 382: warning: exported method Reconciler.ConfigMapUpdated should have comment or be unexported (golint)
    • Line 417: warning: exported method Reconciler.SetDefaultTopicDetails should have comment or be unexported (golint)
    • eventing-kafka-broker/control-plane/pkg/apis/eventing/v1alpha1/kafka_sink_types.go
    • Line 30: warning: comment on exported const ModeBinary should be of the form "ModeBinary ..." (golint)
    • Line 32: warning: comment on exported const ModeStructured should be of the form "ModeStructured ..." (golint)
    • Line 101: warning: exported type Auth should have comment or be unexported (golint)
    • Line 106: warning: exported type Secret should have comment or be unexported (golint)
    • Line 111: warning: exported type SecretReference should have comment or be unexported (golint)
    • Line 153: warning: exported method KafkaSinkSpec.HasAuthConfig should have comment or be unexported (golint)
    • eventing-kafka-broker/control-plane/pkg/reconciler/kafka/topic.go
    • Line 41: warning: exported function BootstrapServersCommaSeparated should have comment or be unexported (golint)
    • Line 45: warning: exported function BootstrapServersArray should have comment or be unexported (golint)
    • Line 91: warning: exported function DeleteTopic should have comment or be unexported (golint)
    • Line 105: warning: exported method NewClusterAdminFunc.CreateTopic should have comment or be unexported (golint)
    • Line 116: warning: exported method NewClusterAdminFunc.DeleteTopic should have comment or be unexported (golint)
    • Line 127: warning: exported method NewClusterAdminFunc.IsTopicPresentAndValid should have comment or be unexported (golint)
    • eventing-kafka-broker/control-plane/pkg/apis/eventing/v1alpha1/kafka_sink_lifecycle.go
    • Line 22: warning: exported const ConditionAddressable should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported function RegisterConditionSet should have comment or be unexported (golint)
    • Line 31: warning: exported method KafkaSink.GetConditionSet should have comment or be unexported (golint)
    • Line 35: warning: exported method KafkaSinkStatus.GetConditionSet should have comment or be unexported (golint)
    • Line 51: warning: receiver name kss should be consistent with previous receiver name ks for KafkaSinkStatus (golint)
    • eventing-kafka-broker/test/pkg/testing/run.go
    • Line 28: warning: comment on exported const BootstrapServersPlaintext should be of the form "BootstrapServersPlaintext ..." (golint)
    • Line 30: warning: exported const BootstrapServersSsl should have comment (or a comment on this block) or be unexported (golint)
    • Line 41: warning: comment on exported var BootstrapServersPlaintextArr should be of the form "BootstrapServersPlaintextArr ..." (golint)
    • Line 43: warning: exported var BootstrapServersSslArr should have comment or be unexported (golint)
    • Line 53: warning: comment on exported function RunMultipleN should be of the form "RunMultipleN ..." (golint)
    • eventing-kafka-broker/control-plane/pkg/reconciler/testing/objects_sink.go
    • Line 41: warning: exported const SinkUUID should have comment (or a comment on this block) or be unexported (golint)
    • Line 57: warning: exported type SinkOption should have comment or be unexported (golint)
    • Line 59: warning: exported function NewSink should have comment or be unexported (golint)
    • Line 83: warning: exported function NewDeletedSink should have comment or be unexported (golint)
    • Line 94: warning: exported function SinkTopic should have comment or be unexported (golint)
    • Line 101: warning: exported function BootstrapServers should have comment or be unexported (golint)
    • Line 107: warning: exported function InitSinkConditions should have comment or be unexported (golint)
    • Line 111: warning: exported function SinkConfigMapUpdatedReady should have comment or be unexported (golint)
    • Line 121: warning: exported function SinkTopicReadyWithName should have comment or be unexported (golint)
    • Line 131: warning: exported function SinkTopicReadyWithOwner should have comment or be unexported (golint)
    • Line 140: warning: exported function SinkTopicReady should have comment or be unexported (golint)
    • Line 144: warning: exported function SinkConfigParsed should have comment or be unexported (golint)
    • Line 148: warning: exported function SinkTopicNotPresentErr should have comment or be unexported (golint)
    • Line 158: warning: exported function SinkDataPlaneAvailable should have comment or be unexported (golint)
    • Line 162: warning: exported function SinkDataPlaneNotAvailable should have comment or be unexported (golint)
    • Line 170: warning: exported function SinkControllerOwnsTopic should have comment or be unexported (golint)
    • Line 175: warning: exported function SinkControllerDontOwnTopic should have comment or be unexported (golint)
    • Line 180: warning: exported function SinkAuthSecretRef should have comment or be unexported (golint)
    • Line 198: warning: exported function SinkAddressable should have comment or be unexported (golint)
    • Line 212: warning: exported function SinkFailedToCreateTopic should have comment or be unexported (golint)
    • Line 223: warning: exported function SinkFailedToGetConfigMap should have comment or be unexported (golint)
    • Line 239: warning: exported function SinkReceiverPod should have comment or be unexported (golint)
    • Line 259: warning: exported function SinkReceiverPodUpdate should have comment or be unexported (golint)
    • eventing-kafka-broker/control-plane/pkg/reconciler/sink/kafka_sink.go
    • Line 42: warning: exported const ExternalTopicOwner should have comment (or a comment on this block) or be unexported (golint)
    • Line 46: warning: exported type Reconciler should have comment or be unexported (golint)
    • Line 58: warning: exported method Reconciler.ReconcileKind should have comment or be unexported (golint)
    • Line 202: warning: exported method Reconciler.FinalizeKind should have comment or be unexported (golint)
    • eventing-kafka-broker/test/pkg/testing/auth.go
    • Line 28: warning: exported type SecretProvider should have comment or be unexported (golint)
    • Line 30: warning: exported function Plaintext should have comment or be unexported (golint)
    • Line 36: warning: exported function Ssl should have comment or be unexported (golint)
    • Line 51: warning: exported function SaslPlaintextScram512 should have comment or be unexported (golint)
    • Line 64: warning: exported function SslSaslScram512 should have comment or be unexported (golint)
    • Line 80: warning: exported type ConfigProvider should have comment or be unexported (golint)
    • eventing-kafka-broker/control-plane/pkg/reconciler/testing/listers.go
    • Line 43: warning: exported type Listers should have comment or be unexported (golint)
    • Line 69: warning: exported method Listers.GetAllObjects should have comment or be unexported (golint)
    • Line 75: warning: exported method Listers.GetKubeObjects should have comment or be unexported (golint)
    • Line 79: warning: exported method Listers.GetEventingObjects should have comment or be unexported (golint)
    • Line 83: warning: exported method Listers.GetEventingKafkaObjects should have comment or be unexported (golint)
    • Line 87: warning: exported method Listers.GetBrokerLister should have comment or be unexported (golint)
    • Line 91: warning: exported method Listers.GetPodLister should have comment or be unexported (golint)
    • Line 95: warning: exported method Listers.GetSecretLister should have comment or be unexported (golint)
    • Line 99: warning: exported method Listers.GetTriggerLister should have comment or be unexported (golint)
    • Line 103: warning: exported method Listers.GetConfigMapLister should have comment or be unexported (golint)
    • Line 107: warning: exported method Listers.GetKafkaSinkLister should have comment or be unexported (golint)
    • eventing-kafka-broker/control-plane/pkg/reconciler/base/receiver_condition_set.go
    • Line 17: warning: package comment should be of the form "Package base ..." (golint)
    • Line 35: warning: exported const ConditionAddressable should have comment (or a comment on this block) or be unexported (golint)
    • Line 42: warning: exported var ConditionSet should have comment or be unexported (golint)
    • Line 51: warning: exported const TopicOwnerAnnotation should have comment (or a comment on this block) or be unexported (golint)
    • Line 59: warning: exported type Object should have comment or be unexported (golint)
    • Line 64: warning: exported type StatusConditionManager should have comment or be unexported (golint)
    • Line 74: warning: exported method StatusConditionManager.DataPlaneAvailable should have comment or be unexported (golint)
    • Line 78: warning: exported method StatusConditionManager.DataPlaneNotAvailable should have comment or be unexported (golint)
    • Line 89: warning: exported method StatusConditionManager.FailedToGetConfigMap should have comment or be unexported (golint)
    • Line 104: warning: exported method StatusConditionManager.FailedToGetDataFromConfigMap should have comment or be unexported (golint)
    • Line 119: warning: exported method StatusConditionManager.FailedToUpdateConfigMap should have comment or be unexported (golint)
    • Line 131: warning: exported method StatusConditionManager.ConfigMapUpdated should have comment or be unexported (golint)
    • Line 140: warning: exported method StatusConditionManager.FailedToCreateTopic should have comment or be unexported (golint)
    • Line 152: warning: exported method StatusConditionManager.TopicReady should have comment or be unexported (golint)
    • Line 171: warning: exported method StatusConditionManager.Reconciled should have comment or be unexported (golint)
    • Line 185: warning: exported method StatusConditionManager.FailedToUpdateDispatcherPodsAnnotation should have comment or be unexported (golint)
    • Line 199: warning: exported method StatusConditionManager.FailedToUpdateReceiverPodsAnnotation should have comment or be unexported (golint)
    • Line 204: warning: exported method StatusConditionManager.FailedToGetConfig should have comment or be unexported (golint)
    • Line 209: warning: exported method StatusConditionManager.FailedToResolveConfig should have comment or be unexported (golint)
    • Line 220: warning: exported method StatusConditionManager.ConfigResolved should have comment or be unexported (golint)
    • Line 224: warning: exported method StatusConditionManager.TopicNotPresentOrInvalidErr should have comment or be unexported (golint)
    • Line 234: warning: exported method StatusConditionManager.TopicNotPresentOrInvalid should have comment or be unexported (golint)
    • eventing-kafka-broker/control-plane/pkg/security/config.go
    • Line 32: warning: exported const AuthSecretNameKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: exported function NewOptionFromSecret should have comment or be unexported (golint)
    • Line 110: warning: exported method MTConfigMapSecretLocator.SecretName should have comment or be unexported (golint)
    • Line 118: warning: exported method MTConfigMapSecretLocator.SecretNamespace should have comment or be unexported (golint)
    • eventing-kafka-broker/control-plane/pkg/reconciler/testing/objects_broker.go
    • Line 36: warning: should not use dot imports (golint)
    • Line 42: warning: exported const BrokerUUID should have comment (or a comment on this block) or be unexported (golint)
    • Line 47: warning: exported function BrokerTopic should have comment or be unexported (golint)
    • Line 69: warning: exported function NewDeletedBroker should have comment or be unexported (golint)
    • Line 80: warning: exported function WithDelivery should have comment or be unexported (golint)
    • Line 98: warning: exported function WithRetry should have comment or be unexported (golint)
    • Line 109: warning: exported function WithBrokerConfig should have comment or be unexported (golint)
    • Line 115: warning: exported type CMOption should have comment or be unexported (golint)
    • Line 117: warning: exported function BrokerConfig should have comment or be unexported (golint)
    • Line 135: warning: exported function BrokerAuthConfig should have comment or be unexported (golint)
    • Line 144: warning: exported function KReference should have comment or be unexported (golint)
    • Line 153: warning: exported function BrokerReady should have comment or be unexported (golint)
    • Line 162: warning: exported function BrokerConfigMapUpdatedReady should have comment or be unexported (golint)
    • Line 172: warning: exported function BrokerTopicReady should have comment or be unexported (golint)
    • Line 180: warning: exported function BrokerDataPlaneAvailable should have comment or be unexported (golint)
    • Line 184: warning: exported function BrokerDataPlaneNotAvailable should have comment or be unexported (golint)
    • Line 192: warning: exported function BrokerConfigParsed should have comment or be unexported (golint)
    • Line 196: warning: exported function BrokerConfigNotParsed should have comment or be unexported (golint)
    • Line 202: warning: exported function BrokerAddressable should have comment or be unexported (golint)
    • Line 216: warning: exported function BrokerFailedToCreateTopic should have comment or be unexported (golint)
    • Line 227: warning: exported function BrokerFailedToGetConfigMap should have comment or be unexported (golint)
    • Line 243: warning: exported function BrokerDispatcherPod should have comment or be unexported (golint)
    • Line 263: warning: exported function BrokerReceiverPod should have comment or be unexported (golint)
    • Line 283: warning: exported function BrokerDispatcherPodUpdate should have comment or be unexported (golint)
    • Line 295: warning: exported function BrokerReceiverPodUpdate should have comment or be unexported (golint)
    • eventing-kafka-broker/control-plane/pkg/reconciler/testing/objects_common.go
    • Line 35: warning: should not use dot imports (golint)
    • Line 39: warning: exported const ConfigMapNamespace should have comment (or a comment on this block) or be unexported (golint)
    • Line 53: warning: exported var Formats should have comment or be unexported (golint)
    • Line 56: warning: exported function NewService should have comment or be unexported (golint)
    • Line 69: warning: exported function NewConfigMap should have comment or be unexported (golint)
    • Line 85: warning: exported function NewConfigMapFromContract should have comment or be unexported (golint)
    • Line 100: warning: exported function ConfigMapUpdate should have comment or be unexported (golint)
    • Line 112: warning: exported function NewSSLSecret should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!