Preparing report...

Report for github.com/coreos/alb-ingress-controller

A+    Excellent!    Found 99 issues across 291 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!


gocyclo97%

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.

    • alb-ingress-controller/pkg/model/core/resource.go
    • Line 24: warning: comment on exported type ResourceMeta should be of the form "ResourceMeta ..." (with optional leading article) (golint)
    • Line 31: warning: exported method ResourceMeta.Stack should have comment or be unexported (golint)
    • Line 35: warning: exported method ResourceMeta.Type should have comment or be unexported (golint)
    • Line 39: warning: exported method ResourceMeta.ID should have comment or be unexported (golint)
    • alb-ingress-controller/test/e2e/service/nlb_ip_target.go
    • Line 16: warning: exported const ResourceTypeELBLoadBalancer should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type NLBIPTestStack should have comment or be unexported (golint)
    • Line 23: warning: exported method NLBIPTestStack.Deploy should have comment or be unexported (golint)
    • Line 28: warning: exported method NLBIPTestStack.UpdateServiceAnnotations should have comment or be unexported (golint)
    • Line 32: warning: exported method NLBIPTestStack.ScaleDeployment should have comment or be unexported (golint)
    • Line 36: warning: exported method NLBIPTestStack.Cleanup should have comment or be unexported (golint)
    • Line 40: warning: exported method NLBIPTestStack.GetLoadBalancerIngressHostName should have comment or be unexported (golint)
    • Line 44: warning: exported method NLBIPTestStack.SendTrafficToLB should have comment or be unexported (golint)
    • alb-ingress-controller/apis/elbv2/v1beta1/ingressclassparams_types.go
    • Line 23: warning: comment on exported type IPAddressType should be of the form "IPAddressType ..." (with optional leading article) (golint)
    • Line 28: warning: exported const IPAddressTypeIPV4 should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: comment on exported type LoadBalancerScheme should be of the form "LoadBalancerScheme ..." (with optional leading article) (golint)
    • Line 40: warning: exported const LoadBalancerSchemeInternal should have comment (or a comment on this block) or be unexported (golint)
    • Line 82: warning: comment on exported type IngressClassParams should be of the form "IngressClassParams ..." (with optional leading article) (golint)
    • alb-ingress-controller/test/e2e/service/nlb_instance_target.go
    • Line 21: warning: exported type NLBInstanceTestStack should have comment or be unexported (golint)
    • Line 25: warning: exported method NLBInstanceTestStack.Deploy should have comment or be unexported (golint)
    • Line 33: warning: exported method NLBInstanceTestStack.UpdateServiceAnnotations should have comment or be unexported (golint)
    • Line 37: warning: exported method NLBInstanceTestStack.DeleteServiceAnnotations should have comment or be unexported (golint)
    • Line 41: warning: exported method NLBInstanceTestStack.UpdateServiceTrafficPolicy should have comment or be unexported (golint)
    • Line 45: warning: exported method NLBInstanceTestStack.ScaleDeployment should have comment or be unexported (golint)
    • Line 49: warning: exported method NLBInstanceTestStack.Cleanup should have comment or be unexported (golint)
    • Line 53: warning: exported method NLBInstanceTestStack.GetLoadBalancerIngressHostName should have comment or be unexported (golint)
    • Line 57: warning: exported method NLBInstanceTestStack.GetWorkerNodes should have comment or be unexported (golint)
    • Line 72: warning: exported method NLBInstanceTestStack.ApplyNodeLabels should have comment or be unexported (golint)
    • alb-ingress-controller/apis/elbv2/v1beta1/targetgroupbinding_types.go
    • Line 24: warning: comment on exported type TargetType should be of the form "TargetType ..." (with optional leading article) (golint)
    • Line 32: warning: exported const TargetTypeInstance should have comment (or a comment on this block) or be unexported (golint)
    • Line 71: warning: comment on exported type NetworkingProtocol should be of the form "NetworkingProtocol ..." (with optional leading article) (golint)
    • Line 143: warning: comment on exported type TargetGroupBinding should be of the form "TargetGroupBinding ..." (with optional leading article) (golint)
    • alb-ingress-controller/pkg/model/elbv2/target_group_binding.go
    • Line 67: warning: exported type NetworkingIngressRule should have comment or be unexported (golint)
    • Line 77: warning: exported type TargetGroupBindingNetworking should have comment or be unexported (golint)
    • Line 104: warning: comment on exported type TargetGroupBindingTemplate should be of the form "TargetGroupBindingTemplate ..." (with optional leading article) (golint)
    • Line 113: warning: comment on exported type TargetGroupBindingResourceSpec should be of the form "TargetGroupBindingResourceSpec ..." (with optional leading article) (golint)
    • Line 119: warning: comment on exported type TargetGroupBindingResourceStatus should be of the form "TargetGroupBindingResourceStatus ..." (with optional leading article) (golint)
    • alb-ingress-controller/pkg/aws/throttle/config.go
    • Line 22: warning: comment on exported type ServiceOperationsThrottleConfig should be of the form "ServiceOperationsThrottleConfig ..." (with optional leading article) (golint)
    • Line 55: warning: exported method ServiceOperationsThrottleConfig.Set should have comment or be unexported (golint)
    • Line 100: warning: exported method ServiceOperationsThrottleConfig.Type should have comment or be unexported (golint)
    • alb-ingress-controller/test/e2e/ingress/multi_path_backend.go
    • Line 20: warning: exported type PathConfig should have comment or be unexported (golint)
    • Line 25: warning: exported type BackendConfig should have comment or be unexported (golint)
    • Line 32: warning: exported type MultiPathIngressConfig should have comment or be unexported (golint)
    • Line 38: warning: exported type NamespacedResourcesConfig should have comment or be unexported (golint)
    • Line 43: warning: exported function NewMultiPathBackendStack should have comment or be unexported (golint)
    • alb-ingress-controller/pkg/annotations/constants.go
    • Line 4: warning: comment on exported const IngressClass should be of the form "IngressClass ..." (golint)
    • Line 7: warning: exported const AnnotationPrefixIngress should have comment (or a comment on this block) or be unexported (golint)
    • Line 8: warning: comment on exported const IngressSuffixLoadBalancerName should be of the form "IngressSuffixLoadBalancerName ..." (golint)
    • Line 49: warning: comment on exported const SvcLBSuffixSourceRanges should be of the form "SvcLBSuffixSourceRanges ..." (golint)
    • alb-ingress-controller/pkg/model/elbv2/listener_rule.go
    • Line 45: warning: exported type RuleConditionField should have comment or be unexported (golint)
    • Line 48: warning: exported const RuleConditionFieldHTTPHeader should have comment (or a comment on this block) or be unexported (golint)
    • Line 56: warning: comment on exported type HostHeaderConditionConfig should be of the form "HostHeaderConditionConfig ..." (with optional leading article) (golint)
    • Line 62: warning: comment on exported type HTTPHeaderConditionConfig should be of the form "HTTPHeaderConditionConfig ..." (with optional leading article) (golint)
    • Line 70: warning: comment on exported type HTTPRequestMethodConditionConfig should be of the form "HTTPRequestMethodConditionConfig ..." (with optional leading article) (golint)
    • Line 76: warning: comment on exported type PathPatternConditionConfig should be of the form "PathPatternConditionConfig ..." (with optional leading article) (golint)
    • Line 82: warning: comment on exported type QueryStringKeyValuePair should be of the form "QueryStringKeyValuePair ..." (with optional leading article) (golint)
    • Line 92: warning: comment on exported type QueryStringConditionConfig should be of the form "QueryStringConditionConfig ..." (with optional leading article) (golint)
    • Line 98: warning: comment on exported type SourceIPConditionConfig should be of the form "SourceIPConditionConfig ..." (with optional leading article) (golint)
    • Line 104: warning: comment on exported type RuleCondition should be of the form "RuleCondition ..." (with optional leading article) (golint)
    • alb-ingress-controller/pkg/k8s/events.go
    • Line 4: warning: comment on exported const IngressEventReasonConflictingIngressClass should be of the form "IngressEventReasonConflictingIngressClass ..." (golint)
    • Line 6: warning: exported const IngressEventReasonFailedLoadGroupID should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: comment on exported const ServiceEventReasonFailedAddFinalizer should be of the form "ServiceEventReasonFailedAddFinalizer ..." (golint)
    • Line 22: warning: comment on exported const TargetGroupBindingEventReasonFailedAddFinalizer should be of the form "TargetGroupBindingEventReasonFailedAddFinalizer ..." (golint)
    • alb-ingress-controller/pkg/k8s/finalizer.go
    • Line 13: warning: exported type APIObject should have comment or be unexported (golint)
    • Line 18: warning: exported type FinalizerManager should have comment or be unexported (golint)
    • Line 23: warning: exported function NewDefaultFinalizerManager should have comment or be unexported (golint)
    • alb-ingress-controller/pkg/model/elbv2/load_balancer.go
    • Line 75: warning: exported type LoadBalancerType should have comment or be unexported (golint)
    • Line 78: warning: exported const LoadBalancerTypeApplication should have comment (or a comment on this block) or be unexported (golint)
    • Line 82: warning: exported type IPAddressType should have comment or be unexported (golint)
    • Line 85: warning: exported const IPAddressTypeIPV4 should have comment (or a comment on this block) or be unexported (golint)
    • Line 89: warning: exported type LoadBalancerScheme should have comment or be unexported (golint)
    • Line 92: warning: exported const LoadBalancerSchemeInternal should have comment (or a comment on this block) or be unexported (golint)
    • Line 96: warning: comment on exported type SubnetMapping should be of the form "SubnetMapping ..." (with optional leading article) (golint)
    • Line 109: warning: comment on exported type LoadBalancerAttribute should be of the form "LoadBalancerAttribute ..." (with optional leading article) (golint)
    • alb-ingress-controller/pkg/deploy/elbv2/tagging_manager.go
    • Line 19: warning: comment on exported type LoadBalancerWithTags should be of the form "LoadBalancerWithTags ..." (with optional leading article) (golint)
    • Line 25: warning: comment on exported type TargetGroupWithTags should be of the form "TargetGroupWithTags ..." (with optional leading article) (golint)
    • Line 31: warning: comment on exported type ListenerWithTags should be of the form "ListenerWithTags ..." (with optional leading article) (golint)
    • Line 37: warning: comment on exported type ListenerRuleWithTags should be of the form "ListenerRuleWithTags ..." (with optional leading article) (golint)
    • Line 43: warning: comment on exported type ReconcileTagsOptions should be of the form "ReconcileTagsOptions ..." (with optional leading article) (golint)
    • Line 54: warning: exported method ReconcileTagsOptions.ApplyOptions should have comment or be unexported (golint)
    • Line 60: warning: exported type ReconcileTagsOption should have comment or be unexported (golint)
    • Line 76: warning: comment on exported type TaggingManager should be of the form "TaggingManager ..." (with optional leading article) (golint)
    • alb-ingress-controller/pkg/model/elbv2/listener.go
    • Line 61: warning: exported type Protocol should have comment or be unexported (golint)
    • Line 64: warning: exported const ProtocolHTTP should have comment (or a comment on this block) or be unexported (golint)
    • Line 69: warning: don't use underscores in Go names; const ProtocolTCP_UDP should be ProtocolTCPUDP (golint)
    • Line 72: warning: exported type ProtocolVersion should have comment or be unexported (golint)
    • Line 75: warning: exported const ProtocolVersionHTTP1 should have comment (or a comment on this block) or be unexported (golint)
    • Line 80: warning: comment on exported type ActionType should be of the form "ActionType ..." (with optional leading article) (golint)
    • Line 84: warning: exported const ActionTypeAuthenticateCognito should have comment (or a comment on this block) or be unexported (golint)
    • Line 91: warning: exported type AuthenticateCognitoActionConditionalBehavior should have comment or be unexported (golint)
    • Line 94: warning: exported const AuthenticateCognitoActionConditionalBehaviorDeny should have comment (or a comment on this block) or be unexported (golint)
    • Line 99: warning: comment on exported type AuthenticateCognitoActionConfig should be of the form "AuthenticateCognitoActionConfig ..." (with optional leading article) (golint)
    • Line 131: warning: exported type AuthenticateOIDCActionConditionalBehavior should have comment or be unexported (golint)
    • Line 134: warning: exported const AuthenticateOIDCActionConditionalBehaviorDeny should have comment (or a comment on this block) or be unexported (golint)
    • Line 139: warning: comment on exported type AuthenticateOIDCActionConfig should be of the form "AuthenticateOIDCActionConfig ..." (with optional leading article) (golint)
    • Line 180: warning: exported method AuthenticateOIDCActionConfig.MarshalJSON should have comment or be unexported (golint)
    • Line 188: warning: comment on exported type FixedResponseActionConfig should be of the form "FixedResponseActionConfig ..." (with optional leading article) (golint)
    • Line 203: warning: comment on exported type RedirectActionConfig should be of the form "RedirectActionConfig ..." (with optional leading article) (golint)
    • Line 230: warning: comment on exported type TargetGroupTuple should be of the form "TargetGroupTuple ..." (with optional leading article) (golint)
    • Line 240: warning: comment on exported type TargetGroupStickinessConfig should be of the form "TargetGroupStickinessConfig ..." (with optional leading article) (golint)
    • Line 251: warning: comment on exported type ForwardActionConfig should be of the form "ForwardActionConfig ..." (with optional leading article) (golint)
    • Line 262: warning: comment on exported type Action should be of the form "Action ..." (with optional leading article) (golint)
    • Line 288: warning: comment on exported type Certificate should be of the form "Certificate ..." (with optional leading article) (golint)
    • alb-ingress-controller/pkg/model/core/token_types.go
    • Line 25: warning: exported method LiteralStringToken.Resolve should have comment or be unexported (golint)
    • Line 29: warning: exported method LiteralStringToken.Dependencies should have comment or be unexported (golint)
    • Line 46: warning: exported type ResourceFieldStringToken should have comment or be unexported (golint)
    • Line 52: warning: exported method ResourceFieldStringToken.Resolve should have comment or be unexported (golint)
    • Line 56: warning: exported method ResourceFieldStringToken.Dependencies should have comment or be unexported (golint)
    • Line 60: warning: exported method ResourceFieldStringToken.MarshalJSON should have comment or be unexported (golint)
    • alb-ingress-controller/pkg/networking/subnet_resolver.go
    • Line 18: warning: exported const TagKeySubnetInternalELB should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: comment on exported type SubnetsResolveOptions should be of the form "SubnetsResolveOptions ..." (with optional leading article) (golint)
    • Line 62: warning: exported type SubnetsResolveOption should have comment or be unexported (golint)
    • alb-ingress-controller/pkg/ingress/config_types.go
    • Line 13: warning: comment on exported type FixedResponseActionConfig should be of the form "FixedResponseActionConfig ..." (with optional leading article) (golint)
    • Line 34: warning: comment on exported type RedirectActionConfig should be of the form "RedirectActionConfig ..." (with optional leading article) (golint)
    • Line 67: warning: comment on exported type TargetGroupTuple should be of the form "TargetGroupTuple ..." (with optional leading article) (golint)
    • Line 94: warning: comment on exported type TargetGroupStickinessConfig should be of the form "TargetGroupStickinessConfig ..." (with optional leading article) (golint)
    • Line 105: warning: comment on exported type ForwardActionConfig should be of the form "ForwardActionConfig ..." (with optional leading article) (golint)
    • Line 132: warning: comment on exported type ActionType should be of the form "ActionType ..." (with optional leading article) (golint)
    • Line 136: warning: exported const ActionTypeFixedResponse should have comment (or a comment on this block) or be unexported (golint)
    • Line 141: warning: exported type Action should have comment or be unexported (golint)
    • Line 194: warning: exported type RuleConditionField should have comment or be unexported (golint)
    • Line 197: warning: exported const RuleConditionFieldHTTPHeader should have comment (or a comment on this block) or be unexported (golint)
    • Line 205: warning: comment on exported type HostHeaderConditionConfig should be of the form "HostHeaderConditionConfig ..." (with optional leading article) (golint)
    • Line 218: warning: comment on exported type HTTPHeaderConditionConfig should be of the form "HTTPHeaderConditionConfig ..." (with optional leading article) (golint)
    • Line 233: warning: comment on exported type HTTPRequestMethodConditionConfig should be of the form "HTTPRequestMethodConditionConfig ..." (with optional leading article) (golint)
    • Line 246: warning: comment on exported type PathPatternConditionConfig should be of the form "PathPatternConditionConfig ..." (with optional leading article) (golint)
    • Line 259: warning: comment on exported type QueryStringKeyValuePair should be of the form "QueryStringKeyValuePair ..." (with optional leading article) (golint)
    • Line 276: warning: comment on exported type QueryStringConditionConfig should be of the form "QueryStringConditionConfig ..." (with optional leading article) (golint)
    • Line 294: warning: comment on exported type SourceIPConditionConfig should be of the form "SourceIPConditionConfig ..." (with optional leading article) (golint)
    • Line 307: warning: comment on exported type RuleCondition should be of the form "RuleCondition ..." (with optional leading article) (golint)
    • Line 373: warning: exported type AuthType should have comment or be unexported (golint)
    • Line 376: warning: exported const AuthTypeNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 381: warning: exported type AuthIDPConfigCognito should have comment or be unexported (golint)
    • Line 396: warning: comment on exported type AuthIDPConfigOIDC should be of the form "AuthIDPConfigOIDC ..." (with optional leading article) (golint)
    • alb-ingress-controller/pkg/deploy/ec2/tagging_manager.go
    • Line 17: warning: comment on exported type ReconcileTagsOptions should be of the form "ReconcileTagsOptions ..." (with optional leading article) (golint)
    • Line 28: warning: exported method ReconcileTagsOptions.ApplyOptions should have comment or be unexported (golint)
    • Line 34: warning: exported type ReconcileTagsOption should have comment or be unexported (golint)
    • Line 50: warning: comment on exported type TaggingManager should be of the form "TaggingManager ..." (with optional leading article) (golint)
    • alb-ingress-controller/pkg/backend/endpoint_types.go
    • Line 9: warning: comment on exported type PodEndpoint should be of the form "PodEndpoint ..." (with optional leading article) (golint)
    • Line 19: warning: comment on exported type NodePortEndpoint should be of the form "NodePortEndpoint ..." (with optional leading article) (golint)
    • Line 29: warning: comment on exported type EndpointResolveOptions should be of the form "EndpointResolveOptions ..." (with optional leading article) (golint)
    • Line 40: warning: exported method EndpointResolveOptions.ApplyOptions should have comment or be unexported (golint)
    • Line 46: warning: exported type EndpointResolveOption should have comment or be unexported (golint)
    • alb-ingress-controller/apis/elbv2/v1alpha1/targetgroupbinding_types.go
    • Line 24: warning: comment on exported type TargetType should be of the form "TargetType ..." (with optional leading article) (golint)
    • Line 28: warning: exported const TargetTypeInstance should have comment (or a comment on this block) or be unexported (golint)
    • Line 67: warning: comment on exported type NetworkingProtocol should be of the form "NetworkingProtocol ..." (with optional leading article) (golint)
    • Line 78: warning: exported type NetworkingPort should have comment or be unexported (golint)
    • Line 91: warning: exported type NetworkingIngressRule should have comment or be unexported (golint)
    • Line 101: warning: exported type TargetGroupBindingNetworking should have comment or be unexported (golint)
    • Line 131: warning: comment on exported type TargetGroupBinding should be of the form "TargetGroupBinding ..." (with optional leading article) (golint)
    • alb-ingress-controller/pkg/model/elbv2/target_group.go
    • Line 40: warning: comment on exported method TargetGroup.TargetGroupARN should be of the form "TargetGroupARN ..." (golint)
    • Line 53: warning: exported type TargetType should have comment or be unexported (golint)
    • Line 56: warning: exported const TargetTypeInstance should have comment (or a comment on this block) or be unexported (golint)
    • Line 60: warning: comment on exported type HealthCheckMatcher should be of the form "HealthCheckMatcher ..." (with optional leading article) (golint)
    • Line 69: warning: comment on exported type TargetGroupHealthCheckConfig should be of the form "TargetGroupHealthCheckConfig ..." (with optional leading article) (golint)
    • Line 104: warning: comment on exported type TargetGroupAttribute should be of the form "TargetGroupAttribute ..." (with optional leading article) (golint)
    • alb-ingress-controller/pkg/runtime/errors.go
    • Line 27: warning: comment on exported type RequeueNeeded should be of the form "RequeueNeeded ..." (with optional leading article) (golint)
    • Line 34: warning: exported method RequeueNeeded.Reason should have comment or be unexported (golint)
    • Line 44: warning: comment on exported type RequeueNeededAfter should be of the form "RequeueNeededAfter ..." (with optional leading article) (golint)
    • Line 53: warning: exported method RequeueNeededAfter.Reason should have comment or be unexported (golint)
    • Line 57: warning: exported method RequeueNeededAfter.Duration should have comment or be unexported (golint)
    • alb-ingress-controller/pkg/annotations/parser.go
    • Line 11: warning: exported type ParseOptions should have comment or be unexported (golint)
    • Line 18: warning: exported type ParseOption should have comment or be unexported (golint)
    • Line 20: warning: exported function WithExact should have comment or be unexported (golint)
    • Line 26: warning: exported function WithAlternativePrefixes should have comment or be unexported (golint)
    • alb-ingress-controller/pkg/networking/security_group_reconciler.go
    • Line 12: warning: comment on exported type SecurityGroupReconcileOptions should be of the form "SecurityGroupReconcileOptions ..." (with optional leading article) (golint)
    • Line 24: warning: comment on exported method SecurityGroupReconcileOptions.ApplyOptions should be of the form "ApplyOptions ..." (golint)
    • Line 31: warning: exported type SecurityGroupReconcileOption should have comment or be unexported (golint)
    • alb-ingress-controller/test/framework/options.go
    • Line 14: warning: comment on exported type Options should be of the form "Options ..." (with optional leading article) (golint)
    • Line 29: warning: exported method Options.BindFlags should have comment or be unexported (golint)
    • Line 40: warning: exported method Options.Validate should have comment or be unexported (golint)
    • alb-ingress-controller/pkg/model/core/fake_resource.go
    • Line 10: warning: exported function NewFakeResource should have comment or be unexported (golint)
    • Line 29: warning: exported method FakeResource.FieldB should have comment or be unexported (golint)
    • Line 41: warning: exported type FakeResource should have comment or be unexported (golint)
    • Line 48: warning: exported type FakeResourceSpec should have comment or be unexported (golint)
    • Line 52: warning: exported type FakeResourceStatus should have comment or be unexported (golint)
    • alb-ingress-controller/pkg/targetgroupbinding/utils.go
    • Line 12: warning: comment on exported const TargetHealthPodConditionTypePrefix should be of the form "TargetHealthPodConditionTypePrefix ..." (golint)
    • Line 14: warning: comment on exported const TargetHealthPodConditionTypePrefixLegacy should be of the form "TargetHealthPodConditionTypePrefixLegacy ..." (golint)
    • Line 17: warning: comment on exported const IndexKeyServiceRefName should be of the form "IndexKeyServiceRefName ..." (golint)
    • Line 26: warning: comment on exported function IndexFuncServiceRefName should be of the form "IndexFuncServiceRefName ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!