Preparing report...

Report for github.com/projectsesame/sesame

(v0.0.0-20211223124548-f4893a17feed)

A+    Excellent!    Found 64 issues across 307 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!


gocyclo95%

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.

    • internal/dag/httpproxy_processor.go
    • Line 379: warning: cyclomatic complexity 56 of function (*HTTPProxyProcessor).computeRoutes() is high (> 15) (gocyclo)
    • Line 119: warning: cyclomatic complexity 46 of function (*HTTPProxyProcessor).computeHTTPProxy() is high (> 15) (gocyclo)
    • Line 728: warning: cyclomatic complexity 18 of function (*HTTPProxyProcessor).processHTTPProxyTCPProxy() is high (> 15) (gocyclo)
    • internal/sorter/sorter.go
    • Line 49: warning: cyclomatic complexity 19 of function (headerMatchConditionSorter).Less() is high (> 15) (gocyclo)
    • Line 138: warning: cyclomatic complexity 17 of function (routeSorter).Less() is high (> 15) (gocyclo)
    • internal/dag/cache.go
    • Line 372: warning: cyclomatic complexity 32 of function (*KubernetesCache).secretTriggersRebuild() is high (> 15) (gocyclo)
    • Line 105: warning: cyclomatic complexity 24 of function (*KubernetesCache).Insert() is high (> 15) (gocyclo)
    • Line 305: warning: cyclomatic complexity 21 of function (*KubernetesCache).serviceTriggersRebuild() is high (> 15) (gocyclo)
    • Line 231: warning: cyclomatic complexity 16 of function (*KubernetesCache).remove() is high (> 15) (gocyclo)
    • internal/dag/gatewayapi_processor.go
    • Line 106: warning: cyclomatic complexity 30 of function (*GatewayAPIProcessor).computeListener() is high (> 15) (gocyclo)
    • Line 767: warning: cyclomatic complexity 22 of function (*GatewayAPIProcessor).computeHTTPRoute() is high (> 15) (gocyclo)
    • test/e2e/deployment.go
    • Line 675: warning: cyclomatic complexity 24 of function (*Deployment).EnsureResourcesForInclusterContour() is high (> 15) (gocyclo)

golint82%

Golint is a linter for Go source code.

    • internal/envoy/bootstrap.go
    • Line 105: warning: exported method BootstrapConfig.GetAdminPort should have comment or be unexported (golint)
    • Line 142: warning: exported function WriteConfig should have comment or be unexported (golint)
    • internal/k8s/statuscache.go
    • Line 82: warning: exported method StatusUpdateCacher.Add should have comment or be unexported (golint)
    • Line 99: warning: exported method StatusUpdateCacher.GetStatus should have comment or be unexported (golint)
    • Line 120: warning: exported method StatusUpdateCacher.Send should have comment or be unexported (golint)
    • internal/xds/hash.go
    • Line 20: warning: comment on exported const CONSTANT_HASH_VALUE should be of the form "CONSTANT_HASH_VALUE ..." (golint)
    • Line 28: warning: exported method ConstantHashV3.ID should have comment or be unexported (golint)
    • internal/envoy/v3/listener.go
    • Line 45: warning: exported type HTTPVersionType should have comment or be unexported (golint)
    • Line 48: warning: exported const HTTPVersionAuto should have comment (or a comment on this block) or be unexported (golint)
    • Line 597: warning: exported function FilterMisdirectedRequests should have comment or be unexported (golint)
    • Line 687: warning: exported function OriginalIPDetectionFilter should have comment or be unexported (golint)
    • Line 749: warning: exported function ContainsFallbackFilterChain should have comment or be unexported (golint)
    • internal/dag/accessors.go
    • Line 155: warning: exported method DAG.GetClusters should have comment or be unexported (golint)
    • Line 187: warning: exported method DAG.GetServiceClusters should have comment or be unexported (golint)
    • Line 228: warning: exported method DAG.GetSecrets should have comment or be unexported (golint)
    • Line 263: warning: exported method DAG.GetVirtualHostRoutes should have comment or be unexported (golint)
    • Line 281: warning: exported method DAG.GetSecureVirtualHostRoutes should have comment or be unexported (golint)
    • internal/dag/dag.go
    • Line 41: warning: exported method ObserverFunc.OnChange should have comment or be unexported (golint)
    • Line 58: warning: exported type DAG should have comment or be unexported (golint)
    • Line 68: warning: exported type MatchCondition should have comment or be unexported (golint)
    • Line 402: warning: exported type HeaderValueMatchDescriptorEntry should have comment or be unexported (golint)
    • Line 428: warning: exported type HeaderValue should have comment or be unexported (golint)
    • Line 497: warning: exported method VirtualHost.Valid should have comment or be unexported (golint)
    • Line 561: warning: exported method SecureVirtualHost.Valid should have comment or be unexported (golint)
    • Line 786: warning: exported method Secret.Name should have comment or be unexported (golint)
    • Line 787: warning: exported method Secret.Namespace should have comment or be unexported (golint)
    • internal/featuretests/kubernetes.go
    • Line 24: warning: exported function IngressBackend should have comment or be unexported (golint)
    • Line 87: warning: exported function Secretdata should have comment or be unexported (golint)
    • Line 94: warning: exported function Endpoints should have comment or be unexported (golint)
    • Line 104: warning: exported function Ports should have comment or be unexported (golint)
    • Line 108: warning: exported function Port should have comment or be unexported (golint)
    • Line 116: warning: exported function Addresses should have comment or be unexported (golint)
    • pkg/config/parameters.go
    • Line 33: warning: exported const SesameServerType should have comment or be unexported (golint)
    • Line 34: warning: exported const EnvoyServerType should have comment or be unexported (golint)
    • Line 70: warning: exported const XDSv3 should have comment or be unexported (golint)
    • Line 86: warning: exported method ClusterDNSFamilyType.Validate should have comment or be unexported (golint)
    • Line 95: warning: exported const AutoClusterDNSFamily should have comment or be unexported (golint)
    • Line 96: warning: exported const IPv4ClusterDNSFamily should have comment or be unexported (golint)
    • Line 97: warning: exported const IPv6ClusterDNSFamily should have comment or be unexported (golint)
    • Line 102: warning: exported method AccessLogType.Validate should have comment or be unexported (golint)
    • Line 111: warning: exported const EnvoyAccessLog should have comment or be unexported (golint)
    • Line 112: warning: exported const JSONAccessLog should have comment or be unexported (golint)
    • Line 114: warning: exported type AccessLogFields should have comment or be unexported (golint)
    • Line 116: warning: exported method AccessLogFields.Validate should have comment or be unexported (golint)
    • Line 136: warning: exported method AccessLogFields.AsFieldMap should have comment or be unexported (golint)
    • Line 269: warning: exported method HTTPVersionType.Validate should have comment or be unexported (golint)
    • Line 278: warning: exported const HTTPVersion1 should have comment or be unexported (golint)
    • Line 279: warning: exported const HTTPVersion2 should have comment or be unexported (golint)
    • Line 469: warning: exported type HeadersPolicy should have comment or be unexported (golint)
    • Line 474: warning: exported method HeadersPolicy.Validate should have comment or be unexported (golint)
    • Line 547: warning: exported method ListenerParameters.Validate should have comment or be unexported (golint)
    • Line 707: warning: exported method MetricsParameters.Validate should have comment or be unexported (golint)
    • Line 718: warning: exported method MetricsServerParameters.Validate should have comment or be unexported (golint)
    • internal/featuretests/v3/featuretests.go
    • Line 284: warning: exported type StatusResult should have comment or be unexported (golint)
    • Line 370: warning: exported type Contour should have comment or be unexported (golint)
    • Line 398: warning: exported method Contour.Request should have comment or be unexported (golint)
    • Line 450: warning: exported type Response should have comment or be unexported (golint)
    • internal/sesame/handler.go
    • Line 32: warning: exported type EventHandlerConfig should have comment or be unexported (golint)
    • Line 62: warning: exported function NewEventHandler should have comment or be unexported (golint)
    • Line 87: warning: exported method EventHandler.OnAdd should have comment or be unexported (golint)
    • Line 91: warning: exported method EventHandler.OnUpdate should have comment or be unexported (golint)
    • Line 95: warning: exported method EventHandler.OnDelete should have comment or be unexported (golint)
    • Line 99: warning: exported method EventHandler.NeedLeaderElection should have comment or be unexported (golint)
    • Line 103: warning: comment on exported method EventHandler.OnElectedLeader should be of the form "OnElectedLeader ..." (golint)
    • Line 110: warning: exported method EventHandler.Start should have comment or be unexported (golint)
    • internal/status/routeconditions.go
    • Line 26: warning: exported const ConditionNotImplemented should have comment or be unexported (golint)
    • Line 27: warning: exported const ConditionResolvedRefs should have comment or be unexported (golint)
    • Line 28: warning: exported const ConditionValidBackendRefs should have comment or be unexported (golint)
    • Line 29: warning: exported const ConditionValidMatches should have comment or be unexported (golint)
    • Line 31: warning: exported type RouteReasonType should have comment or be unexported (golint)
    • Line 33: warning: exported const ReasonNotImplemented should have comment or be unexported (golint)
    • Line 34: warning: exported const ReasonPathMatchType should have comment or be unexported (golint)
    • Line 35: warning: exported const ReasonHeaderMatchType should have comment or be unexported (golint)
    • Line 36: warning: exported const ReasonHTTPRouteFilterType should have comment or be unexported (golint)
    • Line 37: warning: exported const ReasonDegraded should have comment or be unexported (golint)
    • Line 38: warning: exported const ReasonValid should have comment or be unexported (golint)
    • Line 39: warning: exported const ReasonErrorsExist should have comment or be unexported (golint)
    • Line 40: warning: exported const ReasonGatewayAllowMismatch should have comment or be unexported (golint)
    • Line 41: warning: exported const ReasonAllBackendRefsHaveZeroWeights should have comment or be unexported (golint)
    • Line 42: warning: exported const ReasonInvalidPathMatch should have comment or be unexported (golint)
    • Line 47: warning: exported type RouteConditionsUpdate should have comment or be unexported (golint)
    • Line 77: warning: exported method RouteConditionsUpdate.Mutate should have comment or be unexported (golint)
    • apis/projectsesame/v1alpha1/sesameconfig.go
    • Line 85: warning: exported const SesameServerType should have comment or be unexported (golint)
    • Line 86: warning: exported const EnvoyServerType should have comment or be unexported (golint)
    • Line 170: warning: comment on exported type MetricsTLS should be of the form "MetricsTLS ..." (with optional leading article) (golint)
    • Line 189: warning: exported const HTTPVersion1 should have comment or be unexported (golint)
    • Line 190: warning: exported const HTTPVersion2 should have comment or be unexported (golint)
    • Line 250: warning: exported const InfoLog should have comment or be unexported (golint)
    • Line 251: warning: exported const DebugLog should have comment or be unexported (golint)
    • Line 302: warning: comment on exported type TLSCipherType should be of the form "TLSCipherType ..." (with optional leading article) (golint)
    • Line 421: warning: exported const AutoClusterDNSFamily should have comment or be unexported (golint)
    • Line 422: warning: exported const IPv4ClusterDNSFamily should have comment or be unexported (golint)
    • Line 423: warning: exported const IPv6ClusterDNSFamily should have comment or be unexported (golint)
    • Line 513: warning: exported type HeadersPolicy should have comment or be unexported (golint)
    • internal/leadership/notifier.go
    • Line 18: warning: exported type NeedLeaderElectionNotification should have comment or be unexported (golint)
    • Line 29: warning: exported method Notifier.NeedLeaderElection should have comment or be unexported (golint)
    • Line 33: warning: exported method Notifier.Start should have comment or be unexported (golint)
    • internal/xdscache/v3/secret.go
    • Line 39: warning: exported function NewSecretsCache should have comment or be unexported (golint)
    • Line 74: warning: exported method SecretCache.Query should have comment or be unexported (golint)
    • Line 95: warning: exported method SecretCache.TypeURL should have comment or be unexported (golint)
    • Line 97: warning: exported method SecretCache.OnChange should have comment or be unexported (golint)
    • internal/fixture/service_fixtures.go
    • Line 21: warning: exported var ServiceRootsKuard should have comment or be unexported (golint)
    • Line 33: warning: exported var ServiceRootsHome should have comment or be unexported (golint)
    • Line 44: warning: exported var ServiceRootsFoo2 should have comment or be unexported (golint)
    • Line 55: warning: exported var ServiceRootsFoo3InvalidPort should have comment or be unexported (golint)
    • Line 66: warning: exported var ServiceMarketingGreen should have comment or be unexported (golint)
    • Line 77: warning: exported var ServiceRootsNginx should have comment or be unexported (golint)
    • Line 87: warning: exported var ServiceTeamAKuard should have comment or be unexported (golint)
    • Line 99: warning: exported var ServiceTeamBKuard should have comment or be unexported (golint)
    • internal/xdscache/v3/cluster.go
    • Line 59: warning: exported method ClusterCache.Query should have comment or be unexported (golint)
    • Line 77: warning: exported method ClusterCache.TypeURL should have comment or be unexported (golint)
    • Line 79: warning: exported method ClusterCache.OnChange should have comment or be unexported (golint)
    • internal/gatewayapi/helpers.go
    • Line 21: warning: exported function SectionNamePtr should have comment or be unexported (golint)
    • Line 26: warning: exported function PortNumPtr should have comment or be unexported (golint)
    • Line 31: warning: exported function FromNamespacesPtr should have comment or be unexported (golint)
    • Line 35: warning: exported function PathMatchTypePtr should have comment or be unexported (golint)
    • Line 39: warning: exported function HeaderMatchTypePtr should have comment or be unexported (golint)
    • Line 43: warning: exported function TLSModeTypePtr should have comment or be unexported (golint)
    • Line 47: warning: exported function HTTPMethodPtr should have comment or be unexported (golint)
    • Line 51: warning: exported function AddressTypePtr should have comment or be unexported (golint)
    • Line 55: warning: exported function ListenerHostname should have comment or be unexported (golint)
    • Line 60: warning: exported function CertificateRef should have comment or be unexported (golint)
    • Line 74: warning: exported function GatewayParentRef should have comment or be unexported (golint)
    • Line 88: warning: exported function GatewayListenerParentRef should have comment or be unexported (golint)
    • Line 98: warning: exported function GroupPtr should have comment or be unexported (golint)
    • Line 103: warning: exported function KindPtr should have comment or be unexported (golint)
    • Line 108: warning: exported function NamespacePtr should have comment or be unexported (golint)
    • Line 113: warning: exported function ObjectNamePtr should have comment or be unexported (golint)
    • Line 118: warning: exported function ServiceBackendObjectRef should have comment or be unexported (golint)
    • Line 127: warning: exported function GatewayAddressTypePtr should have comment or be unexported (golint)
    • Line 131: warning: exported function HTTPRouteMatch should have comment or be unexported (golint)
    • Line 142: warning: exported function HTTPHeaderMatch should have comment or be unexported (golint)
    • Line 152: warning: exported function HTTPBackendRefs should have comment or be unexported (golint)
    • Line 161: warning: exported function HTTPBackendRef should have comment or be unexported (golint)
    • Line 172: warning: exported function TLSRouteBackendRefs should have comment or be unexported (golint)
    • Line 181: warning: exported function TLSRouteBackendRef should have comment or be unexported (golint)
    • internal/status/gatewaystatus.go
    • Line 26: warning: exported type GatewayReasonType should have comment or be unexported (golint)
    • Line 28: warning: exported const ReasonValidGateway should have comment or be unexported (golint)
    • Line 29: warning: exported const ReasonInvalidGateway should have comment or be unexported (golint)
    • Line 31: warning: exported const MessageValidGateway should have comment or be unexported (golint)
    • Line 68: warning: exported method GatewayStatusUpdate.SetListenerSupportedKinds should have comment or be unexported (golint)
    • Line 88: warning: exported method GatewayStatusUpdate.SetListenerAttachedRoutes should have comment or be unexported (golint)
    • Line 157: warning: exported method GatewayStatusUpdate.Mutate should have comment or be unexported (golint)
    • internal/xdscache/v3/endpointstranslator.go
    • Line 36: warning: exported type LocalityEndpoints should have comment or be unexported (golint)
    • Line 37: warning: exported type LoadBalancingEndpoint should have comment or be unexported (golint)
    • Line 338: warning: exported method EndpointsTranslator.OnAdd should have comment or be unexported (golint)
    • Line 356: warning: exported method EndpointsTranslator.OnUpdate should have comment or be unexported (golint)
    • Line 393: warning: exported method EndpointsTranslator.OnDelete should have comment or be unexported (golint)
    • Line 427: warning: exported method EndpointsTranslator.Query should have comment or be unexported (golint)
    • Line 447: warning: exported method EndpointsTranslator.TypeURL should have comment or be unexported (golint)
    • internal/dag/extension_processor.go
    • Line 31: warning: exported type ExtensionServiceProcessor should have comment or be unexported (golint)
    • Line 42: warning: exported method ExtensionServiceProcessor.Run should have comment or be unexported (golint)
    • internal/fixture/httpproxy.go
    • Line 75: warning: exported method ProxyBuilder.WithFQDN should have comment or be unexported (golint)
    • Line 81: warning: exported method ProxyBuilder.WithCertificate should have comment or be unexported (golint)
    • Line 87: warning: exported method ProxyBuilder.WithAuthServer should have comment or be unexported (golint)
    • internal/debug/debug.go
    • Line 34: warning: exported method Service.NeedLeaderElection should have comment or be unexported (golint)
    • Line 38: warning: comment on exported method Service.Start should be of the form "Start ..." (golint)
    • internal/fixture/secret_fixtures.go
    • Line 20: warning: exported var SecretRootsCert should have comment or be unexported (golint)
    • Line 29: warning: exported var SecretProjectContourCert should have comment or be unexported (golint)
    • Line 35: warning: exported var SecretRootsFallback should have comment or be unexported (golint)
    • internal/status/proxystatus.go
    • Line 25: warning: exported type ProxyStatus should have comment or be unexported (golint)
    • Line 28: warning: exported const ProxyStatusValid should have comment (or a comment on this block) or be unexported (golint)
    • Line 68: warning: exported method ProxyUpdate.Mutate should have comment or be unexported (golint)
    • internal/fixture/detailedcondition.go
    • Line 34: warning: exported method DetailedConditionBuilder.WithGeneration should have comment or be unexported (golint)
    • Line 39: warning: exported method DetailedConditionBuilder.Valid should have comment or be unexported (golint)
    • Line 49: warning: exported method DetailedConditionBuilder.Orphaned should have comment or be unexported (golint)
    • Line 57: warning: exported method DetailedConditionBuilder.WithError should have comment or be unexported (golint)
    • Line 66: warning: exported method DetailedConditionBuilder.WithErrorf should have comment or be unexported (golint)
    • Line 75: warning: exported method DetailedConditionBuilder.WithWarning should have comment or be unexported (golint)
    • Line 84: warning: exported method DetailedConditionBuilder.WithWarningf should have comment or be unexported (golint)
    • apis/projectsesame/v1/httpproxy.go
    • Line 416: warning: exported type CookieRewritePolicy should have comment or be unexported (golint)
    • Line 445: warning: exported type CookiePathRewrite should have comment or be unexported (golint)
    • Line 455: warning: exported type CookieDomainRewrite should have comment or be unexported (golint)
    • internal/k8s/status.go
    • Line 33: warning: exported function NewStatusUpdate should have comment or be unexported (golint)
    • Line 68: warning: exported function NewStatusUpdateHandler should have comment or be unexported (golint)
    • Line 103: warning: exported method StatusUpdateHandler.NeedLeaderElection should have comment or be unexported (golint)
    • internal/k8s/statusaddress.go
    • Line 215: warning: exported method StatusAddressUpdater.OnUpdate should have comment or be unexported (golint)
    • Line 223: warning: exported method StatusAddressUpdater.OnDelete should have comment or be unexported (golint)
    • Line 238: warning: exported method ServiceStatusLoadBalancerWatcher.OnAdd should have comment or be unexported (golint)
    • Line 254: warning: exported method ServiceStatusLoadBalancerWatcher.OnUpdate should have comment or be unexported (golint)
    • Line 270: warning: exported method ServiceStatusLoadBalancerWatcher.OnDelete should have comment or be unexported (golint)
    • apis/projectsesame/v1alpha1/accesslog.go
    • Line 128: warning: exported method AccessLogType.Validate should have comment or be unexported (golint)
    • Line 137: warning: exported const EnvoyAccessLog should have comment or be unexported (golint)
    • Line 138: warning: exported const JSONAccessLog should have comment or be unexported (golint)
    • Line 140: warning: exported type AccessLogFields should have comment or be unexported (golint)
    • Line 142: warning: exported method AccessLogFields.Validate should have comment or be unexported (golint)
    • Line 162: warning: exported method AccessLogFields.AsFieldMap should have comment or be unexported (golint)
    • internal/sesame/metrics.go
    • Line 38: warning: exported method EventRecorder.OnAdd should have comment or be unexported (golint)
    • Line 43: warning: exported method EventRecorder.OnUpdate should have comment or be unexported (golint)
    • Line 48: warning: exported method EventRecorder.OnDelete should have comment or be unexported (golint)
    • Line 75: warning: exported function NewRebuildMetricsObserver should have comment or be unexported (golint)
    • Line 83: warning: exported method RebuildMetricsObserver.OnElectedLeader should have comment or be unexported (golint)
    • Line 87: warning: exported method RebuildMetricsObserver.OnChange should have comment or be unexported (golint)
    • internal/xdscache/snapshot.go
    • Line 28: warning: exported type Snapshotter should have comment or be unexported (golint)
    • Line 56: warning: exported method SnapshotHandler.AddSnapshotter should have comment or be unexported (golint)
    • internal/xdscache/v3/listener.go
    • Line 52: warning: exported type Listener should have comment or be unexported (golint)
    • Line 136: warning: exported type RateLimitConfig should have comment or be unexported (golint)
    • Line 345: warning: exported method ListenerCache.TypeURL should have comment or be unexported (golint)
    • Line 347: warning: exported method ListenerCache.OnChange should have comment or be unexported (golint)
    • internal/dag/cache.go
    • Line 495: warning: exported method KubernetesCache.LookupUpstreamValidation should have comment or be unexported (golint)
    • internal/dag/status.go
    • Line 33: warning: exported type StatusWriter should have comment or be unexported (golint)
    • Line 37: warning: exported type ObjectStatusWriter should have comment or be unexported (golint)
    • Line 81: warning: exported method ObjectStatusWriter.WithValue should have comment or be unexported (golint)
    • Line 86: warning: exported method ObjectStatusWriter.SetInvalid should have comment or be unexported (golint)
    • Line 90: warning: exported method ObjectStatusWriter.SetValid should have comment or be unexported (golint)
    • internal/httpsvc/http.go
    • Line 46: warning: exported method Service.NeedLeaderElection should have comment or be unexported (golint)
    • Line 50: warning: comment on exported method Service.Start should be of the form "Start ..." (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!